        :root {
            /* Светлая тема */
            --bg-color: #ffffff;
            --text-main: #202124;
            --text-secondary: #5f6368;
            --text-muted: #70757a;
            --search-bg: #ffffff;
            --search-border: #dfe1e5;
            --search-hover-shadow: 0 2px 8px rgba(32, 33, 36, 0.28);
            --card-bg: #f8f9fa;
            --card-hover: #f1f3f4;
            --card-border: rgba(0,0,0,0.05);
            --primary-color: #1a73e8;
            --accent-gradient: linear-gradient(45deg, #1a73e8, #8ab4f8);
            --ai-gradient: linear-gradient(135deg, #a142f4, #f442a1);
            --footer-bg: #f2f2f2;
            --footer-border: #e4e4e4;
            
            /* Переменные виртуальной клавиатуры */
            --kb-bg: #e0e0e0;
            --kb-key-bg: #ffffff;
            --kb-key-text: #202124;
            --kb-key-hover: #f1f3f4;
            --kb-key-active: #d5d5d5;
            --kb-special-bg: #c9c9c9;
        }

        [data-theme="dark"] {
            /* Темная тема - Глубокий черный */
            --bg-color: #000000;
            --text-main: #e8eaed;
            --text-secondary: #9aa0a6;
            --text-muted: #80868b;
            --search-bg: #1a1a1a;
            --search-border: #3c4043;
            --search-hover-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
            --card-bg: #111111;
            --card-hover: #1e1e1e;
            --card-border: #333333;
            --primary-color: #8ab4f8;
            --accent-gradient: linear-gradient(45deg, #8ab4f8, #c58af9);
            --ai-gradient: linear-gradient(135deg, #c58af9, #f98ac5);
            --footer-bg: #0a0a0a;
            --footer-border: #1f1f1f;
            
            /* Переменные виртуальной клавиатуры (Тёмная) */
            --kb-bg: #2a2a2a;
            --kb-key-bg: #404040;
            --kb-key-text: #e8eaed;
            --kb-key-hover: #505050;
            --kb-key-active: #303030;
            --kb-special-bg: #353535;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            display: flex;
            justify-content: center;
            min-height: 100vh;
            transition: background-color 0.3s ease, color 0.3s ease;
            overflow-x: hidden;
        }

        .page-wrapper {
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 1200px;
            min-height: 100vh;
        }

        a {
            text-decoration: none;
            color: var(--primary-color);
        }

        /* --- Header --- */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            width: 100%;
        }

        .header-logo {
            display: flex;
            align-items: center;
            height: 40px;
        }

        .header-logo img {
            height: 100%;
            width: auto;
            object-fit: contain;
            border-radius: 8px;
        }

        .logo-fallback {
            display: none;
            font-size: 22px;
            font-weight: 800;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .header-actions {
            display: flex;
            align-items: center;
        }

        .profile-icon {
            width: 40px;
            height: 40px;
            background-color: var(--search-bg);
            border: 1px solid var(--search-border);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }

        .profile-icon:hover {
            border-color: var(--text-secondary);
            color: var(--text-main);
            transform: scale(1.05);
        }

        /* --- Main Content --- */
        main {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 16px;
            margin-top: -8vh;
        }

        .main-title {
            font-size: clamp(40px, 8vw, 90px);
            font-weight: 800;
            letter-spacing: -2px;
            margin-bottom: 16px;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-align: center;
            user-select: none;
            line-height: 1;
        }

        .device-info {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
            font-size: clamp(10px, 2.5vw, 13px);
            color: var(--text-secondary);
            margin-bottom: 32px;
            background: var(--card-bg);
            padding: 10px 20px;
            border-radius: 20px;
            border: 1px solid var(--search-border);
            transition: all 0.3s ease;
        }

        .device-info span {
            display: flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }
        
        .device-info span:not(:last-child)::after {
            content: "•";
            color: var(--search-border);
            margin-left: 6px;
        }

        .device-info svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        /* Search Box */
        .search-container {
            width: 100%;
            max-width: 650px;
            margin-bottom: 48px;
        }

        .search-box {
            display: flex;
            align-items: center;
            background: var(--search-bg);
            border: 1px solid var(--search-border);
            border-radius: 30px;
            padding: 0 8px 0 24px;
            height: 56px;
            transition: all 0.2s ease;
            position: relative;
        }

        .search-box:hover, .search-box.focused {
            box-shadow: var(--search-hover-shadow);
            border-color: var(--text-secondary);
        }

        .search-input {
            flex: 1;
            border: none;
            background: transparent;
            outline: none;
            font-size: 16px;
            color: var(--text-main);
            height: 100%;
            padding-right: 12px;
        }

        .search-actions {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .action-btn {
            background: transparent;
            border: none;
            color: var(--text-muted);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .action-btn:hover {
            background: var(--card-hover);
            color: var(--text-main);
        }

        .action-btn svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .ai-btn svg {
            stroke: url(#ai-gradient-svg);
            fill: url(#ai-gradient-svg);
        }
        .ai-btn:hover {
            background: rgba(161, 66, 244, 0.1);
        }

        .search-submit-btn {
            background: var(--card-bg);
            border: 1px solid var(--search-border);
        }
        .search-submit-btn:hover {
            background: var(--primary-color);
            border-color: var(--primary-color);
            color: #ffffff;
        }

        /* Ecosystem Cards */
        .ecosystem-container {
            width: 100%;
            max-width: 800px;
        }

        .ecosystem-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
            gap: 16px;
            justify-content: center;
        }

        .eco-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px 10px;
            background: var(--card-bg);
            border-radius: 16px;
            text-decoration: none;
            color: var(--text-main);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            text-align: center;
            cursor: pointer;
            border: 1px solid var(--card-border);
        }

        .eco-card:hover {
            background: var(--card-hover);
            transform: translateY(-4px);
            border-color: var(--search-border);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .eco-icon {
            width: 36px;
            height: 36px;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--primary-color);
        }

        .eco-icon svg {
            width: 100%;
            height: 100%;
            stroke: currentColor;
            stroke-width: 1.5;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        
        .eco-card-ai .eco-icon svg {
             stroke: url(#ai-gradient-svg);
             fill: url(#ai-gradient-svg);
             stroke-width: 1;
        }

        .eco-title {
            font-size: 13px;
            font-weight: 500;
        }

        /* --- Footer --- */
        footer {
            background: var(--footer-bg);
            border-top: 1px solid var(--footer-border);
            padding: 16px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 16px;
            font-size: clamp(12px, 3vw, 14px);
            color: var(--text-secondary);
        }

        .footer-links {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            align-items: center;
        }

        .footer-links a {
            color: var(--text-secondary);
        }

        .footer-links a:hover {
            color: var(--text-main);
            text-decoration: underline;
        }

        .footer-controls {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        select {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            outline: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
        }
        
        select:hover {
            color: var(--text-main);
        }

        .theme-toggle {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px;
            border-radius: 50%;
            transition: all 0.2s;
        }

        .theme-toggle:hover {
            color: var(--text-main);
            background: var(--search-border);
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* --- Виртуальная клавиатура --- */
        .virtual-keyboard {
            position: fixed;
            bottom: -400px;
            left: 0;
            width: 100%;
            background-color: var(--kb-bg);
            padding: 10px;
            box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
            transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .virtual-keyboard.active {
            bottom: 0;
        }

        .kb-header {
            width: 100%;
            max-width: 800px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding: 0 5px;
        }

        .kb-title {
            color: var(--text-main);
            font-size: 14px;
            font-weight: 500;
        }

        .kb-close-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 5px;
            display: flex;
        }
        
        .kb-close-btn:hover {
            color: var(--text-main);
        }

        .kb-row {
            display: flex;
            justify-content: center;
            gap: 6px;
            margin-bottom: 6px;
            width: 100%;
            max-width: 800px;
        }

        .kb-key {
            background-color: var(--kb-key-bg);
            color: var(--kb-key-text);
            border: none;
            border-radius: 6px;
            padding: 12px 0;
            font-size: 16px;
            cursor: pointer;
            box-shadow: 0 1px 1px rgba(0,0,0,0.2);
            transition: background-color 0.1s, transform 0.1s;
            user-select: none;
            flex: 1;
            max-width: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .kb-key:active {
            background-color: var(--kb-key-active);
            transform: translateY(1px);
        }

        .kb-key.special {
            background-color: var(--kb-special-bg);
            font-size: 14px;
            max-width: none;
        }

        .kb-key.space {
            flex: 5;
            max-width: 300px;
        }
        
        .kb-key.active-state {
            background-color: var(--primary-color);
            color: white;
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .ecosystem-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            .device-info span:not(:last-child)::after {
                content: none;
            }
            .device-info span {
                background: var(--bg-color);
                padding: 4px 10px;
                border-radius: 10px;
                border: 1px solid var(--search-border);
            }
            .search-box {
                padding: 0 4px 0 16px;
            }
            .action-btn {
                width: 36px;
                height: 36px;
            }
            .kb-key {
                padding: 15px 0;
                font-size: 14px;
                border-radius: 4px;
            }
        }
        
        @media (max-width: 480px) {
            .ecosystem-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            footer {
                flex-direction: column;
                justify-content: center;
                text-align: center;
                padding-bottom: 24px;
            }
            .footer-links {
                justify-content: center;
            }
            .kb-row {
                gap: 4px;
            }
        }
