:root {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-panel: #f8fafc;
    --border-color: #e2e8f0;
    --accent-violet: #6366f1;
    --accent-cyan: #f97316;
    --accent-lime: #10b981;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #f97316, #ea580c);
    --shadow-glow: 0 10px 15px -3px rgba(249, 115, 22, 0.1);
    --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --primary: #f97316;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden !important;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f3f4f6;
    color: var(--text-primary);
    overflow-y: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Containers */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    max-width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0.6rem;
    /* Reduced horizontal padding */
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
}

.sidebar-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding-left: 0.4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-shrink: 0;
    min-height: 40px;
    opacity: 1 !important;
    visibility: visible !important;
}

.logo-icon {
    color: var(--accent-cyan);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    /* Reduced gap */
    padding: 0.6rem 0.6rem;
    /* Reduced padding */
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    font-weight: 600;
    /* Slightly bolder for readability at smaller size */
    font-size: 0.85rem;
    /* Reduced font size */
    border-left: 3px solid transparent;
    width: 100%;
    overflow: hidden;
}

.nav-links li span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.nav-links li.active,
.nav-links li:hover {
    background: #f1f5f9;
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}

.nav-links li:active {
    transform: scale(0.98);
}

/* Premium Tab Glassmorphism */
.nav-links li.nav-premium {
    position: relative;
    background: rgba(249, 115, 22, 0.03);
    border: 1px solid rgba(249, 115, 22, 0.05);
    margin-top: 2px;
}

.nav-links li.nav-premium::after {
    content: 'PRO';
    font-size: 0.55rem;
    font-weight: 800;
    background: var(--primary);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: auto;
    opacity: 0.8;
}

/* Locked State for Sidebar */
.nav-links li.restricted {
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: auto;
    /* Allow click so JS can show modal */
}

.nav-links li.restricted i,
.nav-links li.restricted span,
.nav-links li.restricted::after {
    opacity: 0.4 !important;
    filter: grayscale(1);
}

.nav-links li.restricted:hover {
    background: transparent !important;
    border-color: transparent !important;
}

.nav-links li.nav-premium:hover {
    background: rgba(249, 115, 22, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-color: rgba(249, 115, 22, 0.2);
}

.nav-links li i {
    width: 18px;
    /* Slightly smaller icons */
    height: 18px;
    color: var(--text-muted);
}

.nav-links li.active i,
.nav-links li:hover i {
    color: var(--primary);
}

/* Subtler Sidebar Badges */
.badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

.nav-premium .badge {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
    color: var(--accent-violet);
}

.badge.live {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
    color: var(--accent-lime);
}

.badge.new {
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.05);
    color: var(--accent-cyan);
}

/* Divider removed per request */

.nav-premium {
    position: relative;
    border: 1px solid transparent !important;
}

/* PRO Badge removed from CSS to avoid duplicates. Using HTML badges instead. */

/* Competitor War Room icon - make it black for emphasis */
.nav-links li[data-section="war-room"] i,
.nav-links li[data-section="war-room"] svg {
    color: #000000 !important;
}

.nav-links li[data-section="war-room"]:hover i,
.nav-links li[data-section="war-room"]:hover svg,
.nav-links li[data-section="war-room"].active i,
.nav-links li[data-section="war-room"].active svg {
    color: var(--primary) !important;
}


/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    min-height: 0;
    /* CRITICAL FIX: Allows flex shrinking on desktop */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem;
    background: var(--bg-panel);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1rem;
    /* Reduced from 1.5rem for tighter spacing */
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.search-container {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    max-width: 800px;
    min-width: 300px;
    /* Reduced from 450px to prevent overlap */
}

.search-container .tier-toggle {
    margin-left: 0.5rem;
    /* Add spacing for Logic dropdown inside search-container */
}

#url-input {
    flex: 1;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 12px;
    height: 56px;
    /* Fixed height */
    padding: 0 1.5rem;
    /* Center vertically with line-height or flex */
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

#scan-btn {
    background: #111827;
    border: none;
    border-radius: 12px;
    height: 56px;
    /* Match input */
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

#scan-btn:hover {
    transform: translateY(-2px);
    background: #000000;
}

/* Modern Custom Dropdown */
.tier-toggle {
    margin-left: 0;
    /* Reset since depth-dropdown is now outside search-container */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f3f4f6;
    padding: 0 1rem;
    border-radius: 12px;
    height: 56px;
    /* Match others */
    min-height: 56px;
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    /* Prevent shrinking */
}

/* General Header Button Standard */
.header-btn {
    height: 56px;
    /* Match input height 56px */
    padding: 0 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    /* Don't shrink the profile/export area */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 0.5rem;
}

.bell-icon {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s;
}

.bell-icon:hover {
    color: var(--primary);
}

.header-btn:hover {
    border-color: var(--accent-cyan);
    background: #f9fafb;
    transform: translateY(-1px);
}

.header-btn i {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.tier-toggle:hover,
.tier-toggle:focus {
    background: #ffffff;
    border-color: var(--border-color);
    outline: none;
}

.selected-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    width: 16px;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.tier-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* The Popup Menu */
.tier-menu {
    position: absolute;
    top: 110%;
    left: 0;
    width: 260px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    background: white;
    z-index: 50;
    padding: 0.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tier-menu.hidden {
    display: none;
}

/* Individual Options */
.tier-option {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
}

.tier-option:hover {
    background: #f3f4f6;
}

.tier-option.active {
    background: #f0fdf4;
    /* Light green tint */
}

.tier-option.active .opt-title {
    color: var(--accent-lime);
}

.opt-title {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.opt-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}




.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.secondary-btn i {
    width: 18px;
    height: 18px;
}

/* View Titles - Added to fix overlap */
.view-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 3rem;
    /* Increase gap to prevent card overlap */
    color: var(--text-primary);
    display: block;
    position: relative;
    z-index: 5;
    padding-top: 1rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.wide-card {
    grid-column: span 2;
}

@media (max-width: 1400px) {

    /* At higher zoom or smaller screens, hide labels to save space */
    .tier-label {
        display: none;
    }

    .search-container {
        min-width: 250px;
    }
}

@media (max-width: 1300px) {

    .logo-text,
    #scan-btn span,
    #scan-btn i {
        display: none;
    }

    #scan-btn::after {
        content: 'Scan';
    }

    #scan-btn {
        padding: 0 1rem;
        min-width: 60px;
    }

    .header-actions span {
        display: none;
    }

    /* Hide Export Report text, keep icon */
    #export-btn span {
        display: none;
    }

    #export-btn {
        padding: 0 1rem;
        min-width: 56px;
        justify-content: center;
    }

    #export-btn i {
        margin: 0;
    }

    /* Make top-bar wrap more aggressively */
    .top-bar {
        gap: 0.75rem;
    }
}

@media (max-width: 1150px) {

    /* Force wrapping at this breakpoint */
    .top-bar {
        flex-wrap: wrap;
    }

    .search-container {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 100%;
        margin-bottom: 0.75rem;
    }

    #depth-dropdown {
        order: 3;
    }

    .header-right {
        order: 4;
        margin-left: auto;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-column: span 1;
    }
}

/* Audit Table */
.audit-table-container {
    overflow-x: auto;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.audit-table th {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.audit-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.stat-passing {
    color: var(--accent-lime);
    font-weight: 700;
    font-size: 0.9rem;
}

.stat-failing {
    color: #f87171;
    font-weight: 700;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-pass {
    background: rgba(163, 230, 53, 0.15);
    color: var(--accent-lime);
}

.status-fail {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    transform: translateY(0);
}

.card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Score Card */
.score-container {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-labels {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
    max-width: 200px;
    padding: 0 10px;
}

.score-value {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 150px;
}

/* Auto-Fix Items */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ai-badge {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-violet);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.fix-item {
    background: #f9fafb;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.fix-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.fix-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.impact-tag {
    font-size: 0.75rem;
    font-weight: 700;
}

.high {
    color: #f87171;
}

/* Code and Data Elements */
.code-block {
    background: #0f172a;
    /* Darker blue/black for code blocks */
    padding: 0.75rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
    overflow-x: auto;
    border: 1px solid #1e293b;
}

#url-input {
    font-family: 'JetBrains Mono', monospace;
}

.stat-value,
.score-value {
    /* Ensuring numbers look technical */
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -1px;
}

.fix-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.fix-btn:hover {
    background: white;
    color: black;
}

.primary-btn {
    width: 100%;
    background: var(--accent-cyan);
    border: none;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(249, 115, 22, 0.4);
}

.primary-btn i {
    width: 20px;
    height: 20px;
}


/* --- Overlay System (Consolidated) --- */
.scan-overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    text-align: center;
    opacity: 1;
}

.scan-overlay {
    background: rgba(255, 255, 255, 0.95);
    z-index: 5000;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    /* Always on top */
}

.scan-overlay.hidden,
.modal-overlay.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

.scan-overlay p {
    color: var(--text-primary);
    margin-top: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 2rem;
    animation: loaderPulse 1.5s infinite ease-in-out;
}

@keyframes loaderPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes bounce {

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

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

.placeholder-text {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-style: italic;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-violet);
}

/* View Management - AGGRESSIVE OVERRIDE */
.view-section {
    display: none !important;
    animation: none;
    opacity: 0 !important;
    visibility: hidden !important;
}

.view-section.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

/* Force visibility at ALL screen sizes */
@media (min-width: 1px) {
    .view-section.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .view-section.active * {
        visibility: visible !important;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        text-shadow: 0 0 10px var(--accent-violet);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}

.narrative-text {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.2px;
}

@keyframes layoutFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Keyword Laboratory View */
.keyword-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
}

/* Backlink Scout View */
.backlink-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
}

.mini-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.mini-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

.mini-value.danger {
    color: #f87171;
}

.chart-box {
    height: 300px;
    position: relative;
}

.primary-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
}

.primary-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.badge {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 0.5rem;
}

.badge.ai-badge {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
    color: white;
}

/* Profile Trigger & Avatar is handled in the unified block above */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}



.modal-content {
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-cyan);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: white;
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.print-only {
    display: none;
}

/* --- Print & Export Optimization --- */
@media print {
    .print-only {
        display: block !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .sidebar,
    .top-bar,
    .modal-overlay,
    .scan-overlay {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .view-section {
        display: block !important;
        opacity: 1 !important;
        page-break-after: always;
    }

    .card {
        background: white !important;
        border: 1px solid #ddd !important;
        color: black !important;
        opacity: 1 !important;
        transform: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 2rem !important;
    }

    canvas {
        max-width: 100% !important;
    }

    .badge,
    .impact-tag {
        border: 1px solid #333 !important;
        color: black !important;
    }

    .glass {
        backdrop-filter: none !important;
        background: white !important;
    }
}

/* NEURAL NARRATIVE - FINAL CLEAN STYLE */
#neural-narrative-content {
    color: #111827 !important;
    /* Force Black */
    background-color: #f3f4f6 !important;
    /* Light Grey Background */
    border: 1px solid #e5e7eb !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    font-size: 1.1rem !important;
    min-height: 60px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Hide toggle by default (Desktop) */
.mobile-menu-btn {
    display: none;
}

/* =========================================
   MOBILE RESPONSIVENESS & MEDIA QUERIES
   ========================================= */

/* Consolidated Mobile Responsiveness */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
        visibility: visible;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        height: 100vh;
        overflow-y: auto;
    }

    .top-bar {
        position: sticky;
        top: -1rem;
        /* Absorb padding */
        background: var(--bg-panel);
        z-index: 100;
        padding: 1rem 0;
        margin: -1rem 0 1.5rem 0;
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        color: var(--text-primary);
        position: absolute;
        top: 1rem;
        left: 0;
    }

    .header-right {
        order: -1;
        width: 100%;
        justify-content: flex-end;
        padding-left: 54px;
        /* Space for menu btn */
        min-height: 44px;
    }

    .search-container {
        flex-direction: column;
        width: 100%;
        max-width: none;
        gap: 0.75rem;
    }

    .tier-toggle {
        margin-left: 0 !important;
        width: 100%;
        height: 50px;
    }

    #url-input,
    #scan-btn {
        width: 100%;
        height: 50px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wide-card,
    .tall-card {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 1.25rem;
    }

    .score-value {
        font-size: 2.5rem;
    }

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

    /* Adjust charts height */
    .radar-container,
    .impact-container {
        height: 250px !important;
    }

    /* Adjust Tables */
    .audit-table th,
    .audit-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .audit-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .view-title {
        font-size: 1.5rem;
    }

    #scan-btn,
    #url-input,
    .tier-toggle,
    .header-btn {
        height: 48px;
        min-height: 48px;
        font-size: 0.9rem;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }
}

/* Searching Animation for Radar & Cards */
@keyframes scanning {
    0% {
        transform: scale(0.9);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.1;
    }
}

@keyframes rotate-scan {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse-border {
    0% {
        border-color: var(--border-color);
        box-shadow: 0 0 0 rgba(249, 115, 22, 0);
    }

    50% {
        border-color: var(--accent-cyan);
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
    }

    100% {
        border-color: var(--border-color);
        box-shadow: 0 0 0 rgba(249, 115, 22, 0);
    }
}

.radar-container {
    position: relative;
    overflow: hidden;
    height: 320px;
}

/* Full Card Searching State */
.card.searching {
    animation: pulse-border 2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.card.searching::after {
    content: 'ANALYZING ENTITIES...';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    animation: pulse 1s infinite;
    z-index: 10;
}

.radar-container.searching::before,
.card.searching .radar-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: scanning 2s infinite ease-in-out;
    pointer-events: none;
    z-index: 5;
    opacity: 0.2;
}

.radar-container.searching::after,
.card.searching .radar-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: rotate-scan 3s infinite linear;
    z-index: 6;
    pointer-events: none;
    opacity: 0.5;
}

.card.searching canvas,
.card.searching .audit-table-container {
    filter: blur(2px) grayscale(0.5);
    opacity: 0.3;
    transition: all 0.5s ease;
}

/* Loading Animations */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: simple-spin 0.6s linear infinite;
}

@keyframes simple-spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Feature Gating */
.premium-locked-section {
    position: relative;
    pointer-events: none;
}

.premium-locked-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-main, #0f172a);
    z-index: 100;
    border-radius: inherit;
}

.premium-locked-section::after {
    content: 'NEURAL MATRIX LOCKED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    background: var(--accent-violet);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-premium {
    position: relative;
}

.nav-premium .badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-violet);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Performance & Smoothness */
.card {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.main-content {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* High Performance Staggered Animations */
.animate-in {
    animation: fadeInUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 1 !important;
    /* Fallback if animation fails */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI Refiner Focus States */
#refiner-input:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

#refiner-input::placeholder {
    color: #64748b;
    opacity: 0.6;
}

/* --- Implementation Hub Horizontal Scroll --- */
.patch-slider {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) transparent;
}

.patch-slider::-webkit-scrollbar {
    height: 6px;
}

.patch-slider::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 10px;
}

.patch-card {
    min-width: 450px;
    max-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    height: auto !important;
}

@media (max-width: 768px) {
    .patch-card {
        min-width: 100%;
    }
}

.patch-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.patch-tab {
    padding: 0.5rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}

.patch-tab.active {
    color: var(--text-primary);
}

.patch-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-cyan);
}

.patch-code-view,
.patch-preview-view {
    display: none;
}

.patch-code-view.active,
.patch-preview-view.active {
    display: block;
}

.patch-preview-container {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    color: #333;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 200px;
    overflow-y: auto;
}

/* Patch Hub Code Block Contrast Fix */
.patch-code-view {
    background: #0f172a !important;
    /* Deep solid navy for maximum contrast */
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #1e293b;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.patch-code-view pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    margin: 0;
}

/* Syntax Color Boost */
#patch-schema {
    color: #4ade80 !important;
}

/* Neon Green */
#patch-meta {
    color: #f472b6 !important;
}

/* Hot Pink */
#patch-robots {
    color: #fbbf24 !important;
}

/* Amber */
#patch-canonical {
    color: #60a5fa !important;
}

/* Sky Blue */
#patch-images {
    color: #a78bfa !important;
}

/* Soft Violet */
#patch-links {
    color: #2dd4bf !important;
}

/* Teal */
#patch-js {
    color: #f8fafc !important;
}

/* Clean White */

/* Logic for staggering cards */
.view-section.active .card:nth-child(1) {
    animation-delay: 0.05s;
}

.view-section.active .card:nth-child(2) {
    animation-delay: 0.10s;
}

.view-section.active .card:nth-child(3) {
    animation-delay: 0.15s;
}

.view-section.active .card:nth-child(4) {
    animation-delay: 0.20s;
}

.view-section.active .card:nth-child(5) {
    animation-delay: 0.25s;
}

/* Mobile Specific Polish (Phones) */
@media (max-width: 480px) {
    .view-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .top-bar {
        padding: 0.75rem 0;
        gap: 0.75rem;
    }

    .header-right {
        padding-left: 50px;
    }

    .avatar {
        width: 36px;
        height: 36px;
    }

    #scan-btn,
    #url-input,
    .tier-toggle {
        height: 48px;
        font-size: 0.85rem;
    }

    .primary-btn,
    .secondary-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .quick-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .header-btn span {
        display: none;
    }
}

.patch-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-width: 450px;
    flex-shrink: 0;
    scroll-snap-align: start;
    height: auto !important;
}

.patch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.copy-btn {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(34, 211, 238, 0.2) !important;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

#patches-view .code-block {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) transparent;
}

#patches-view pre::-webkit-scrollbar {
    height: 6px;
}

#patches-view pre::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 3px;
}

/* Responsive Grid Fixes - Ensure all tabs stack on mobile */
@media (max-width: 1024px) {

    .dashboard-grid,
    .keyword-grid,
    .backlink-stats-row {
        grid-template-columns: 1fr !important;
    }
}

/* SGE Simulation Styling */
.sge-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.sge-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

#neural-container {
    animation: simFadeIn 0.5s ease-out;
}

@keyframes simFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glass Gate - Section Locking */
.view-section {
    position: relative;
    transition: filter 0.3s ease;
}

/* Executive Overview - Selective Locking */
body.tier-free .dashboard-locked-section {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

body.tier-free .dashboard-locked-section>*:not(.lock-overlay) {
    filter: blur(20px) saturate(1.5);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

body.tier-free .dashboard-locked-section .lock-overlay {
    display: flex;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
}

/* IRON GATE - Server-side Tier Enforcement */
body.tier-free #war-room-view,
body.tier-free #keywords-view,
body.tier-free #links-view,
body.tier-free #neural-view,
body.tier-free #growth-view,
body.tier-free #patches-view,
body.tier-free #refine-view,
body.tier-free #neural-sim-view,
body.tier-free #schema-view,
body.tier-free #social-view,
body.tier-free #p-seo-view {
    display: none !important;
}

/* Sidebar Dimming for Free Users */
body.tier-free .nav-premium {
    opacity: 0.6;
    filter: grayscale(0.8);
}

.view-section.locked>*:not(.lock-overlay) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(2px);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.view-section.locked .lock-overlay {
    display: flex;
}

.lock-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
    animation: lockSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes lockSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lock-card i {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.lock-card h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.lock-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.lock-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    font-size: 1rem;
}

.lock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.4);
}

/* Premium Lock Gate Styles */
.premium-lock-gate {
    text-align: center;
    padding: 5rem 2rem;
    border: 2px dashed var(--accent-violet);
    background: rgba(10, 10, 20, 0.4);
    backdrop-filter: blur(12px);
    color: white;
    border-radius: 16px;
    margin: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    color: var(--accent-violet);
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.lock-title {
    color: white;
    margin-bottom: 1.25rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lock-description {
    color: rgba(255, 255, 255, 0.7);
    max-width: 550px;
    margin: 0 auto 3rem;
    font-size: 1.15rem;
    line-height: 1.6;
}

.lock-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lock-actions button {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    white-space: nowrap;
}

/* Mobile Adjustments for Premium Lock */
@media (max-width: 768px) {
    .premium-lock-gate {
        padding: 3rem 1.5rem;
        margin: 1rem;
    }

    .lock-icon {
        font-size: 3.5rem;
        margin-bottom: 1.5rem;
    }

    .lock-title {
        font-size: 1.75rem;
    }

    .lock-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .lock-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .lock-actions button {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .premium-lock-gate {
        padding: 2.5rem 1rem;
    }

    .lock-title {
        font-size: 1.5rem;
    }
}

/* Premium Toast Notifications */
.nexus-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexus-toast.active {
    transform: translateY(0);
    opacity: 1;
}

.nexus-toast.error {
    border-left: 4px solid #f87171;
}

.nexus-toast.success {
    border-left: 4px solid var(--accent-lime);
}

.nexus-toast i {
    width: 20px;
    height: 20px;
}

.nexus-toast .toast-content {
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- NEXUS VIBE SYSTEM --- */

/* 1. Neural Glow for AI Items */
.nav-links li[data-tier="advanced"] i {
    filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.4));
    animation: neural-pulse 3s infinite ease-in-out;
}

@keyframes neural-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(249, 115, 22, 0.2));
        opacity: 0.8;
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.6));
        opacity: 1;
    }
}

/* 2. Logo Shimmer */
.logo {
    position: relative;
    overflow: hidden;
}

.logo::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transform: rotate(45deg);
    animation: logo-shimmer 6s infinite;
}

@keyframes logo-shimmer {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

/* 3. Card Vibe Refinement */
.card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(249, 115, 22, 0.03), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* 4. Tier Specific Visual Cues */
.nav-links li[data-tier="advanced"] {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.05) 0%, transparent 100%);
    border-left: 3px solid rgba(249, 115, 22, 0.3) !important;
}

.nav-links li[data-tier="pro"] {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    border-left: 3px solid rgba(99, 102, 241, 0.2) !important;
}

/* 5. Smooth Tab Transitions */
.view-section {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateY(10px);
}

.view-section.active {
    transform: translateY(0);
}

/* 6. Advanced Scan Pulse */
.scanning-active #scan-btn {
    animation: scan-pulse-btn 1.5s infinite;
}

@keyframes scan-pulse-btn {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}