* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

h1 {
    font-size: 2.2rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    color: #718096;
    font-size: 1rem;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px;
    background-color: white;
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.search-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.btn-text {
    text-align: left;
    flex-grow: 1;
}

.btn-name {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.btn-url {
    font-size: 0.75rem;
    color: #718096;
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.external-icon {
    margin-left: 8px;
    color: #a0aec0;
    font-size: 0.8rem;
    flex-shrink: 0;
}

footer {
    color: #a0aec0;
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Цвета поисковиков */
.one-bg { background-color: #4285F4; }
.two-bg { background-color: #FF0000; }
.three-bg { background-color: #06e602; }
.four-bg { background-color: #f1f500; }

/* Темная тема */
.dark-mode {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
}

.dark-mode h1 {
    color: #f7fafc;
}

.dark-mode .subtitle {
    color: #cbd5e0;
}

.dark-mode .search-btn {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.dark-mode .btn-url {
    color: #a0aec0;
}

.dark-mode .external-icon {
    color: #718096;
}

.dark-mode footer {
    color: #718096;
    border-color: #4a5568;
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .search-btn {
        padding: 12px 14px;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .search-btn {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 10px;
    }
    
    .btn-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .btn-text {
        text-align: center;
    }
    
    .external-icon {
        position: absolute;
        top: 8px;
        right: 8px;
        margin-left: 0;
    }
}

/* Переключатель темы */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    font-size: 1.2rem;
    z-index: 100;
}

.dark-mode .theme-toggle {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

