/* ==========================================================================
   Found This Online — Custom Styles
   Complements Bootstrap 5.3 dark theme
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --fto-primary: #6366f1;
    --fto-primary-light: #a78bfa;
    --fto-accent: #14b8a6;
    --fto-surface: #1e1b4b;
    --fto-surface-hover: #2e2a6e;
    --fto-bg: #0f0d1a;
    --fto-text: #e2e8f0;
    --fto-text-muted: #94a3b8;
    --fto-border: rgba(99, 102, 241, 0.15);
    --fto-glow: rgba(99, 102, 241, 0.25);
    --fto-radius: 0.75rem;
}

/* ---------- Base ---------- */
body {
    background-color: var(--fto-bg);
    color: var(--fto-text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(15, 13, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--fto-border);
    padding: 0.75rem 0;
}

.brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--fto-text);
}

.brand-accent {
    color: var(--fto-primary-light);
}

.navbar .nav-link {
    color: var(--fto-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: var(--fto-radius);
    transition: color 0.2s, background-color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--fto-primary-light);
    background: rgba(99, 102, 241, 0.08);
}

/* ---------- Hero Section ---------- */
.hero-section {
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--fto-primary) 0%, var(--fto-primary-light) 50%, var(--fto-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--fto-text-muted);
    font-size: 1.15rem;
    max-width: 520px;
}

.hero-illustration {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.15));
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--fto-primary), #818cf8);
    border: none;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--fto-glow);
    background: linear-gradient(135deg, #818cf8, var(--fto-primary));
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--fto-text);
    font-weight: 600;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- Stats Section ---------- */
.stats-section {
    border-top: 1px solid var(--fto-border);
    border-bottom: 1px solid var(--fto-border);
    background: rgba(30, 27, 75, 0.3);
}

.stat-card {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--fto-primary-light), var(--fto-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-label {
    color: var(--fto-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
    background: var(--fto-surface);
    border: 1px solid var(--fto-border);
    border-radius: var(--fto-radius);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.discovery-card:hover {
    transform: translateY(-4px);
    border-color: var(--fto-primary);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12);
}

.discovery-card .card-title,
.discovery-card .card-text,
.discovery-card .card-footer {
    transition: color 0.2s;
}

.discovery-card .card-title {
    color: var(--fto-text);
}

.discovery-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--fto-primary-light);
}

.discovery-icon-lg {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--fto-primary-light);
}

.category-card {
    transition: transform 0.2s, border-color 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--fto-primary);
}

.category-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Charts.css overrides ---------- */
.chart-card {
    overflow: hidden;
}

#category-chart,
#about-chart {
    --labels-size: 5.5rem;
    height: 320px;
    max-width: 100%;
    margin: 0;
}

#category-chart th,
#about-chart th {
    color: var(--fto-text-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

/* ---------- CTA Section ---------- */
.cta-section {
    padding-bottom: 4rem;
}

.cta-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(20, 184, 166, 0.05) 100%);
    border: 1px solid var(--fto-border);
}

/* ---------- Page Header ---------- */
.page-header {
    border-bottom: 1px solid var(--fto-border);
    background: rgba(30, 27, 75, 0.2);
}

.breadcrumb-item a {
    color: var(--fto-text-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--fto-primary-light);
}

.breadcrumb-item.active {
    color: var(--fto-text);
}

/* ---------- Progress bars ---------- */
.progress {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

/* ---------- List groups ---------- */
.list-group-item {
    background: transparent;
    border-color: var(--fto-border);
    color: var(--fto-text);
    font-size: 0.9rem;
}

.card-header {
    background: rgba(99, 102, 241, 0.06);
    border-bottom-color: var(--fto-border);
    color: var(--fto-text);
}

/* ---------- Footer ---------- */
.site-footer {
    background: rgba(15, 13, 26, 0.9);
    border-top: 1px solid var(--fto-border);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: var(--fto-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--fto-primary-light);
}

.footer-social a {
    color: var(--fto-text-muted);
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.footer-social a:hover {
    color: var(--fto-primary-light);
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 2rem 0;
    }

    .min-vh-75 {
        min-height: auto;
        padding: 2rem 0;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    #category-chart,
    #about-chart {
        --labels-size: 4rem;
        height: 240px;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--fto-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* ---------- Utilities ---------- */
.text-primary {
    color: var(--fto-primary-light) !important;
}
