/* переменные и цвета */
@font-face {
    font-family: 'Carter One';
    src: url('/fonts/carter-one-latin-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --primary-color: #ff6c42;
    --primary-hover: #ff5722;
    --secondary-color: #00d4ff;
    --accent-color: #933bff;
    --neon-blue: #00548b;
    --neon-pink: #bd22d9;
    --neon-purple: #9c27b0;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-accent: #00d4ff;
    --background: #0a0a0f;
    --card-bg: rgba(15, 15, 35, 0.9);
    --modal-bg: rgba(20, 20, 35, 0.98);
    --glass-bg: rgba(20, 25, 40, 0.85);
    --shadow-neon: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 30px rgba(107, 70, 193, 0.3);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-animation: glow 2s ease-in-out infinite alternate;
    --rating-low: #f44336;
    --rating-high: #4caf50;
    --rules-panel-width: clamp(420px, 32vw, 480px);
    --panels-gap: clamp(16px, 2vw, 32px);
    --music-menu-expanded-max-width: min(82vw, 1660px);
    --music-menu-min-width: 220px;
    --music-menu-collapsed-min-width: 120px;
    --layout-max-width: 1400px;
    --container-side-padding: 20px;
    --music-menu-collapsed-peek: 72px;
    --music-menu-padding-block: clamp(38px, 5vh, 36px);
    --music-menu-padding-inline: clamp(24px, 4vw, 32px);
    --music-menu-wheel-offset: calc(var(--music-menu-padding-block) * 2 + 56px);

    /* Header */
    --primary-purple: #6b46c1;
    --secondary-purple: #8b5cf6;
    --accent-cyan: rgba(20, 25, 40, 0.85);
    --accent-pink: #be95ff;
    --dark-bg: #0f0f23;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 108, 66, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 20, 147, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-footer {
    width: 100%;
    margin: 32px 0 0;
    padding: 22px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(12, 18, 34, 0.92), rgba(31, 17, 51, 0.88));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    text-align: left;
}

.site-footer__text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.site-footer__date {
    color: var(--text-primary);
    font-weight: 700;
}

/* Анимации. */

@keyframes textGlow {

    0%,
    100% {
        text-shadow:
            0 0 20px rgba(0, 242, 255, 0.3),
            0 0 40px rgba(255, 20, 147, 0.2);
        background-position: 0% 50%;
    }

    50% {
        text-shadow:
            0 0 30px rgba(0, 242, 255, 0.5),
            0 0 60px rgba(255, 20, 147, 0.3),
            0 0 80px rgba(138, 43, 226, 0.2);
        background-position: 100% 50%;
    }
}

@keyframes headerImageGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 35px rgba(255, 108, 66, 0.3));
        transform: scale(1.02);
    }
}

@keyframes shimmerPulse {

    0%,
    100% {
        opacity: 0.3;
        filter: brightness(0.9) blur(0px);
    }

    50% {
        opacity: 0.8;
        filter: brightness(1.2) blur(2px);
    }
}


@keyframes floatingGlow {

    0%,
    100% {
        transform: translateY(0);
        filter:
            drop-shadow(0 0 20px rgba(107, 70, 193, 0.5)) drop-shadow(0 0 40px rgba(0, 242, 255, 0.3));
    }

    50% {
        transform: translateY(-8px);
        filter:
            drop-shadow(0 5px 25px rgba(107, 70, 193, 0.6)) drop-shadow(0 0 50px rgba(0, 242, 255, 0.4));
    }
}

.settings-panel__field {
    margin-bottom: 24px;
}

.settings-panel__ai-control {
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-panel__select {
    flex: 1;
}

.settings-panel__status-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-color-muted, #a0a0c0);
    min-height: 1.2em;
    transition: opacity 0.3s ease;
}

.btn-small {
    padding: 8px 12px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-small i {
    font-size: 0.9rem;
}

/* Animations for buttons */
#checkAiModelsBtn:disabled i,
#refreshKpQuotaBtn:disabled i {
    animation: fa-spin 1s infinite linear;
}

.settings-panel__quota-info {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-panel__quota-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.settings-panel__quota-label {
    color: var(--text-secondary);
}

.settings-panel__quota-value {
    font-family: 'Inter', monospace;
    font-weight: 600;
    color: var(--secondary-color);
}


.toast-container {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5000;
    pointer-events: none;
    width: min(520px, 90vw);
}

.toast-notification {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.52), rgba(255, 108, 66, 0.52));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 212, 255, 0.35);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: var(--border-radius-small);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: var(--transition);
}

.toast-notification::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #26c6da);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.7);
}

.toast-notification.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-notification.toast-success {
    border-color: rgba(0, 212, 255, 0.35);
}

.toast-notification.toast-warning {
    border-color: rgba(255, 214, 102, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 214, 102, 0.35);
}

.toast-notification.toast-error {
    border-color: rgba(255, 108, 66, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 108, 66, 0.45);
}
