/* ======================================
   SEO DATA PLATFORM — Custom Theme
   Dark premium design with glassmorphism
   ====================================== */

/* --- Root Variables --- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(255, 255, 255, 0.12);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-6: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --sidebar-width: 260px;
    --navbar-height: 64px;
}

/* --- Global --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}


/* --- Text Gradient --- */
.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fw-900 {
    font-weight: 900;
}

/* --- Navbar Glass --- */
.navbar-glass {
    background: rgba(10, 14, 26, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: var(--navbar-height);
    z-index: 1030;
}

.navbar-scrolled {
    background: rgba(10, 14, 26, 0.85);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.brand-icon-sm {
    width: 28px;
    height: 28px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
}

.navbar-glass .nav-link {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.06);
}

/* Navbar — Mobile collapsed menu */
@media (max-width: 991.98px) {
    .navbar-glass {
        position: relative;
    }

    .navbar-glass .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-glass);
        border-top: none;
        border-radius: 0 0 14px 14px;
        padding: 1rem 1.25rem;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
        z-index: 1050;
    }

    .navbar-glass .navbar-nav {
        align-items: stretch !important;
        gap: 0.15rem !important;
    }

    .navbar-glass .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-glass .navbar-nav .nav-link {
        width: 100%;
        padding: 0.65rem 0.85rem;
        border-radius: 8px;
    }

    .navbar-glass .navbar-nav .btn {
        width: 100%;
        text-align: center;
        margin: 0.2rem 0 !important;
    }

    .navbar-glass .navbar-nav .nav-item.ms-1,
    .navbar-glass .navbar-nav .nav-item.ms-2 {
        margin-left: 0 !important;
    }

    .navbar-glass .navbar-nav .dropdown-toggle {
        width: 100%;
    }
}

/* --- Gradient Button --- */
.btn-gradient {
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
    color: white;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    flex-shrink: 0;
    position: sticky;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
}

.sidebar-inner {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.12em;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.15rem;
}

.sidebar-link:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    color: #f1f5f9;
    background: rgba(102, 126, 234, 0.15);
}

.sidebar-link.active i {
    color: #667eea;
}

.sidebar-cta {
    margin-top: auto;
}

/* --- Main Content --- */
.main-content {
    min-height: calc(100vh - var(--navbar-height));
    max-width: calc(100% - var(--sidebar-width));
}

/* --- Glass Cards --- */
.card-glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glass:hover {
    border-color: var(--border-glass-hover);
}

.card-glass-accent {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 14px;
}

/* --- Feature Cards (Home) --- */
.feature-card {
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.bg-gradient-1 {
    background: var(--gradient-1);
}

.bg-gradient-2 {
    background: var(--gradient-2);
}

.bg-gradient-3 {
    background: var(--gradient-3);
}

.bg-gradient-4 {
    background: var(--gradient-4);
}

.bg-gradient-5 {
    background: var(--gradient-5);
}

.bg-gradient-6 {
    background: var(--gradient-6);
}

.bg-gradient-subtle {
    background: rgba(102, 126, 234, 0.15);
}

/* --- Stat Cards --- */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: white;
    flex-shrink: 0;
}

/* --- Score Elements --- */
.score-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.score-circle-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.score-circle-xl {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.score-circle-xl .score-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-circle-xl .score-label {
    font-size: 0.6rem;
    opacity: 0.8;
}

.score-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    min-width: 42px;
    text-align: center;
}

.grade-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.grade-badge-lg {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.2rem;
}

.grade-success {
    background: rgba(25, 135, 84, 0.2);
    color: #4ade80;
}

.grade-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #fbbf24;
}

.grade-info {
    background: rgba(13, 202, 240, 0.2);
    color: #22d3ee;
}

.grade-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f87171;
}

/* --- Audit Cells --- */
.audit-cell {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.audit-success {
    background: rgba(25, 135, 84, 0.2);
    color: #4ade80;
}

.audit-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #fbbf24;
}

.audit-info {
    background: rgba(13, 202, 240, 0.2);
    color: #22d3ee;
}

.audit-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f87171;
}

/* --- Legend --- */
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* --- Pricing --- */
.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.pricing-featured {
    border: 1px solid rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.1);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-1);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.35rem 1rem;
    border-radius: 20px;
}

/* --- Tables --- */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-glass);
}

.table-dark.table-hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* --- Pagination Glass --- */
.pagination-glass .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: #94a3b8;
    border-radius: 8px;
    margin: 0 3px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    transition: all 0.2s;
}

.pagination-glass .page-link:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    color: #e2e8f0;
}

.pagination-glass .page-item.active .page-link {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

/* --- Footer --- */
.footer-glass {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
}

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

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: #667eea;
    top: -200px;
    right: -100px;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: #764ba2;
    bottom: -200px;
    left: -100px;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: #f093fb;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

.hero-visual {
    position: relative;
    height: 380px;
}

.hero-card {
    position: absolute;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.hero-card-1 {
    top: 20px;
    left: 20px;
    right: 40px;
}

.hero-card-2 {
    top: 160px;
    right: 0;
}

.hero-card-3 {
    top: 250px;
    left: 40px;
}

.stat-mini {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* --- Animations --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delay {
    animation: float 4s ease-in-out 1s infinite;
}

.animate-float-delay-2 {
    animation: float 4s ease-in-out 2s infinite;
}

/* --- Scroll Fade Up Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.hover-glow {
    transition: color 0.2s, text-shadow 0.2s;
}

.hover-glow:hover {
    color: #f1f5f9 !important;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* --- Progress Bars --- */
.progress {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* --- Form Overrides --- */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Session Timeline --- */
.session-timeline {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.session-date-header {
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

.session-date-header:first-child {
    margin-top: 0;
}

.session-date-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.session-card {
    border-left: 3px solid rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.session-card:hover {
    border-left-color: #667eea;
    background: var(--bg-card-hover) !important;
}

.session-time-col {
    min-width: 58px;
    text-align: right;
    font-family: 'Inter', monospace;
}

.score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.15s ease;
}

.score-chip:hover {
    opacity: 1;
    transform: scale(1.15);
    color: white;
}

.score-chip.bg-success {
    background: rgba(25, 135, 84, 0.6);
}

.score-chip.bg-warning {
    background: rgba(255, 193, 7, 0.5);
}

.score-chip.bg-info {
    background: rgba(13, 202, 240, 0.5);
}

.score-chip.bg-danger {
    background: rgba(220, 53, 69, 0.5);
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .main-content {
        max-width: 100%;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }

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

@media (max-width: 767.98px) {
    /* Footer — stack and center on mobile */
    .footer-glass .row {
        text-align: center;
    }

    .footer-glass .d-flex {
        justify-content: center;
    }

    /* Hero — mobile optimizations */
    .hero-section {
        padding: 2rem 0 1.5rem;
    }

    .hero-section .display-3 {
        font-size: 2.2rem;
    }

    .hero-section .lead {
        font-size: 0.95rem;
    }

    .hero-section .d-flex.gap-3 {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-section .d-flex.gap-3 .btn {
        width: 100%;
    }

    .hero-section .d-flex.gap-4.mt-4 {
        justify-content: center;
    }

    .stat-mini {
        align-items: center;
        text-align: center;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    /* Feature cards — tighter padding */
    .feature-card .card-body {
        padding: 1rem !important;
    }

    /* Stats section */
    .card-glass-accent {
        padding: 1.5rem !important;
    }

    .card-glass-accent .fs-2 {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 575.98px) {
    .score-circle-xl {
        width: 60px;
        height: 60px;
    }

    .score-circle-xl .score-value {
        font-size: 1.1rem;
    }

    .grade-badge-lg {
        font-size: 1rem;
    }

    .hero-section .display-3 {
        font-size: 1.8rem;
    }

    .hero-section .badge {
        font-size: 0.7rem;
    }
}