/* ===== ОСНОВНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

:root {
    --primary-color: #4a6bff;
    --secondary-color: #6c5ce7;
    --accent-color: #00cec9;
    --dark-bg: #0f1419;
    --darker-bg: #0a0e13;
    --card-bg: #1a1f29;
    --text-primary: #ffffff;
    --text-secondary: #8899a6;
    --border-color: #2d3746;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #ff7675;
    --google-color: #4285f4;
    --yandex-color: #ffcc00;
    --youtube-color: #ff0000;
    --rutube-color: #ff2e00;
    --github-color: #333333;
    --vk-color: #4c75a3;
    --telegram-color: #0088cc;
}

body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ШАПКА ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.clock-container {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 15px;
    min-width: 240px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.city {
    font-size: 16px;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.city i {
    font-size: 18px;
}

.time {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(74, 107, 255, 0.3);
    letter-spacing: 2px;
}

.date {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.browser-info {
    text-align: center;
    flex-grow: 1;
}

.browser-info h1 {
    font-size: 48px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.version {
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(74, 107, 255, 0.3);
}

.settings-btn:hover {
    background: var(--secondary-color);
    transform: rotate(30deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 107, 255, 0.4);
}

/* ===== ПОИСКОВАЯ СТРОКА ===== */
.search-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.search-engine-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.engine-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    justify-content: center;
    border: 2px solid transparent;
}

.engine-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 6px 20px rgba(74, 107, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.engine-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid var(--border-color);
}

.search-box {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 20px;
    z-index: 2;
}

#search-input {
    flex: 1;
    padding: 20px 60px;
    border: none;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 18px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-action-btn {
    padding: 20px 40px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    justify-content: center;
}

.search-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 107, 255, 0.4);
}

.voice-search-btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.voice-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.quick-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.quick-link:hover {
    background: rgba(74, 107, 255, 0.2);
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(74, 107, 255, 0.2);
}

/* ===== ЗАКЛАДКИ ===== */
.bookmarks-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.bookmarks-section h2 {
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.bookmark-category {
    margin-bottom: 40px;
}

.bookmark-category h3 {
    margin-bottom: 20px;
    color: var(--accent-color);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.bookmarks-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.bookmark {
    background: rgba(0, 0, 0, 0.25);
    padding: 25px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.bookmark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.bookmark:hover::before {
    transform: scaleX(1);
}

.bookmark:hover {
    transform: translateY(-8px);
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.bookmark-icon {
    font-size: 48px;
    margin-bottom: 5px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.bookmark:hover .bookmark-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

/* Цвета иконок */
.ru-tube { color: var(--rutube-color); }
.youtube { color: var(--youtube-color); }
.github { color: var(--github-color); background: white !important; }
.vk { color: var(--vk-color); }
.telegram { color: var(--telegram-color); }
.google { color: var(--google-color); }
.yandex { color: var(--yandex-color); background: #000 !important; }
.gitverse { color: var(--primary-color); }

.bookmark-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.bookmark-desc {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== ИНФОРМАЦИОННЫЙ БЛОК ===== */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.stats-card, .project-info-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.stats-card h3, .project-info-card h3 {
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.project-info-content p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-info-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-info-content a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.feature-tag {
    background: rgba(74, 107, 255, 0.15);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(74, 107, 255, 0.3);
}

/* ===== ФУТЕР ===== */
.footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.footer-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-copyright a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-copyright a:hover {
    text-decoration: underline;
}

.system-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 25px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px 25px 0 0;
}

.modal-header h2 {
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.close-modal {
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-section p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.modal-section ul {
    list-style: none;
    padding-left: 5px;
}

.modal-section li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-section li i {
    color: var(--success-color);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 25px 25px;
}

.btn-primary {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 107, 255, 0.4);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .browser-info h1 {
        font-size: 42px;
    }
    
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .header {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .clock-container {
        min-width: 100%;
    }
    
    .search-engine-selector {
        flex-wrap: wrap;
    }
    
    .engine-btn {
        min-width: 140px;
    }
    
    .stats-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .browser-info h1 {
        font-size: 36px;
        flex-direction: column;
        gap: 10px;
    }
    
    .search-container {
        padding: 25px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-action-btn, .voice-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bookmarks-row {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .stats-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header, .search-container, .bookmarks-section {
        padding: 20px;
    }
    
    .time {
        font-size: 32px;
    }
    
    .browser-info h1 {
        font-size: 28px;
    }
    
    .version {
        font-size: 14px;
    }
    
    .quick-links {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-link {
        width: 100%;
        justify-content: center;
    }
}

/* ===== АНИМАЦИИ И ЭФФЕКТЫ ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Пульсация для голосового поиска */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 107, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 107, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 107, 255, 0); }
}

.voice-search-btn.listening {
    animation: pulse 2s infinite;
    background: var(--primary-color);
    color: white;
}

/* Эффект загрузки */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Выделение текста */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Индикатор фокуса для доступности */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}