/* === Переменные цвета и шрифтов === */
:root {
    --primary-color: #8e44ad;
    --bg-dark: #0f0f0f;
    --text-light: #ffffff;
    --card-bg: #181818;
    --border-color: #333;
    --muted: #aaaaaa;
    --font-main: 'Segoe UI', sans-serif;
    --accent-color: #8e44ad;
    --border-accent: #8e44ad;
    --header-bg: #2e0a4a;
    --link-color: #b68df5;
    --chart-purple: #8e44ad;
    --chart-cyan: #4bc0c0;
    --chart-pink: #ff6384;
    --chart-yellow: #ffce56;
    --chart-blue: #36a2eb;
    --chart-green: #2ecc71;
    --chart-indigo: #6610f2;
    --chart-orange: #fd7e14;
    --chart-red: #e74c3c;
}

/* === Базовые элементы === */
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

hr {
    border-top: 1px solid var(--border-accent);
}

/* === Карточки === */
.card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-accent);
    border-radius: 1rem;
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

.card .btn {
    border-radius: 0.5rem;
}

/* === Кнопки === */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #732d91;
    border-color: #732d91;
    color: #fff;
}

.btn-outline-light {
    color: #b184f5;
    border: 1px solid #b184f5;
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: linear-gradient(45deg, #6610f2, #9f4df0);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(159, 77, 240, 0.4);
}

.btn-outline-light:focus {
    box-shadow: 0 0 0 0.25rem rgba(142, 68, 173, 0.4);
    border-color: #9f4df0;
}

.btn-accent {
    background: linear-gradient(45deg, #8e44ad, #9f4df0);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 0 6px rgba(159, 77, 240, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-accent:hover {
    background: linear-gradient(45deg, #732d91, #8e44ad);
    box-shadow: 0 0 12px rgba(159, 77, 240, 0.5);
    transform: scale(1.02);
}

.btn-accent:active {
    transform: scale(0.98);
    box-shadow: inset 0 0 5px rgba(159, 77, 240, 0.4);
}

.btn-accent:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(142, 68, 173, 0.4);
}

.btn-accent:disabled,
.btn-accent.disabled {
    background: #5a3377;
    color: #ccc;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-accent.loading {
    pointer-events: none;
    color: transparent !important;
    position: relative;
}

.btn-accent.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -0.75rem;
    margin-left: -0.75rem;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* === Формы и инпуты === */
input,
textarea,
select {
    background-color: var(--card-bg);
    color: var(--text-light);
    border: 1px solid var(--border-accent);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 5px var(--accent-color);
}

.form-control {
    background-color: #111;
    color: #fff;
    border: 1px solid var(--accent-color);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 6px rgba(142, 68, 173, 0.6);
}

/* === UI Элементы === */
.stat-highlight {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3388ff;
}

.count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-right: 0.25rem;
}

.unit {
    font-size: 1.5rem;
    color: var(--muted);
}

.text-muted {
    color: var(--muted) !important;
}

.highlight {
    color: var(--accent-color);
}

.border-accent {
    border-color: var(--accent-color) !important;
}

/* === Херо секция === */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
        max-height: none;
    }

    .count {
        font-size: 1.5rem;
    }

    .unit {
        font-size: 1.25rem;
    }
}

.hero-subtext {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e0b7f7;
    text-shadow: 0 0 4px rgba(142, 68, 173, 0.6);
}

@keyframes pulse-underline {
    0% {
        text-shadow: 0 0 0 rgba(142, 68, 173, 0.6);
    }
    50% {
        text-shadow: 0 0 12px rgba(142, 68, 173, 0.9);
    }
    100% {
        text-shadow: 0 0 0 rgba(142, 68, 173, 0.6);
    }
}

.highlight-underline {
    color: var(--accent-color);
    font-weight: bold;
    animation: pulse-underline 2.5s infinite ease-in-out;
}

/* === Бейджи === */
.badge {
    display: inline-block;
    padding: 0.3em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    border-radius: 0.375rem;
}

.badge-immortal {
    background-color: #9b59b6;
}

.badge-expired {
    background-color: #e74c3c;
}

.badge-active {
    background-color: #27ae60;
}

.badge.bg-purple {
    background-color: #8e44ad;
    color: #fff;
}

/* === Тосты === */
.toast-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-color: #181818;
    color: #fff;
    border-left: 5px solid var(--accent-color);
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.5s forwards, fadeOut 0.5s 3.5s forwards;
}

.toast-alert.success {
    border-color: #28a745;
}

.toast-alert.error {
    border-color: #dc3545;
}

.toast-alert.info {
    border-color: #17a2b8;
}

.toast-alert.warning {
    border-color: #ffc107;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (max-width: 576px) {
    .toast-alert {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* === Навигация и подвал === */
.bg-body-secondary,
.bg-primary,
.navbar,
.footer {
    background-color: var(--header-bg) !important;
    color: var(--text-light);
}

.footer {
    border-top: 1px solid var(--border-accent);
    background-color: var(--header-bg);
}

.progress {
    background-color: #2c2c2c;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
}

#adblock-warning {
    border-left: 4px solid #ffc107;
    background-color: #2b2b2b;
    color: #fff3cd;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.adsbox {
    display: block !important;
    height: 1px !important;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto; /* занимает оставшееся пространство */
}

.footer {
    flex-shrink: 0;
}

.btn-back-home {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-color);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid var(--accent-color);
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.btn-back-home:hover {
    color: #fff;
    background-color: var(--accent-color);
    border-bottom-color: transparent;
    box-shadow: 0 0 10px rgba(142, 68, 173, 0.4);
    text-decoration: none;
}

@media (max-width: 576px) {
    .btn-back-home {
        display: block;
        width: 100%;
        text-align: center;
        border: 2px solid var(--accent-color);
        border-radius: 0.5rem;
        background-color: transparent;
        padding: 1rem;
    }

    .btn-back-home:hover {
        background-color: var(--accent-color);
        color: #fff;
    }
}
.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    background-color: #181818;
    border: 2px solid var(--accent-color);
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(142, 68, 173, 0.4);
}

