/* ============ typography-qa-lab.css - Typography QA Lab Styles ============ */
/* ============ RESET & VARIABLES - STUDIO DARK THEME ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background: #0B0D10;
    color: #E9EEF5;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(64, 224, 255, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(64, 224, 255, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 40% 80%, rgba(39, 49, 64, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 80px;
    transition: padding 0.3s ease;
}

main.zen-mode {
    padding-top: 60px;
}

:root {
    --primary: #40E0FF;
    --primary-dark: #00B8D4;
    --primary-light: rgba(64, 224, 255, 0.15);
    --primary-glow: rgba(64, 224, 255, 0.25);
    --secondary: #40E0FF;
    --accent: #00B8D4;
    --warning: #FFB74D;
    --danger: #FF5252;
    --success: #4CAF50;
    --info: #40E0FF;
    --surface-0: #0B0D10;
    --surface-1: #151A21;
    --surface-2: #1E2630;
    --surface-3: #273140;
    --text-primary: #E9EEF5;
    --text-secondary: #C0C8D2;
    --text-tertiary: #9AA5B5;
    --text-muted: #6B7A8F;
    --border: #273140;
    --border-strong: #3A4A60;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px var(--primary-glow);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --cyan-gradient: linear-gradient(135deg, #40E0FF, #00B8D4);
}

/* ============ TOOLTIP STYLES ============ */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: #1E2630;
    color: #E9EEF5;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 20px;
    border: 1px solid #273140;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* ============ UTILITY CLASSES ============ */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

@media (min-width: 640px) {
    .container { padding: 0 24px; }
}

.gradient-text {
    background: var(--cyan-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============ SKIP TO CONTENT ============ */
.skip-to-content {
    position: absolute;
    top: -60px;
    left: 0;
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 10px 20px;
    z-index: 10001;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    font-size: 0.875rem;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============ HEADER STYLES ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
    background: rgba(11, 13, 16, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #273140;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    padding: 4px 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--cyan-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(64, 224, 255, 0.3);
    transition: var(--transition);
}

.logo-link:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 30px rgba(64, 224, 255, 0.5);
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #E9EEF5;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.brand-name span {
    color: #40E0FF;
    font-weight: 800;
    position: relative;
}

.brand-name span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan-gradient);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.logo-link:hover .brand-name span::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============ DESKTOP NAVIGATION ============ */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: center;
    margin: 0 auto;
    padding: 4px 8px;
    background: rgba(21, 26, 33, 0.6);
    border-radius: 60px;
    border: 1px solid #273140;
    backdrop-filter: blur(8px);
}

@media (max-width: 1200px) {
    .nav-desktop { display: none; }
}

.nav-link {
    color: #9AA5B5;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.nav-link i {
    font-size: 0.8rem;
    color: #6B7A8F;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #40E0FF;
    background: rgba(64, 224, 255, 0.1);
    border-color: rgba(64, 224, 255, 0.2);
    transform: translateY(-1px);
}

.nav-link:hover i {
    color: #40E0FF;
    transform: scale(1.1);
}

.nav-link.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}

.nav-link.active i {
    color: #0B0D10;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #151A21;
    border-radius: 16px;
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #273140;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #9AA5B5;
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dropdown-menu a i {
    width: 18px;
    color: #40E0FF;
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: rgba(64, 224, 255, 0.1);
    color: #40E0FF;
    transform: translateX(4px);
}

.dropdown-menu a.active {
    background: rgba(64, 224, 255, 0.15);
    color: #40E0FF;
    font-weight: 600;
}

.dropdown-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #40E0FF;
    padding: 8px 12px 4px;
    margin-top: 4px;
    border-bottom: 1px solid #273140;
}

.dropdown-group-title:first-of-type {
    margin-top: 0;
}

.new-badge {
    margin-left: auto;
    font-size: 0.55rem;
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* ============ ACTION BUTTONS ============ */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #1E2630;
    border: 1px solid #273140;
    color: #E9EEF5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
    height: 44px;
}

.auth-btn i {
    font-size: 0.8rem;
    color: #40E0FF;
}

.auth-btn:hover {
    background: var(--cyan-gradient);
    border-color: transparent;
    color: #0B0D10;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}

/* Ko-fi Button */
.kofi-link {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid #273140;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: visible;
    text-decoration: none;
}

.kofi-link:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #40E0FF;
    background: var(--cyan-gradient);
    box-shadow: 0 5px 20px rgba(64, 224, 255, 0.4);
}

.coffee-cup {
    position: relative;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cup-body {
    position: relative;
    width: 18px;
    height: 16px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: cupFill 2s ease-in-out infinite alternate;
}

.cup-body::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 12px;
    background: linear-gradient(135deg, #FFE55C, #FFB347);
    border-radius: 0 0 6px 6px;
    opacity: 0.8;
}

.cup-handle {
    position: absolute;
    top: 2px;
    right: -5px;
    width: 5px;
    height: 8px;
    border: 2px solid #FFD700;
    border-left: none;
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
}

.coffee-liquid {
    position: absolute;
    top: -2px;
    left: 2px;
    width: 14px;
    height: 3px;
    background: linear-gradient(90deg, #8B4513, #A0522D);
    border-radius: 2px;
    animation: liquidWave 2s ease-in-out infinite;
}

.coffee-steam {
    position: absolute;
    top: -8px;
    left: 5px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kofi-link:hover .coffee-steam { opacity: 1; }

.coffee-steam span {
    width: 2px;
    height: 8px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 1px;
    animation: steam 1.5s ease-in-out infinite;
}

.coffee-steam span:nth-child(1) { animation-delay: 0s; }
.coffee-steam span:nth-child(2) { animation-delay: 0.3s; }
.coffee-steam span:nth-child(3) { animation-delay: 0.6s; }

.kofi-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--cyan-gradient);
    color: #0B0D10;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 5px 15px rgba(64, 224, 255, 0.4);
    pointer-events: none;
    z-index: 10;
}

.kofi-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: #40E0FF;
    border-radius: 2px;
}

.kofi-link:hover .kofi-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
    transform: translateX(-50%) scale(1);
}

@keyframes cupFill {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(1.05); }
}

@keyframes liquidWave {
    0%, 100% { transform: translateX(0) scaleX(1); }
    25% { transform: translateX(1px) scaleX(1.05); }
    75% { transform: translateX(-1px) scaleX(0.95); }
}

@keyframes steam {
    0% { transform: translateY(0) scaleX(1); opacity: 0.8; }
    50% { transform: translateY(-5px) scaleX(1.5); opacity: 0.4; }
    100% { transform: translateY(-10px) scaleX(2); opacity: 0; }
}

/* ============ MOBILE MENU ============ */
.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid #273140;
    display: none;
    align-items: center;
    justify-content: center;
    color: #40E0FF;
    transition: var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-menu-btn i { font-size: 1.1rem; }

.mobile-menu-btn:hover {
    background: var(--cyan-gradient);
    color: #0B0D10;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(64, 224, 255, 0.3);
}

@media (max-width: 1200px) {
    .mobile-menu-btn { display: flex; }
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #151A21;
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    border-left: 1px solid #273140;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active { right: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid #273140;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #40E0FF;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--cyan-gradient);
    color: #0B0D10;
    transform: rotate(90deg);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #9AA5B5;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: var(--transition);
}

.mobile-nav-link i {
    width: 20px;
    color: #40E0FF;
}

.mobile-nav-link:hover {
    background: rgba(64, 224, 255, 0.1);
    color: #40E0FF;
    transform: translateX(5px);
}

.mobile-nav-link.active {
    background: rgba(64, 224, 255, 0.15);
    color: #40E0FF;
    font-weight: 600;
}

.mobile-divider {
    height: 1px;
    background: #273140;
    margin: 16px 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .header-container { padding: 10px 16px; }
    .brand-name { font-size: 1.1rem; }
    .logo-icon { width: 36px; height: 36px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .header-container { padding: 8px 12px; }
    .brand-name { font-size: 1rem; }
    .logo-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .kofi-link { width: 40px; height: 40px; }
    .mobile-menu-btn { width: 40px; height: 40px; }
    .mobile-menu { width: 280px; }
}

/* ============ ZEN MODE TOGGLE ============ */
.zen-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #151A21;
    border: 1px solid #273140;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.zen-toggle:hover {
    transform: scale(1.1);
    border-color: #40E0FF;
    background: var(--cyan-gradient);
    box-shadow: var(--shadow-glow);
}

.zen-toggle i {
    color: #40E0FF;
    font-size: 1.2rem;
    transition: var(--transition);
}

.zen-toggle:hover i {
    color: #0B0D10;
}

.dashboard-grid.zen-active .font-panel,
.dashboard-grid.zen-active .metrics-panel {
    display: none;
}

.dashboard-grid.zen-active .test-panel {
    grid-column: 1 / -1;
    max-width: 900px;
    margin: 0 auto;
}

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(64, 224, 255, 0.1);
    border: 1px solid #273140;
    padding: 5px 12px;
    border-radius: 60px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #40E0FF;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #E9EEF5;
}

.page-description {
    font-size: 1rem;
    color: #9AA5B5;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.qa-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(64, 224, 255, 0.1);
    border: 1px solid #273140;
    padding: 6px 16px;
    border-radius: 60px;
    font-size: 0.8rem;
    color: #40E0FF;
    margin-top: 16px;
}

/* ============ DASHBOARD GRID ============ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr 340px;
    gap: 20px;
    margin-top: 24px;
    transition: all 0.3s ease;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr 300px;
        gap: 16px;
    }
}

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

/* ============ FONT PANEL ============ */
.font-panel {
    background: #151A21;
    backdrop-filter: blur(12px);
    border: 1px solid #273140;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #E9EEF5;
}

.panel-title i {
    color: #40E0FF;
}

.font-count {
    background: #1E2630;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #40E0FF;
}

.search-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7A8F;
    font-size: 0.8rem;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 36px;
    border-radius: 40px;
    border: 1px solid #273140;
    background: #1E2630;
    color: #E9EEF5;
    font-size: 0.85rem;
}

.search-input:focus {
    outline: none;
    border-color: #40E0FF;
    box-shadow: 0 0 0 3px rgba(64, 224, 255, 0.2);
}

.category-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.category-chip {
    padding: 4px 10px;
    border-radius: 30px;
    background: #1E2630;
    border: 1px solid #273140;
    color: #9AA5B5;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
    min-height: 30px;
}

.category-chip:hover {
    background: rgba(64, 224, 255, 0.15);
    color: #40E0FF;
    border-color: #40E0FF;
}

.category-chip.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
    border-color: transparent;
}

.font-list-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #273140;
    border-radius: var(--radius-md);
    background: #1E2630;
    margin-bottom: 16px;
}

.font-list-container::-webkit-scrollbar {
    width: 6px;
}

.font-list-container::-webkit-scrollbar-track {
    background: #151A21;
    border-radius: 3px;
}

.font-list-container::-webkit-scrollbar-thumb {
    background: #40E0FF;
    border-radius: 3px;
}

.font-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #273140;
    transition: var(--transition);
    cursor: pointer;
}

.font-item:last-child {
    border-bottom: none;
}

.font-item:hover {
    background: rgba(64, 224, 255, 0.1);
}

.font-item.selected {
    background: rgba(64, 224, 255, 0.15);
    border-left: 3px solid #40E0FF;
}

.font-info {
    flex: 1;
}

.font-name {
    font-weight: 600;
    color: #E9EEF5;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.font-meta {
    display: flex;
    gap: 8px;
    font-size: 0.6rem;
    color: #6B7A8F;
}

.font-category {
    background: #151A21;
    padding: 2px 6px;
    border-radius: 10px;
}

.font-variable-badge {
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 2px 6px;
    border-radius: 10px;
}

.font-actions {
    display: flex;
    gap: 6px;
}

.font-download-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #151A21;
    border: 1px solid #273140;
    color: #9AA5B5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
}

.font-download-btn:hover {
    background: #40E0FF;
    color: #0B0D10;
    border-color: transparent;
    transform: scale(1.1);
}

.load-more {
    text-align: center;
    padding: 10px;
    color: #40E0FF;
    font-size: 0.75rem;
    cursor: pointer;
}

.load-more:hover {
    text-decoration: underline;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #40E0FF;
    gap: 10px;
}

/* ============ UPLOAD SECTION ============ */
.upload-section {
    padding: 16px;
    background: #1E2630;
    border: 1px dashed #273140;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
}

.upload-section:hover {
    border-color: #40E0FF;
    background: rgba(64, 224, 255, 0.1);
}

.upload-section.dragover {
    border-color: #40E0FF;
    background: rgba(64, 224, 255, 0.15);
}

.upload-icon {
    font-size: 1.5rem;
    color: #40E0FF;
    margin-bottom: 6px;
}

.upload-text {
    font-size: 0.75rem;
    color: #9AA5B5;
}

.upload-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
    font-size: 0.6rem;
    color: #6B7A8F;
    margin-top: 4px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #151A21;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.file-name {
    flex: 1;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clear-file {
    color: #FF5252;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255, 82, 82, 0.1);
    transition: var(--transition);
}

.clear-file:hover {
    background: #FF5252;
    color: #0B0D10;
}

.active-font-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1E2630;
    padding: 8px 12px;
    border-radius: 40px;
    border: 1px solid #273140;
    margin-top: 12px;
    font-size: 0.8rem;
}

.active-font-name {
    font-weight: 600;
}

.active-font-source {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: rgba(64, 224, 255, 0.15);
    border-radius: 20px;
    color: #40E0FF;
}

/* ============ TEST PANEL ============ */
.test-panel {
    background: #151A21;
    backdrop-filter: blur(12px);
    border: 1px solid #273140;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.test-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.test-title i {
    color: #40E0FF;
}

.weight-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1E2630;
    padding: 4px 12px;
    border-radius: 40px;
    border: 1px solid #273140;
}

.weight-slider input {
    width: 80px;
    height: 4px;
    accent-color: #40E0FF;
}

/* ============ TEST TABS ============ */
.test-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #273140;
    padding-bottom: 12px;
}

.test-tab {
    background: transparent;
    border: none;
    color: #9AA5B5;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
}

.test-tab:hover {
    background: rgba(64, 224, 255, 0.15);
    color: #40E0FF;
}

.test-tab.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
}

.test-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.test-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ LANGUAGE TESTS ============ */
.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

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

.language-card {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid #273140;
}

.language-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.language-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.language-name i {
    color: #40E0FF;
}

.language-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

.language-status.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.language-status.warn {
    background: rgba(255, 183, 77, 0.2);
    color: #FFB74D;
}

.language-status.fail {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

.language-sample {
    font-size: 0.9rem;
    padding: 8px;
    background: #151A21;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    word-break: break-all;
    border: 1px solid #273140;
}

.language-sample.german {
    font-size: 0.8rem;
}

.language-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #6B7A8F;
    margin-bottom: 4px;
}

.missing-glyphs {
    color: #FF5252;
    font-size: 0.6rem;
    background: rgba(255, 82, 82, 0.1);
    padding: 4px 6px;
    border-radius: 12px;
    margin-top: 4px;
    word-break: break-word;
}

.missing-glyphs i {
    margin-right: 4px;
}

/* ============ CUSTOM TEST ============ */
.custom-test {
    margin-top: 20px;
}

.custom-test input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 40px;
    border: 1px solid #273140;
    background: #1E2630;
    color: #E9EEF5;
    font-size: 0.85rem;
}

.custom-test input:focus {
    outline: none;
    border-color: #40E0FF;
    box-shadow: 0 0 0 3px rgba(64, 224, 255, 0.2);
}

.custom-result {
    margin-top: 12px;
    padding: 12px;
    background: #1E2630;
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

/* ============ TUTORIAL SECTION ============ */
.tutorial-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.tutorial-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tutorial-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--cyan-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 0.8rem;
}

.tutorial-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.step {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.step-number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #40E0FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 0.6rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    font-size: 0.7rem;
    color: #9AA5B5;
}

.step-text strong {
    color: #E9EEF5;
    display: block;
    margin-bottom: 2px;
}

/* ============ PRO TIPS ============ */
.pro-tips {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #273140;
}

.pro-tips summary {
    cursor: pointer;
    color: #40E0FF;
    font-weight: 600;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pro-tips[open] summary i.fa-chevron-down {
    transform: rotate(180deg);
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.65rem;
    color: #C0C8D2;
}

.tip-item i {
    color: #4CAF50;
    font-size: 0.6rem;
}

.help-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
    font-size: 0.6rem;
    color: #6B7A8F;
}

.help-footer a {
    color: #6B7A8F;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-footer a:hover {
    color: #40E0FF;
}

/* ============ ACCESSIBILITY TEST ============ */
.legibility-controls {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.control-group {
    margin-bottom: 16px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    color: #9AA5B5;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.control-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #151A21;
    accent-color: #40E0FF;
}

.legibility-preview {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all 0.1s ease;
    border: 1px solid #273140;
}

.preview-text {
    font-size: 24px;
    margin-bottom: 16px;
    line-height: 1.4;
    font-weight: 500;
}

.preview-small {
    font-size: 12px;
    opacity: 0.9;
}

.legibility-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.score-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
}

.score-status-badge.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.score-status-badge.warn {
    background: rgba(255, 183, 77, 0.2);
    color: #FFB74D;
}

.score-status-badge.fail {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

.dyslexia-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

.dyslexia-badge.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.dyslexia-badge.fail {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

/* ============ COLOR BLINDNESS ============ */
.color-blindness-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.blindness-chip {
    padding: 6px 12px;
    border-radius: 30px;
    background: #151A21;
    border: 1px solid #273140;
    color: #9AA5B5;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
}

.blindness-chip:hover {
    background: rgba(64, 224, 255, 0.15);
    border-color: #40E0FF;
    color: #40E0FF;
}

.blindness-chip.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
    border-color: transparent;
}

/* ============ GHOST OVERLAY SECTION ============ */
.ghost-overlay-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.breaking-point-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(64, 224, 255, 0.1) 0px,
        rgba(64, 224, 255, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );
    pointer-events: none;
    animation: pulseOverlay 2s infinite;
}

@keyframes pulseOverlay {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

.breaking-point-highlight {
    position: absolute;
    background: rgba(64, 224, 255, 0.3);
    border-left: 2px solid #40E0FF;
    border-right: 2px solid #40E0FF;
    top: 0;
    bottom: 0;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background-color: rgba(64, 224, 255, 0.2); }
    50% { background-color: rgba(64, 224, 255, 0.4); }
    100% { background-color: rgba(64, 224, 255, 0.2); }
}

/* ============ CHARACTER SET ============ */
.charset-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #1E2630;
    border-radius: var(--radius-md);
}

.glyph-cell {
    aspect-ratio: 1;
    background: #151A21;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #E9EEF5;
    border: 1px solid #273140;
    transition: var(--transition);
}

.glyph-cell.missing {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
    border-color: #FF5252;
    position: relative;
}

.glyph-cell.missing::after {
    content: '?';
    position: absolute;
    font-size: 0.6rem;
    top: 2px;
    right: 2px;
    color: #FF5252;
}

.glyph-cell:hover {
    transform: scale(1.2);
    z-index: 10;
    border-color: #40E0FF;
}

.charset-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.summary-item {
    flex: 1;
    text-align: center;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #E9EEF5;
}

.summary-label {
    font-size: 0.6rem;
    color: #6B7A8F;
}

.symbols-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.symbol-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.symbol-badge.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.symbol-badge.fail {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

/* ============ GLYPH INSPECTOR ============ */
.glyph-inspector-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.glyph-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.glyph-search input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 40px;
    background: #1E2630;
    border: 1px solid #273140;
    color: #E9EEF5;
    font-size: 0.8rem;
}

.glyph-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #1E2630;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.glyph-item {
    aspect-ratio: 1;
    background: #151A21;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #E9EEF5;
    border: 1px solid #273140;
    cursor: pointer;
    transition: var(--transition);
}

.glyph-item:hover {
    transform: scale(1.2);
    border-color: #40E0FF;
    background: rgba(64, 224, 255, 0.15);
    z-index: 10;
}

.glyph-item.selected {
    border: 2px solid #40E0FF;
    background: rgba(64, 224, 255, 0.2);
}

.glyph-item.missing {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
    border-color: #FF5252;
    position: relative;
}

.glyph-item.missing::after {
    content: '?';
    position: absolute;
    font-size: 0.6rem;
    top: 2px;
    right: 2px;
    color: #FF5252;
}

.glyph-details-panel {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid #273140;
}

.glyph-preview-large {
    font-size: 72px;
    text-align: center;
    padding: 20px;
    background: #151A21;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid #273140;
}

.glyph-property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.glyph-property {
    background: #151A21;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #273140;
}

.glyph-property-label {
    font-size: 0.6rem;
    color: #6B7A8F;
    margin-bottom: 4px;
}

.glyph-property-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #E9EEF5;
    word-break: break-all;
}

.copy-btn {
    background: rgba(64, 224, 255, 0.15);
    border: 1px solid #273140;
    border-radius: 30px;
    padding: 4px 12px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
}

.copy-btn:hover {
    background: #40E0FF;
    color: #0B0D10;
}

/* ============ LAYOUT STRESS TEST ============ */
.overflow-test-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.breaking-point-container {
    position: relative;
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid #273140;
    overflow: hidden;
}

.breaking-point-metrics {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.breaking-metric {
    background: #1E2630;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #273140;
}

.breaking-metric.warning {
    border-color: #FFB74D;
}

.breaking-metric.danger {
    border-color: #FF5252;
}

.container-stress-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.stress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.stress-card {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid #273140;
    position: relative;
}

.stress-card.fixed-width {
    width: 250px;
}

.stress-card.overflowing {
    border-color: #FF5252;
    background: rgba(255, 82, 82, 0.05);
}

.stress-card.overflowing::after {
    content: '⚠️ OVERFLOW';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.5rem;
    color: #FF5252;
    background: rgba(0,0,0,0.7);
    padding: 2px 4px;
    border-radius: 4px;
}

.card-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #6B7A8F;
    margin-bottom: 8px;
}

.card-content {
    background: #151A21;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #273140;
    font-size: 14px;
    position: relative;
    overflow: visible;
}

.card-content.long-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-bar-demo {
    display: flex;
    gap: 8px;
    background: #151A21;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid #273140;
    flex-wrap: wrap;
    position: relative;
}

.nav-item {
    background: #1E2630;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    white-space: nowrap;
}

.nav-item.overflow-indicator,
.demo-button.overflow-indicator,
.form-input-demo.overflow-indicator {
    background: rgba(255, 82, 82, 0.8);
    border-color: #FF5252;
    color: #FFFFFF !important;
}

.button-group-demo {
    display: flex;
    gap: 4px;
    background: #151A21;
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid #273140;
    flex-wrap: wrap;
}

.demo-button {
    background: #1E2630;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 13px;
    border: 1px solid #273140;
    white-space: nowrap;
    cursor: default;
}

.form-input-demo {
    background: #151A21;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid #273140;
    width: 100%;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ PERFORMANCE SECTION ============ */
.performance-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.budget-meter {
    height: 30px;
    background: #1E2630;
    border-radius: 15px;
    overflow: hidden;
    margin: 12px 0;
    position: relative;
}

.budget-fill {
    height: 100%;
    background: var(--cyan-gradient);
    transition: width 0.3s ease;
}

.budget-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
}

.budget-marker {
    flex: 1;
    border-right: 1px dashed rgba(255,255,255,0.2);
}

.budget-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.7rem;
    color: #6B7A8F;
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.perf-metric {
    background: #1E2630;
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
}

.perf-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #E9EEF5;
}

.perf-label {
    font-size: 0.6rem;
    color: #6B7A8F;
}

.recommendation-engine {
    margin-top: 16px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
    position: relative;
}

.recommendation-engine.warning {
    background: rgba(255, 183, 77, 0.1);
}

.recommendation-engine.danger {
    background: rgba(255, 82, 82, 0.15);
}

.engine-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.engine-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #40E0FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 0.7rem;
}

.engine-title {
    font-weight: 600;
    font-size: 0.8rem;
}

.engine-message {
    font-size: 0.7rem;
    color: #9AA5B5;
    line-height: 1.5;
}

.engine-savings {
    margin-top: 8px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    display: flex;
    justify-content: space-between;
}

.savings-value {
    color: #4CAF50;
    font-weight: 600;
}

.subsetting-recommendation {
    background: #1E2630;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid #273140;
    font-size: 0.7rem;
    margin-top: 12px;
}

/* ============ RESPONSIVE TEST ============ */
.viewport-control {
    margin-bottom: 20px;
}

.responsive-preview {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid #273140;
    transition: width 0.3s ease;
    overflow-x: auto;
}

.responsive-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ============ DEEP SCAN SECTION ============ */
.deep-scan-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(64, 224, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid #273140;
}

.scan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.scan-item {
    background: #1E2630;
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid #273140;
}

.scan-label {
    font-size: 0.6rem;
    color: #6B7A8F;
    margin-bottom: 4px;
}

.scan-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #E9EEF5;
    word-break: break-word;
}

.variable-axis-list {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.axis-tag {
    background: #151A21;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    color: #9AA5B5;
    border: 1px solid #273140;
}

/* ============ METRICS PANEL ============ */
.metrics-panel {
    background: #151A21;
    backdrop-filter: blur(12px);
    border: 1px solid #273140;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.metrics-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.metrics-title i {
    color: #40E0FF;
}

.live-badge {
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.6rem;
}

.score-card {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #273140;
}

.score-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(#40E0FF 0deg calc(3.6deg * var(--overall-score, 84)), #1E2630 calc(3.6deg * var(--overall-score, 84)) 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #151A21;
}

.score-number {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: #E9EEF5;
}

.score-info {
    flex: 1;
}

.score-label {
    font-size: 0.65rem;
    color: #6B7A8F;
    margin-bottom: 2px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-item {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid #273140;
}

.metric-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(64, 224, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    color: #40E0FF;
}

.metric-name {
    font-size: 0.6rem;
    color: #6B7A8F;
    margin-bottom: 2px;
}

.metric-value {
    font-size: 1rem;
    font-weight: 600;
}

.metric-desc {
    font-size: 0.55rem;
    color: #6B7A8F;
}

.compliance-list {
    background: #1E2630;
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 20px;
}

.compliance-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #273140;
}

.compliance-item:last-child {
    border-bottom: none;
}

.compliance-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
}

.compliance-icon.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.compliance-icon.warn {
    background: rgba(255, 183, 77, 0.2);
    color: #FFB74D;
}

.compliance-icon.fail {
    background: rgba(255, 82, 82, 0.2);
    color: #FF5252;
}

.compliance-content {
    flex: 1;
}

.compliance-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.compliance-desc {
    font-size: 0.6rem;
    color: #6B7A8F;
}

/* ============ EXPORT SECTION ============ */
.export-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.export-btn {
    background: rgba(64, 224, 255, 0.1);
    border: 1px solid #273140;
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: #E9EEF5;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.export-btn:hover {
    background: var(--cyan-gradient);
    transform: translateY(-2px);
    color: #0B0D10;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.export-btn:hover i {
    color: #0B0D10;
}

.export-btn i {
    font-size: 1rem;
    color: #40E0FF;
    margin-bottom: 2px;
}

.export-label {
    font-size: 0.65rem;
    font-weight: 600;
}

.recommendation-box {
    padding: 16px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: flex;
    gap: 12px;
}

.recommendation-box i {
    color: #4CAF50;
    font-size: 1.2rem;
}

.recommendation-text {
    font-size: 0.75rem;
    color: #9AA5B5;
    line-height: 1.5;
}

.recommendation-text strong {
    color: #E9EEF5;
    display: block;
    margin-bottom: 4px;
}

/* ============ ENTERPRISE FEATURES ============ */
.enterprise-section {
    margin-top: 40px;
    padding: 24px;
    background: #1E2630;
    border-radius: var(--radius-lg);
    border: 1px solid #273140;
}

.qa-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 40px 0 20px;
}

@media (max-width: 900px) {
    .qa-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .qa-features {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: #151A21;
    border: 1px solid #273140;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--cyan-gradient);
    opacity: 0.5;
    transition: var(--transition);
}

.feature-card:hover::after {
    opacity: 1;
    height: 4px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--cyan-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 1.4rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #E9EEF5;
    margin-bottom: 12px;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.9rem;
    color: #9AA5B5;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============ FAQ SECTION ============ */
.faq-section {
    margin: 40px 0 20px;
    padding: 24px;
    background: #1E2630;
    border-radius: var(--radius-lg);
    border: 1px solid #273140;
}

.faq-title {
    font-size: 1.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 8px;
    text-align: center;
}

.faq-subtitle {
    font-size: 0.9rem;
    color: #9AA5B5;
    text-align: center;
    margin-bottom: 32px;
}

.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #151A21;
    border: 1px solid #273140;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #E9EEF5;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(64, 224, 255, 0.05);
}

.faq-question i {
    color: #40E0FF;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: #C0C8D2;
    font-size: 0.9rem;
    line-height: 1.6;
    border-top: 1px solid #273140;
    margin-top: 0;
}

.faq-answer p {
    margin-top: 16px;
}

.faq-answer strong {
    color: #40E0FF;
    font-weight: 600;
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    background: linear-gradient(135deg, #FF5252, #D32F2F);
}

.toast.success {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}

.toast.warning {
    background: linear-gradient(135deg, #FFB74D, #F57C00);
}

.toast.info {
    background: linear-gradient(135deg, #40E0FF, #00B8D4);
}

/* ============ MINI UPLOAD COMPONENT ============ */
.mini-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: #151A21;
    border: 1px dashed #273140;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
}

.mini-upload:hover {
    border-color: #40E0FF;
    background: rgba(64, 224, 255, 0.1);
}

.mini-upload.dragover {
    border-color: #40E0FF;
    background: rgba(64, 224, 255, 0.15);
}

.mini-upload i {
    color: #40E0FF;
    font-size: 0.9rem;
}

.mini-upload .clear-file {
    background: rgba(255, 82, 82, 0.1);
    padding: 2px 6px;
    border-radius: 20px;
}

/* ============ ALPINE.JS CLOAK ============ */
[x-cloak] {
    display: none !important;
}

/* ============ DANGER CLASS ============ */
.danger {
    border-color: #FF5252 !important;
    background: rgba(255, 82, 82, 0.1) !important;
}

/* ============ RESPONSIVE FIXES ============ */
@media (max-width: 768px) {
    .enterprise-section {
        padding: 16px !important;
        margin-top: 20px !important;
    }
    
    .enterprise-section h2 {
        font-size: 1.3rem !important;
        margin-bottom: 16px !important;
    }
    
    .qa-features {
        gap: 12px !important;
    }
    
    .feature-card {
        padding: 20px 16px !important;
    }
    
    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
        margin-bottom: 12px !important;
    }
    
    .feature-card h3 {
        font-size: 1rem !important;
        margin-bottom: 6px !important;
    }
    
    .feature-card p {
        font-size: 0.75rem !important;
    }
    
    .faq-section {
        padding: 20px 16px !important;
        margin: 30px 0 20px !important;
    }
    
    .faq-title {
        font-size: 1.2rem !important;
    }
    
    .faq-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 20px !important;
    }
    
    .faq-question {
        padding: 14px 16px !important;
        font-size: 0.85rem !important;
    }
    
    .faq-answer {
        padding: 0 16px 16px 16px !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    .enterprise-section h2 {
        font-size: 1.1rem !important;
    }
    
    .feature-card {
        padding: 16px 12px !important;
    }
    
    .feature-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
    }
    
    .feature-card h3 {
        font-size: 0.9rem !important;
    }
    
    .feature-card p {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 360px) {
    .enterprise-section h2 {
        font-size: 1rem !important;
    }
}

/* ============ SAFE AREA SUPPORT ============ */
@supports (padding: max(0px)) {
    .header-container,
    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

@media (display-mode: standalone) {
    .header {
        padding-top: env(titlebar-area-inset-top, 12px);
        -webkit-app-region: drag;
    }
    
    .header .logo-link,
    .header .nav-link,
    .header .action-buttons button,
    .header .action-buttons a,
    .header .mobile-menu-btn,
    .kofi-link {
        -webkit-app-region: no-drag;
    }
    
    body {
        padding-top: 0;
    }
}
/* Mobile tap target fix */
@media (max-width: 768px) {
    button, .btn, [role="button"], input[type="submit"], input[type="button"],
    .fp-aff-btn, .newsletter-button, .font-cta-btn, .font-sel-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Responsive images */
img { max-width: 100%; height: auto; }
