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

        /* Light mode (default) */
        :root {
            /* Apple Color System - Light Mode */
            --apple-bg: #f5f5f7;
            --apple-bg-secondary: #e5e5e7;
            --apple-bg-tertiary: #d5d5d7;
            --apple-card-bg: rgba(255, 255, 255, 0.95);
            --apple-text-primary: #1d1d1f;
            --apple-text-secondary: #6e6e73;
            --apple-text-tertiary: #86868b;
            --apple-accent: #0071e3;
            --apple-accent-hover: #0a84ff;
            --apple-green: #248a3d;
            --apple-red: #c92a2a;
            --apple-orange: #e67700;
            --apple-purple: #845ef7;
            --apple-border: rgba(0, 0, 0, 0.1);
            --apple-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            --glass-blur: blur(20px);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Dark mode */
        :root[data-theme="dark"] {
            /* Apple Color System - Dark Mode */
            --apple-bg: #000000;
            --apple-bg-secondary: #1c1c1e;
            --apple-bg-tertiary: #2c2c2e;
            --apple-card-bg: rgba(28, 28, 30, 0.8);
            --apple-text-primary: #ffffff;
            --apple-text-secondary: #98989d;
            --apple-text-tertiary: #636366;
            --apple-accent: #0a84ff;
            --apple-accent-hover: #0071e3;
            --apple-green: #30d158;
            --apple-red: #ff453a;
            --apple-orange: #ff9f0a;
            --apple-purple: #bf5af2;
            --apple-border: rgba(255, 255, 255, 0.1);
            --apple-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            --glass-blur: blur(20px);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, var(--apple-bg) 0%, var(--apple-bg-secondary) 100%);
            color: var(--apple-text-primary);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
            transition: var(--transition);
        }

        /* Header Styles */
        header {
            position: sticky;
            top: 0;
            z-index: 1000;
            background: var(--apple-card-bg);
            backdrop-filter: var(--glass-blur);
            border-bottom: 1px solid var(--apple-border);
            box-shadow: var(--apple-shadow);
        }

        .header-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 60px;
        }

        .logo {
            font-size: 28px;
            font-weight: 700;
            color: var(--apple-text-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .logo::before {
            content: "🛠️";
            font-size: 24px;
        }

        /* Desktop Navigation */
        .nav-main {
            display: flex;
            gap: 8px;
            height: 100%;
        }

        .nav-item {
            position: relative;
            height: 100%;
            display: flex;
            align-items: center;
        }

        .nav-link {
            padding: 8px 16px;
            color: var(--apple-text-secondary);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            border-radius: 8px;
            transition: var(--transition);
            white-space: nowrap;
        }

        .nav-link:hover {
            color: var(--apple-text-primary);
            background: var(--apple-bg-tertiary);
        }

        .nav-link.active {
            color: var(--apple-accent);
            background: rgba(10, 132, 255, 0.1);
        }

        /* Dropdown Menu */
        .dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            background: var(--apple-card-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--apple-border);
            border-radius: 12px;
            padding: 8px;
            min-width: 220px;
            max-width: 800px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: var(--transition);
            box-shadow: var(--apple-shadow);
            margin-top: 4px;
            max-height: 60vh;
            overflow-y: auto;
            overflow-x: hidden;
        }

        /* Grid layout for dropdown items based on item count */
        .dropdown[data-count="4"] {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4px;
            min-width: 450px;
        }

        .dropdown[data-count="8"] {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4px;
            min-width: 500px;
        }

        .dropdown[data-count="10"] {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4px;
            min-width: 550px;
        }

        .dropdown[data-count="14"] {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4px;
            min-width: 600px;
        }

        .dropdown[data-count="15"] {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4px;
            min-width: 600px;
        }

        .dropdown[data-count="18"] {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 4px;
            min-width: 600px;
        }

        /* Grid layout specific item styles */
        .dropdown[data-count="4"] .dropdown-item,
        .dropdown[data-count="8"] .dropdown-item,
        .dropdown[data-count="10"] .dropdown-item,
        .dropdown[data-count="14"] .dropdown-item,
        .dropdown[data-count="15"] .dropdown-item,
        .dropdown[data-count="18"] .dropdown-item {
            margin-bottom: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* 3-column layout for 18 items */
        .dropdown[data-count="18"] .dropdown-item {
            font-size: 13px;
            padding: 8px 10px;
            font-weight: 500;
        }

        .dropdown[data-count="18"] .dropdown-item small {
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Left-expanding dropdown for rightmost items */
        .nav-item.dropdown-left .dropdown {
            left: auto;
            right: 0;
            transform-origin: top right;
        }

        .nav-item.dropdown-left:hover .dropdown,
        .nav-item.dropdown-left.active .dropdown {
            transform: translateY(0);
        }

        /* 2-column layouts - slightly smaller font for 14-15 items */
        .dropdown[data-count="14"] .dropdown-item,
        .dropdown[data-count="15"] .dropdown-item {
            font-size: 13px;
            padding: 9px 10px;
            font-weight: 500;
        }

        .dropdown[data-count="14"] .dropdown-item small,
        .dropdown[data-count="15"] .dropdown-item small {
            font-size: 11px;
        }

        .nav-item:hover .dropdown {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            display: block;
            padding: 10px 12px;
            color: var(--apple-text-primary);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            border-radius: 6px;
            transition: var(--transition);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dropdown-item:hover {
            background: var(--apple-bg-tertiary);
            color: var(--apple-accent);
            transform: translateX(2px);
        }

        /* Grid items have less horizontal space, reduce transform */
        .dropdown[data-count="4"] .dropdown-item:hover,
        .dropdown[data-count="8"] .dropdown-item:hover,
        .dropdown[data-count="10"] .dropdown-item:hover,
        .dropdown[data-count="14"] .dropdown-item:hover,
        .dropdown[data-count="15"] .dropdown-item:hover,
        .dropdown[data-count="18"] .dropdown-item:hover {
            transform: translateX(2px);
        }

        .dropdown-item small {
            display: block;
            font-size: 12px;
            color: var(--apple-text-secondary);
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 400;
        }

        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--apple-text-primary);
            font-size: 24px;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: var(--transition);
        }

        .mobile-menu-toggle:hover {
            background: var(--apple-bg-tertiary);
        }

        /* Theme Toggle Button */
        .theme-toggle {
            background: none;
            border: 1px solid var(--apple-border);
            color: var(--apple-text-primary);
            font-size: 18px;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: 8px;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }

        .theme-toggle:hover {
            background: var(--apple-bg-tertiary);
            border-color: var(--apple-accent);
            color: var(--apple-accent);
        }

        .theme-toggle span {
            font-size: 12px;
            font-weight: 500;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .lang-switch {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
        }

        .lang-link {
            color: var(--apple-text-secondary);
            text-decoration: none;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            transition: var(--transition);
        }

        .lang-link:hover {
            color: var(--apple-accent);
            background: var(--apple-bg-tertiary);
        }

        .lang-link.active {
            color: var(--apple-accent);
            background: rgba(10, 132, 255, 0.1);
        }

        .lang-switch {
            position: relative;
        }

        .lang-switch .lang-link {
            display: none;
        }

        .lang-switch .lang-link.active {
            display: inline-block;
        }

        .lang-switch::after {
            content: "▾";
            font-size: 10px;
            color: var(--apple-text-secondary);
            margin-left: 4px;
        }

        .lang-switch:hover {
            background: var(--apple-bg-tertiary);
            border-radius: 8px;
            padding: 4px 8px;
        }

        .lang-switch:hover .lang-link {
            display: block;
        }

        @media (max-width: 768px) {
            .lang-switch {
                padding: 0;
                background: none;
            }

            .lang-switch .lang-link {
                display: inline-block;
            }

            .lang-switch::after {
                display: none;
            }
        }

        .language-dropdown {
            position: relative;
        }
        /* Footer */
        footer {
            border-top: 1px solid var(--apple-border);
            background: var(--apple-bg-secondary);
            padding: 40px 20px;
            margin-top: 60px;
        }

        .footer-content {
            max-width: 1400px;
            margin: 0 auto;
            text-align: center;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 24px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .footer-link {
            color: var(--apple-text-secondary);
            text-decoration: none;
            font-size: 14px;
            transition: var(--transition);
        }

        .footer-link:hover {
            color: var(--apple-accent);
        }

        .footer-text {
            color: var(--apple-text-tertiary);
            font-size: 13px;
        }

        .language-dropdown-btn {
            display: flex;
            align-items: center;
            padding: 6px 10px;
            border-radius: 999px;
            cursor: pointer;
            color: var(--apple-text-secondary);
            background: transparent;
            transition: var(--transition);
            font-size: 12px;
        }

        .language-dropdown-btn span {
            font-size: 13px;
        }

        .language-dropdown-btn:hover {
            background: var(--apple-bg-tertiary);
            color: var(--apple-text-primary);
        }

        .language-dropdown-icon {
            width: 14px;
            height: 14px;
        }

        .language-dropdown-content {
            position: absolute;
            right: 0;
            top: calc(100% + 4px);
            min-width: 160px;
            background: var(--apple-card-bg);
            border-radius: 10px;
            border: 1px solid var(--apple-border);
            box-shadow: var(--apple-shadow);
            padding: 4px;
            display: none;
            z-index: 1200;
        }

        .language-dropdown.open .language-dropdown-content {
            display: block;
        }

        .language-dropdown-content .lang-link {
            display: block;
            padding: 6px 10px;
            margin: 0;
        }

        .language-dropdown-content .lang-link + .lang-link {
            margin-top: 2px;
        }

        @media (max-width: 768px) {
            .language-dropdown-content {
                right: auto;
                left: 0;
            }
        }

        /* Mobile Styles */
        @media (max-width: 768px) {
            .nav-main {
                display: none;
                position: absolute;
                top: 60px;
                left: 0;
                right: 0;
                background: var(--apple-bg-secondary);
                border-bottom: 1px solid var(--apple-border);
                flex-direction: column;
                height: auto;
                max-height: calc(100vh - 60px);
                overflow-y: auto;
                padding: 16px;
            }

            .nav-main.active {
                display: flex;
            }

            .nav-item {
                height: auto;
                flex-direction: column;
                align-items: flex-start;
                position: relative;
            }

            .nav-link {
                width: 100%;
                padding: 12px 16px;
                font-size: 16px;
            }

            .dropdown {
                position: static;
                opacity: 1;
                visibility: visible;
                transform: none;
                background: var(--apple-bg-tertiary);
                margin: 4px 0 8px 0;
                display: none;
                min-width: auto;
                max-width: 100%;
                max-height: none;
                overflow-y: visible;
            }

            /* Reset all grid layouts for mobile */
            .dropdown[data-count="4"],
            .dropdown[data-count="8"],
            .dropdown[data-count="10"],
            .dropdown[data-count="14"],
            .dropdown[data-count="15"],
            .dropdown[data-count="18"] {
                display: block;
                grid-template-columns: 1fr;
                min-width: auto;
                gap: 0;
            }

            .nav-item:hover .dropdown,
            .nav-item.active .dropdown {
                display: block;
            }

            .dropdown-item {
                white-space: normal;
                margin-bottom: 2px;
            }

            .dropdown-item small {
                white-space: normal;
            }

            /* Reset grid-specific styles */
            .dropdown[data-count="4"] .dropdown-item,
            .dropdown[data-count="8"] .dropdown-item,
            .dropdown[data-count="10"] .dropdown-item,
            .dropdown[data-count="14"] .dropdown-item,
            .dropdown[data-count="15"] .dropdown-item,
            .dropdown[data-count="18"] .dropdown-item {
                margin-bottom: 2px;
                white-space: normal;
                font-size: 13px;
                padding: 10px 12px;
            }

            .dropdown[data-count="18"] .dropdown-item {
                font-size: 13px;
                padding: 10px 12px;
            }

            .dropdown[data-count="18"] .dropdown-item small,
            .dropdown[data-count="14"] .dropdown-item small,
            .dropdown[data-count="15"] .dropdown-item small {
                font-size: 11px;
                white-space: normal;
            }

            .mobile-menu-toggle {
                display: block;
            }

            .theme-toggle span {
                display: none;
            }

            .theme-toggle {
                padding: 8px;
            }
        }

        /* Smooth Scroll */
        html {
            scroll-behavior: smooth;
        }

        /* Utility Classes */
        .hidden {
            display: none !important;
        }

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

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

        ::-webkit-scrollbar-thumb {
            background: var(--apple-bg-tertiary);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--apple-text-tertiary);
        }
        .status-message {
            margin-top: 16px;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 13px;
            display: none;
            align-items: center;
            gap: 8px;
        }

        .status-message.show {
            display: flex;
        }

        .status-message.success {
            background: rgba(48, 209, 88, 0.1);
            color: var(--apple-green);
            border: 1px solid var(--apple-green);
        }

        .status-message.error {
            background: rgba(255, 69, 58, 0.1);
            color: var(--apple-red);
            border: 1px solid var(--apple-red);
        }

        .status-message.info {
            background: rgba(10, 132, 255, 0.1);
            color: var(--apple-accent);
            border: 1px solid var(--apple-accent);
        }