/* DeepSeek Admin - Modern Database Tool */
/* Все темы в одном файле */

:root {
    /* ФИРМЕННЫЙ СИНИЙ DEEPSEEK */
    --deepseek-blue: #5686FE;
    --deepseek-blue-dark: #3a56e8;
    --deepseek-blue-light: #6b84ff;
    
    /* ТЁМНАЯ ТЕМА (по умолчанию) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-surface: #151515;
    --bg-card: #1a1a1a;
    --bg-input: #0f0f0f;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --text-muted: #444444;
    
    --border-color: #2a2a2a;
    --border-light: #333333;
    --border-input: #3a3a3a;
    
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-button: 0 10px 25px rgba(77, 107, 254, 0.3);
    --shadow-input: 0 2px 10px rgba(0, 0, 0, 0.2);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    
    /* Цвета состояний */
    --success: #10b981;
    --danger: #ef4444;
}

/* СВЕТЛАЯ ТЕМА */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-muted: #cbd5e1;
    
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    --border-input: #e2e8f0;
    
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-button: 0 10px 25px rgba(77, 107, 254, 0.15);
    --shadow-input: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* АВТО ТЕМА */
[data-theme="auto"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-surface: #151515;
    --bg-card: #1a1a1a;
    --bg-input: #0f0f0f;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --text-muted: #444444;
    
    --border-color: #2a2a2a;
    --border-light: #333333;
    --border-input: #3a3a3a;
    
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-button: 0 10px 25px rgba(77, 107, 254, 0.3);
    --shadow-input: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --bg-primary: #f8fafc;
        --bg-secondary: #ffffff;
        --bg-surface: #f1f5f9;
        --bg-card: #ffffff;
        --bg-input: #ffffff;
        
        --text-primary: #1e293b;
        --text-secondary: #64748b;
        --text-tertiary: #94a3b8;
        --text-muted: #cbd5e1;
        
        --border-color: #e2e8f0;
        --border-light: #cbd5e1;
        --border-input: #e2e8f0;
        
        --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.08);
        --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
        --shadow-button: 0 10px 25px rgba(77, 107, 254, 0.15);
        --shadow-input: 0 2px 10px rgba(0, 0, 0, 0.04);
    }
}

/* БАЗОВЫЕ СТИЛИ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* СТРАНИЦА ВХОДА */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.login-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.deepseek-logo {
    width: 120px;
    height: 25px;
}

.deepseek-logo path {
    fill: var(--deepseek-blue);
}

.admin-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--deepseek-blue);
    margin-left: 0.5rem;
    margin-top: 0.3rem;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-deep);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

/* ФОРМА */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-label i {
    color: var(--deepseek-blue);
    width: 16px;
    text-align: center;
}

.input-field, .select-field {
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    width: 100%;
}

.input-field:focus, .select-field:focus {
    outline: none;
    border-color: var(--deepseek-blue);
    box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.2);
}

.input-field::placeholder {
    color: var(--text-tertiary);
}

.select-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    cursor: pointer;
}

/* ПАРОЛЬ */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* ЧЕКБОКС */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-input);
    position: relative;
    transition: all var(--transition-fast);
}

.checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--deepseek-blue);
    border-color: var(--deepseek-blue);
}

.checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

/* КНОПКА */
.connect-btn {
    margin-top: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--deepseek-blue), var(--deepseek-blue-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-button);
}

.connect-btn:active {
    transform: translateY(0);
}

/* УВЕДОМЛЕНИЯ */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ПОДВАЛ */
.login-footer {
    margin-top: auto;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-link.donate {
    color: #ef4444;
}

.footer-link.donate:hover {
    color: #ff6b6b;
}

/* КНОПКИ ТЕМЫ И ЯЗЫКА */
.theme-btn, .lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-btn:hover, .lang-btn:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.theme-btn i, .lang-btn i {
    font-size: 0.9rem;
}

/* ВЫПАДАЮЩИЕ МЕНЮ */
.theme-selector, .lang-selector {
    position: relative;
}

.theme-dropdown, .lang-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 120px;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-card);
}

.theme-dropdown.show, .lang-dropdown.show {
    display: block;
}

.theme-option, .lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.theme-option:hover, .lang-option:hover {
    background: var(--bg-surface);
}

.theme-option.active, .lang-option.active {
    color: var(--deepseek-blue);
    font-weight: 500;
}

.theme-option i {
    font-size: 0.9rem;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        justify-content: center;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .deepseek-logo {
        width: 100px;
        height: 21px;
    }
    
    .admin-label {
        font-size: 1.1rem;
    }
}