/* assets/css/main.css */

:root {
    /* --- Цветовая палитра (Светлая тема с неоном) --- */
    --primary-color: #6366f1;       /* Индиго */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);

    --secondary-color: #ec4899;     /* Розовый неон */
    --secondary-glow: rgba(236, 72, 153, 0.4);

    --success-color: #10b981;       /* Мятный зеленый */
    --error-color: #ef4444;         /* Яркий красный */
    --warning-color: #f59e0b;       /* Янтарный */

    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); /* Светлый фон */
    --bg-body: #f3f4f6;

    --text-main: #1f2937;           /* Почти черный */
    --text-muted: #6b7280;          /* Серый */
    --text-light: #ffffff;

    /* --- Стекломорфизм --- */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    
    /* --- Размеры и отступы --- */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    
    --font-family: 'Montserrat', sans-serif;
}

/* --- Сброс и База --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Убирает синий фон при тапе на мобильных */
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden; /* Скрываем гориз. скролл */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button, input, select {
    font-family: inherit;
    border: none;
    outline: none;
}

/* --- Утилиты Стекломорфизма --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Для Safari */
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

/* --- Кнопки --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: 0.2s;
}

.btn-small:hover {
    background: white;
}

.btn-block {
    width: 100%;
}

/* --- Формы --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
.custom-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-main);
}

input:focus,
.custom-select:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* --- Иконки (SVG Helper) --- */
.icon-holder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.icon-holder svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* --- Загрузчик (Spinner) --- */
.loader-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Модальные окна --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: none; /* JS переключает на flex */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background: #fff;
    text-align: center;
    position: relative;
    animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* --- Анимации --- */
@keyframes bounceIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bounce-in {
    animation: bounceIn 0.5s;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* --- Цвета текста --- */
.text-green { color: var(--success-color); }
.text-red { color: var(--error-color); }
.text-purple { color: var(--primary-color); }

/* --- Скроллбар (кастомный) --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}