/* ======================================================
   БАЗОВЫЕ СТИЛИ
   ====================================================== */

/* Прячем стандартные стрелочки у input type="number" */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* ======================================================
   АНИМАЦИИ
   ====================================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(59, 130, 246, 0.5), 0 0 24px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.7), 0 0 40px rgba(59, 130, 246, 0.3); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-container {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ======================================================
   СПИННЕР ЗАГРУЗКИ
   ====================================================== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* ======================================================
   КАСТОМНЫЙ СКРОЛЛБАР
   ====================================================== */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 1);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 1);
}

/* ======================================================
   ПРОГРЕСС-БАР (Промпт 16) — Неоновые кружки + Трек
   ====================================================== */
.progress-bar-container {
    position: relative;
}

.progress-track {
    position: absolute;
    left: 32px;
    right: 32px;
    top: 16px;
    height: 3px;
    background: #1f2937;
    border-radius: 4px;
    z-index: 0;
}

.progress-fill {
    position: absolute;
    left: 32px;
    top: 16px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 4px;
    z-index: 1;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.progress-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;

    /* Неактивное состояние */
    background: #1f2937;
    border: 2px solid #374151;
    color: #6b7280;
}

.progress-dot.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: 2px solid rgba(59, 130, 246, 0.6);
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6), 0 0 30px rgba(59, 130, 246, 0.2);
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.progress-dot.completed {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #fff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    animation: none;
}

/* ======================================================
   RANGE SLIDER (Промпт 16)
   ====================================================== */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, #3b82f6 0%, #1f2937 0%);
    transition: background 0.1s;
}

/* Thumb — WebKit */
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: 3px solid #0f172a;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.7), 0 2px 8px rgba(0, 0, 0, 0.5);
}
.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

/* Thumb — Firefox */
.range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border: 3px solid #0f172a;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.range-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: #1f2937;
}

/* ======================================================
   МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ (Промпт 15)
   ====================================================== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.auth-modal-overlay:not(.hidden) {
    animation: overlayIn 0.25s ease-out forwards;
}

.auth-modal-card {
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ======================================================
   СТРАНИЦА GIVEAWAYS (Промпт 17)
   ====================================================== */
.task-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.task-btn {
    transition: all 0.2s ease;
}
.task-btn:not(:disabled):hover {
    transform: scale(1.03);
}
.task-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* ======================================================
   ЛЕНТА ПОКУПОК (marquee)
   ====================================================== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-container {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
}

.marquee-container:hover {
    animation-play-state: paused;
}
