/**
 * ConvMaster - Main Stylesheet
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   CSS VARIABLES - DARK THEME (Default)
   ===================================================== */
:root,
[data-theme="dark"] {
    --primary: #0066FF;
    --primary-dark: #0047B3;
    --primary-light: #3B82F6;
    --success: #10B981;
    --success-dark: #0D9668;
    --warning: #F59E0B;
    --danger: #EF4444;
    --purple: #8B5CF6;
    --pink: #EC4899;
    --cyan: #06B6D4;
    --orange: #F97316;
    --indigo: #6366F1;
    --teal: #14B8A6;
    
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-tertiary: #21262D;
    --bg-card: #1C2128;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --border-color: #30363D;
    
    --header-height: 125px;
    --site-width: 1200px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.5);
}

/* =====================================================
   CSS VARIABLES - LIGHT THEME
   ===================================================== */
[data-theme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F6F8FA;
    --bg-tertiary: #EAEEF2;
    --bg-card: #FFFFFF;
    --text-primary: #1F2328;
    --text-secondary: #656D76;
    --text-muted: #8C959F;
    --border-color: #D0D7DE;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
}

/* Light theme specific adjustments */
[data-theme="light"] .header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .header__top {
    background: linear-gradient(135deg, #E2E8F0 0%, #F1F5F9 100%);
    border-bottom: 1px solid #CBD5E1;
}

/* Light mode - Flip Clock */
[data-theme="light"] .flip-clock__digit {
    background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 49.9%, #E2E8F0 50%, #F8FAFC 100%);
    color: #3B82F6;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 -1px 0 rgba(0,0,0,0.05);
}

[data-theme="light"] .flip-clock__digit::before {
    background: rgba(0,0,0,0.1);
}

[data-theme="light"] .flip-clock__digit.night {
    color: #8B5CF6;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .flip-clock__separator {
    color: #3B82F6;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .flip-clock__separator.night {
    color: #8B5CF6;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .flip-clock__name {
    color: #64748B;
}

[data-theme="light"] .clock-divider {
    background: #CBD5E1;
}

[data-theme="light"] .mega-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .popular-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .popular-card:hover {
    border-color: var(--primary);
}

[data-theme="light"] .category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .footer {
    background: #F1F5F9;
    color: #1F2937;
    border-top: 1px solid #E2E8F0;
}

[data-theme="light"] .footer__title {
    color: #1F2937;
}

[data-theme="light"] .footer__links a {
    color: #64748B;
}

[data-theme="light"] .footer__links a:hover {
    color: #3B82F6;
}

[data-theme="light"] .footer__brand p {
    color: #64748B;
}

[data-theme="light"] .footer__bottom {
    border-top-color: #E2E8F0;
    color: #64748B;
}

[data-theme="light"] .footer__langs a {
    color: #64748B;
}

[data-theme="light"] .footer__langs a:hover,
[data-theme="light"] .footer__langs a.active {
    color: #3B82F6;
}

[data-theme="light"] .search-bar input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .lang-switcher__dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Logo switching based on theme */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    width: auto;
}

.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

/* Maintenance admin banner */
.maintenance-admin-banner {
    background: linear-gradient(90deg, #F59E0B, #D97706);
    color: #000;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 500;
}

.maintenance-admin-banner a {
    color: #000;
    text-decoration: underline;
    font-weight: 600;
}

.maintenance-admin-banner a:hover {
    text-decoration: none;
}

/* Adjust header height when maintenance banner is shown */
.header:has(.maintenance-admin-banner) {
    height: calc(var(--header-height) + 30px);
}

body:has(.maintenance-admin-banner) .main {
    margin-top: calc(var(--header-height) + 30px);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 10px;
}

/* =====================================================
   NEWS TICKER
   ===================================================== */
/* =====================================================
   NEWS TICKER - Scrolling Banner
   ===================================================== */
.news-ticker {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    z-index: 1001;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    border-radius: 0 0 12px 12px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); }
    to { transform: translateX(-50%) translateY(0); }
}

.news-ticker--info {
    background: linear-gradient(90deg, var(--primary), var(--indigo));
    color: white;
}

.news-ticker--warning {
    background: linear-gradient(90deg, var(--warning), var(--orange));
    color: #000;
}

.news-ticker--success {
    background: linear-gradient(90deg, var(--success), var(--teal));
    color: white;
}

.news-ticker--danger {
    background: linear-gradient(90deg, var(--danger), var(--pink));
    color: white;
}

.news-ticker__icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.news-ticker__content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 1.4em;
}

.news-ticker__text {
    position: absolute;
    top: 0;
    left: 0;
    font-weight: 500;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll var(--ticker-duration, 15s) linear infinite;
}

.news-ticker:hover .news-ticker__text {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { 
        left: 100%;
    }
    100% { 
        left: 0;
        transform: translateX(-100%);
    }
}

.news-ticker__link {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.news-ticker__link:hover {
    opacity: 0.8;
}

.news-ticker__close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: inherit;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.news-ticker__close:hover {
    background: rgba(255,255,255,0.3);
}

/* Adjust header position when news ticker is visible */
body:has(.news-ticker) .header {
    top: 40px;
}

body:has(.news-ticker) .main {
    padding-top: calc(var(--header-height) + 60px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .news-ticker {
        border-radius: 0;
        max-width: 100%;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .news-ticker__link {
        display: none;
    }
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

/* Top bar - Flip Clocks */
.header__top {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid var(--border-color);
}

.header__top-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: var(--site-width);
    padding: 0 15px;
}

/* Flip Clock */
.flip-clock-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flip-clock {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flip-clock__city {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.flip-clock__flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.flip-clock__name {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flip-clock__display {
    display: flex;
    align-items: center;
    gap: 2px;
}

.flip-clock__unit {
    display: flex;
    gap: 1px;
}

.flip-clock__digit {
    width: 22px;
    height: 32px;
    background: linear-gradient(180deg, #2a2a3a 0%, #1a1a28 49.9%, #0f0f18 50%, #1a1a28 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease;
}

.flip-clock__digit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0,0,0,0.5);
}

.flip-clock__digit.night {
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

.flip-clock__digit.flip {
    animation: flipDigit 0.3s ease;
}

@keyframes flipDigit {
    0% { transform: perspective(100px) rotateX(0deg); }
    50% { transform: perspective(100px) rotateX(-90deg); }
    100% { transform: perspective(100px) rotateX(0deg); }
}

.flip-clock__separator {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    animation: blink 1s infinite;
}

.flip-clock__separator.night {
    color: #a78bfa;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.clock-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Header main */
.header__main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 73px;
    padding: 0 20px;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--site-width);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo svg {
    height: 40px;
    width: auto;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
}

.nav__link:hover {
    background: var(--bg-tertiary);
}

.nav__link .nav-icon {
    font-size: 0.95rem;
}

.nav__link svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.nav__item:hover .nav__link svg {
    transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.nav__item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.mega-menu--2cols { width: 420px; }
.mega-menu--3cols { width: 580px; }
.mega-menu--4cols { width: 750px; }
.mega-menu--5cols { width: 900px; }

.mega-menu__grid {
    display: grid;
    gap: 12px;
}

.mega-menu__grid--2cols { grid-template-columns: repeat(2, 1fr); }
.mega-menu__grid--3cols { grid-template-columns: repeat(3, 1fr); }
.mega-menu__grid--4cols { grid-template-columns: repeat(4, 1fr); }
.mega-menu__grid--5cols { grid-template-columns: repeat(5, 1fr); }

.mega-menu__col {
    min-width: 0;
}

.mega-menu__title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    font-weight: 700;
    padding: 0 8px 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.mega-menu__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s;
}

.mega-menu__link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mega-menu__link .icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.icon--blue { background: rgba(59, 130, 246, 0.15); }
.icon--green { background: rgba(16, 185, 129, 0.15); }
.icon--orange { background: rgba(249, 115, 22, 0.15); }
.icon--red { background: rgba(239, 68, 68, 0.15); }
.icon--purple { background: rgba(139, 92, 246, 0.15); }
.icon--cyan { background: rgba(6, 182, 212, 0.15); }
.icon--pink { background: rgba(236, 72, 153, 0.15); }
.icon--indigo { background: rgba(99, 102, 241, 0.15); }
.icon--teal { background: rgba(20, 184, 166, 0.15); }
.icon--gray { background: rgba(107, 114, 128, 0.15); }

/* Convert icon (two arrows) */
.convert-icon,
.convert-icon-small {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.convert-icon {
    margin: 0 2px;
}

.mega-menu__link .icon .convert-icon-small {
    width: 18px;
    height: 18px;
}

/* Header actions */
.header__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header__btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

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

/* Clock Toggle Button */
.header__btn--toggle {
    padding: 6px 8px;
    gap: 6px;
}

.clock-toggle__icon {
    font-size: 0.9rem;
    line-height: 1;
}

.clock-toggle__switch {
    position: relative;
    width: 28px;
    height: 16px;
    background: var(--success);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.clock-toggle__slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Clock hidden state */
.header__btn--toggle.clocks-hidden .clock-toggle__switch {
    background: var(--text-tertiary);
}

.header__btn--toggle.clocks-hidden .clock-toggle__slider {
    transform: translateX(12px);
}

.header__btn--toggle.clocks-hidden .clock-toggle__icon {
    opacity: 0.5;
}

/* Language switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.lang-switcher__current:hover {
    border-color: var(--primary);
}

.lang-switcher__current .flag {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.lang-switcher__current .flag .flag-img {
    width: 22px !important;
    height: 16px !important;
    min-width: 22px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.lang-switcher__current .arrow {
    font-size: 0.7em;
    margin-left: 2px;
}

.lang-switcher__menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 5px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.lang-switcher:hover .lang-switcher__menu,
.lang-switcher:focus-within .lang-switcher__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.15s;
    white-space: nowrap;
}

.lang-switcher__item .flag {
    font-size: 1.2em;
    line-height: 1;
    display: flex;
    align-items: center;
}

.lang-switcher__item .flag .flag-img {
    width: 28px;
    height: 19px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.lang-switcher__item:hover,
.lang-switcher__item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.page-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px; /* 40px gap between skyscrapers and content */
    padding: 0 20px;
}

.skyscraper {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
    flex-shrink: 0;
}

/* Skyscrapers adapt to their ad content size */
.skyscraper .ad-slot {
    width: fit-content !important;
    min-width: auto !important;
}

.site-container {
    width: 100%;
    max-width: var(--site-width);
    min-width: 0;
}

.main {
    padding-top: calc(var(--header-height) + 20px);
    min-height: 100vh;
}

/* =====================================================
   AD SLOTS
   ===================================================== */

/* Real ads should have no styling */
.ad-slot > * {
    max-width: 100%;
}
.ad-slot img, .ad-slot iframe, .ad-slot a {
    max-width: 100%;
    height: auto;
}

.ad-slot--160x600 { width: 160px; min-height: 600px; }
.ad-slot--300x600 { width: 300px; min-height: 600px; }
.ad-slot--120x600 { width: 120px; min-height: 600px; }
.ad-slot--728x90 { width: 728px; max-width: 100%; min-height: 90px; margin: 20px auto; }
.ad-slot--970x250 { width: 970px; max-width: 100%; min-height: 250px; margin: 0 auto 20px; }
.ad-slot--300x250 { width: 300px; min-height: 250px; }
.ad-slot--320x250 { width: 320px; max-width: 100%; min-height: 250px; margin: 15px auto; }

/* Hide empty ad slots */
.ad-slot:empty { display: none; }

/* Desktop ad wrappers - center content */
.ad-desktop-only {
    display: block;
    text-align: center;
    width: 100%;
}

.ad-mobile-only { display: none; }

/* Ad slots - centered, contained */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    /* HIDE ALL DESKTOP ADS ON MOBILE */
    .ad-desktop-only,
    .ad-slot--728x90,
    .ad-slot--970x250,
    .ad-slot--160x600,
    .skyscraper,
    [data-ad="top_banner"],
    [data-ad="leaderboard"],
    [data-ad="inline_1"],
    [data-ad="inline_2"],
    [data-ad="bottom_banner"],
    [data-ad="skyscraper_left"],
    [data-ad="skyscraper_right"] {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    .ad-mobile-only { display: block !important; overflow: hidden; text-align: center; }
}

.ad-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
}

/* Hide ad-row if all slots inside are empty */
.ad-row:not(:has(.ad-slot:not(:empty))) { display: none; }

/* Hide skyscrapers if empty */
.skyscraper:not(:has(.ad-slot:not(:empty))) { display: none; }

.ad-row:empty { display: none; margin: 0; }

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.hero__logo {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
	margin-left: 100px;
}

.hero__logo-img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

/* Cacher les deux logos par défaut */
.hero__logo-img--light,
.hero__logo-img--dark {
    display: none;
}

/* Dark theme: show logo with light text (for dark background) */
[data-theme="dark"] .hero__logo-img--light {
    display: block;
}

[data-theme="dark"] .hero__logo-img--dark {
    display: none;
}

/* Light theme: show logo with dark text (for light background) */
[data-theme="light"] .hero__logo-img--light {
    display: none;
}

[data-theme="light"] .hero__logo-img--dark {
    display: block;
}

.hero__title {
    font-size: 2.6rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-light), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 750px;
    margin: 0 auto 30px;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.hero__stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
}

.hero__stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero__languages {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 1.5rem;
}

.hero__languages a {
    opacity: 0.8;
    transition: all 0.2s;
    cursor: pointer;
}

.hero__languages a:hover {
    opacity: 1;
    transform: scale(1.2);
}

.hero__languages a.active {
    opacity: 1;
    transform: scale(1.1);
}

.hero__flag-img {
    width: 32px;
    height: 22px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: block;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.search-bar {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.search-bar input:focus { 
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar svg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* =====================================================
   POPULAR TOOLS GRID
   ===================================================== */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.popular-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.popular-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.2);
}

.popular-card:hover::before {
    transform: scaleX(1);
}

.popular-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: white;
}

.popular-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.popular-card__desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.popular-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    background: var(--warning);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
}

/* Icon backgrounds */
.bg--blue { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.bg--green { background: linear-gradient(135deg, var(--success), var(--success-dark)); }
.bg--orange { background: linear-gradient(135deg, var(--warning), #D97706); }
.bg--red { background: linear-gradient(135deg, var(--danger), #DC2626); }
.bg--purple { background: linear-gradient(135deg, var(--purple), #7C3AED); }
.bg--cyan { background: linear-gradient(135deg, var(--cyan), #0891B2); }
.bg--pink { background: linear-gradient(135deg, var(--pink), #DB2777); }
.bg--indigo { background: linear-gradient(135deg, var(--indigo), #4F46E5); }
.bg--teal { background: linear-gradient(135deg, var(--teal), #0D9488); }
.bg--gray { background: linear-gradient(135deg, #6B7280, #4B5563); }

/* =====================================================
   CATEGORIES
   ===================================================== */
.categories-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.category-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.category-card__info {
    flex: 1;
    min-width: 0;
}

.category-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-card__count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-card__arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.category-card:hover .category-card__arrow {
    transform: translateX(5px);
    color: var(--primary-light);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 20px 30px;
    margin-top: 50px;
}

.footer__container {
    max-width: var(--site-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 40px;
}

.footer__brand .logo {
    margin-bottom: 10px;
}

.footer__brand .logo svg {
    height: 36px;
}

.footer__brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
    line-height: 1.7;
}

.footer__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer__links {
    list-style: none;
}

.footer__links li { margin-bottom: 8px; }

.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer__links a:hover { color: var(--primary-light); }

.footer__bottom {
    max-width: var(--site-width);
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer__langs {
    display: flex;
    gap: 5px;
    font-size: 1.1rem;
}

.footer__langs a {
    opacity: 0.7;
    transition: all 0.2s;
}

.footer__langs a:hover,
.footer__langs a.active {
    opacity: 1;
    transform: scale(1.1);
}

/* =====================================================
   ERROR PAGES
   ===================================================== */
.error-page {
    min-height: calc(100vh - var(--header-height) - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.error-page__code {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-light), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
}

.error-page__icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.error-page__title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.error-page__message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 30px;
}

.error-page__actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    border-color: var(--primary);
    background: var(--bg-card);
}

.error-page__popular {
    margin-top: 50px;
    width: 100%;
    max-width: 800px;
}

.error-page__popular h3 {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.error-page__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.error-page__tool {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.error-page__tool:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* =====================================================
   SEO SECTION (Homepage)
   ===================================================== */
.seo-section {
    margin-top: 60px;
    padding: 60px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border-color);
}

.seo-section__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.seo-section__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.seo-section__title-icon {
    font-size: 2rem;
}

.seo-section__intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 45px;
}

.seo-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 45px;
}

.seo-section__block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seo-section__block:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.seo-section__block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.seo-section__block--images::before {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
}

.seo-section__block--tools::before {
    background: linear-gradient(90deg, #10B981, #06B6D4);
}

.seo-section__block--dev::before {
    background: linear-gradient(90deg, #F59E0B, #EF4444);
}

.seo-section__block-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
    background: var(--bg-secondary);
}

.seo-section__block--images .seo-section__block-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
}

.seo-section__block--tools .seo-section__block-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
}

.seo-section__block--dev .seo-section__block-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15));
}

.seo-section__block h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.seo-section__block p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.seo-section__block-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seo-section__block-tags span {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.seo-section__block--images .seo-section__block-tags span {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.seo-section__block--tools .seo-section__block-tags span {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.seo-section__block--dev .seo-section__block-tags span {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
}

.seo-section__why {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px 40px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.seo-section__why::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03), rgba(16, 185, 129, 0.03));
    pointer-events: none;
}

.seo-section__why h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.seo-section__why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 30px;
    position: relative;
}

.seo-section__why-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.seo-section__why-item:hover {
    transform: translateX(4px);
}

.seo-section__why-item--full {
    grid-column: 1 / -1;
    justify-content: center;
}

.seo-section__why-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.seo-section__why-item span:last-child {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Light mode adjustments for SEO section */
[data-theme="light"] .seo-section {
    background: linear-gradient(180deg, #F1F5F9 0%, #FFFFFF 100%);
}

[data-theme="light"] .seo-section__block {
    background: #FFFFFF;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .seo-section__block:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .seo-section__block-icon {
    background: #F8FAFC;
}

[data-theme="light"] .seo-section__block-tags span {
    background: #F8FAFC;
}

[data-theme="light"] .seo-section__why {
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .seo-section__why-item {
    background: #F8FAFC;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1600px) {
    .skyscraper--left { display: none; }
}

@media (max-width: 1400px) {
    .skyscraper--right { display: none; }
}

/* Hide priority 3 clocks (LA, Moscow) and their dividers */
@media (max-width: 1300px) {
    .flip-clock--priority-3,
    .clock-divider--priority-3 { display: none; }
}

/* Hide priority 2 clocks (Singapore, Sydney) and their dividers */
@media (max-width: 1100px) {
    .flip-clock--priority-2,
    .clock-divider--priority-2 { display: none; }
}

/* Compact mode for 2 remaining clocks (NY, Paris) */
@media (max-width: 900px) {
    .header__top { height: 44px; }
    .flip-clock-container { gap: 8px; }
    .clock-divider { display: none; }
    .flip-clock__digit { width: 18px; height: 26px; font-size: 0.9rem; }
    .flip-clock__flag { width: 18px; height: 13px; }
    .flip-clock__name { font-size: 0.55rem; }
    .flip-clock__city { min-width: 36px; }
}

/* Ultra compact for very small screens - keep NY and Paris */
@media (max-width: 500px) {
    .header__top { height: 40px; }
    .flip-clock-container { gap: 6px; }
    .flip-clock__digit { width: 16px; height: 22px; font-size: 0.8rem; }
    .flip-clock__flag { width: 16px; height: 11px; }
    .flip-clock__name { font-size: 0.5rem; }
    .flip-clock__city { min-width: 30px; gap: 2px; }
    .flip-clock { gap: 4px; }
    .flip-clock__separator { font-size: 1rem; }
    
    /* Clock toggle compact on mobile */
    .header__btn--toggle {
        padding: 5px 6px;
        gap: 4px;
    }
    .clock-toggle__icon {
        font-size: 0.8rem;
    }
    .clock-toggle__switch {
        width: 24px;
        height: 14px;
    }
    .clock-toggle__slider {
        width: 10px;
        height: 10px;
    }
    .header__btn--toggle.clocks-hidden .clock-toggle__slider {
        transform: translateX(10px);
    }
}

@media (max-width: 1200px) {
    .flip-clock-container { gap: 6px; }
    .clock-divider { display: none; }
    .flip-clock__digit { width: 18px; height: 26px; font-size: 0.9rem; }
}

/* =====================================================
   SHARE SECTION
   ===================================================== */
.share-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    margin: 40px auto;
    max-width: 1000px;
    padding: 30px;
}

[data-theme="light"] .share-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.share-section__container {
    text-align: center;
}

.share-section__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.share-section__icon {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
}

.share-section__header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.share-section__subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.share-section__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Discord */
.share-btn--discord {
    background: #5865F2;
    color: white;
}

/* X (Twitter) */
.share-btn--x {
    background: #000;
    color: white;
}

/* Facebook */
.share-btn--facebook {
    background: #1877F2;
    color: white;
}

/* Reddit */
.share-btn--reddit {
    background: #FF4500;
    color: white;
}

/* WhatsApp */
.share-btn--whatsapp {
    background: #25D366;
    color: white;
}

/* Telegram */
.share-btn--telegram {
    background: #0088CC;
    color: white;
}

/* Threads */
.share-btn--threads {
    background: #000;
    color: white;
}

/* Pinterest */
.share-btn--pinterest {
    background: #E60023;
    color: white;
}

/* Email */
.share-btn--email {
    background: #6c757d;
    color: white;
}

/* Copy */
.share-btn--copy {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn--copy.copied {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

[data-theme="light"] .share-btn--copy {
    background: white;
    border-color: #dee2e6;
}

.share-section__forums {
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: var(--bg-tertiary);
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-section__forums svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

[data-theme="light"] .share-section__forums {
    background: #e9ecef;
}

@media (max-width: 1100px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide nav by default on mobile */
    .nav {
        display: none !important;
    }
    
    /* Mobile menu open state */
    .nav.nav--mobile-open {
        display: block !important;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: var(--bg-primary);
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav.nav--mobile-open .nav__item {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    .nav.nav--mobile-open .nav__link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        font-size: 1rem;
    }
    
    /* Rotate arrow when active */
    .nav.nav--mobile-open .nav__item.active .nav__link svg {
        transform: rotate(180deg);
    }
    
    /* MEGA MENU MOBILE - Force override all desktop styles */
    .nav.nav--mobile-open .mega-menu,
    .nav.nav--mobile-open .mega-menu--2cols,
    .nav.nav--mobile-open .mega-menu--3cols,
    .nav.nav--mobile-open .mega-menu--4cols,
    .nav.nav--mobile-open .mega-menu--5cols {
        position: static !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: var(--bg-secondary) !important;
        border-radius: var(--radius-md) !important;
        padding: 15px !important;
        margin: 10px 0 !important;
    }
    
    /* Show mega menu when nav__item is active */
    .nav.nav--mobile-open .nav__item.active .mega-menu,
    .nav.nav--mobile-open .nav__item.active .mega-menu--2cols,
    .nav.nav--mobile-open .nav__item.active .mega-menu--3cols,
    .nav.nav--mobile-open .nav__item.active .mega-menu--4cols,
    .nav.nav--mobile-open .nav__item.active .mega-menu--5cols {
        display: block !important;
    }
    
    .nav.nav--mobile-open .mega-menu__grid,
    .nav.nav--mobile-open .mega-menu__grid--2cols,
    .nav.nav--mobile-open .mega-menu__grid--3cols,
    .nav.nav--mobile-open .mega-menu__grid--4cols,
    .nav.nav--mobile-open .mega-menu__grid--5cols {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        grid-template-columns: none !important;
    }
    
    .nav.nav--mobile-open .mega-menu__col {
        width: 100% !important;
    }
    
    .nav.nav--mobile-open .mega-menu__title {
        font-size: 0.85rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
    }
    
    .nav.nav--mobile-open .mega-menu__link {
        display: flex;
        align-items: center;
        padding: 10px 12px;
        border-radius: var(--radius-md);
        font-size: 0.9rem;
    }
    
    .nav.nav--mobile-open .mega-menu__link:hover {
        background: var(--bg-tertiary);
    }
    
    /* Hamburger animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .hero__title { font-size: 1.9rem; }
    .hero { padding: 35px 20px; }
    .popular-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .popular-card { padding: 18px 12px; }
    .popular-card__icon { width: 48px; height: 48px; font-size: 1.4rem; }
    .popular-card__title { font-size: 0.9rem; }
    .footer__container { grid-template-columns: repeat(2, 1fr); }
    .ad-slot--728x90, .ad-slot--970x250 { display: none; }
    .logo svg { height: 32px; }
    
    .error-page__code { font-size: 5rem; }
    .error-page__title { font-size: 1.5rem; }
    .error-page__icon { font-size: 4rem; }
    
    /* SEO Section responsive */
    .seo-section { margin-top: 40px; padding: 40px 0; }
    .seo-section__title { font-size: 1.4rem; }
    .seo-section__title-icon { font-size: 1.6rem; }
    .seo-section__intro { font-size: 0.95rem; margin-bottom: 30px; }
    .seo-section__grid { grid-template-columns: 1fr; gap: 20px; }
    .seo-section__block { padding: 22px; }
    .seo-section__block-icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .seo-section__why { padding: 25px 20px; }
    .seo-section__why-grid { grid-template-columns: 1fr; gap: 12px; }
    .seo-section__why-item { padding: 10px 14px; }
    .seo-section__why-item--full { justify-content: flex-start; }
    
    /* Share Section responsive */
    .share-section { margin: 30px 15px; padding: 25px 20px; }
    .share-section__header h3 { font-size: 1.2rem; }
    .share-btn { padding: 8px 14px; font-size: 0.85rem; }
    .share-btn svg { width: 16px; height: 16px; }
    .share-section__forums { font-size: 0.8rem; padding: 10px 16px; }
}

@media (max-width: 480px) {
    .popular-grid { grid-template-columns: 1fr 1fr; }
    .hero__stats { gap: 25px; }
    .hero__stat-number { font-size: 1.6rem; }
    .footer__container { grid-template-columns: 1fr; }
    .footer__bottom { flex-direction: column; gap: 15px; text-align: center; }
    .categories-preview { grid-template-columns: 1fr; }
    
    .error-page__actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
}

/* =====================================================
   SEARCH RESULTS DROPDOWN
   ===================================================== */
.search-bar {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.search-results--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}

.search-results__item:last-child {
    border-bottom: none;
}

.search-results__item:hover,
.search-results__item--active {
    background: var(--bg-tertiary);
}

.search-results__icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.search-results__name {
    font-weight: 500;
    font-size: 0.95rem;
}

.search-results__empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* =====================================================
   CATEGORY PAGE STYLES
   ===================================================== */
.category-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.category-header__icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.category-header__info {
    flex: 1;
}

.category-header__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.category-header__desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Search bar variant for category pages */
.search-bar--category {
    max-width: 100%;
    margin-bottom: 25px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* Tool Card */
.tool-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tool-card__info {
    flex: 1;
    min-width: 0;
}

.tool-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.tool-card__arrow {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s;
}

.tool-card:hover .tool-card__arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

/* Responsive adjustments for category pages */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .category-header__icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .category-header__title {
        font-size: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-card {
        padding: 16px;
    }
    
    .tool-card__icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .tool-card__arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        gap: 12px;
    }
    
    .tool-card__title {
        font-size: 0.95rem;
    }
    
    .tool-card__desc {
        font-size: 0.8rem;
    }
}
