/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #6b46c1;
    --primary-dark: #553c9a;
    --primary-light: #9f7aea;
    --secondary: #38a169;
    --secondary-dark: #2f855a;
    --danger: #e53e3e;
    --warning: #fbbf24;
    --info: #4299e1;

    --dark-bg: #1a202c;
    --dark-card: #2d3748;
    --light-bg: #f7fafc;
    --light-card: #ffffff;

    --text-dark: #2d3748;
    --text-light: #f7fafc;
    --text-muted: #718096;

    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    color: white;
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-currency {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: black;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 70, 193, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #4a5568, #2d3748);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #2d3748, #1a202c);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #f56565, #e53e3e);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.fa-play {
    margin-left: 0.2rem;
}

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-check input {
    width: auto;
}

/* ===== АЛЕРТЫ ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(45deg, #c6f6d5, #9ae6b4);
    color: #22543d;
    border-left: 5px solid #38a169;
}

.alert-danger {
    background: linear-gradient(45deg, #fed7d7, #feb2b2);
    color: #742a2a;
    border-left: 5px solid #e53e3e;
}

.alert-info {
    background: linear-gradient(45deg, #bee3f8, #90cdf4);
    color: #2c5282;
    border-left: 5px solid #4299e1;
}

.alert-warning {
    background: linear-gradient(45deg, #feebc8, #fbd38d);
    color: #744210;
    border-left: 5px solid #ed8936;
}

/* ===== ПЛЕЕР ===== */
.radio-player {
    background: linear-gradient(145deg, var(--dark-card), var(--dark-bg));
    border-radius: 30px;
    padding: 2rem;
    color: white;
    box-shadow: var(--box-shadow-lg);
}

.now-playing {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.track-cover {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.track-cover:hover img {
    transform: scale(1.1);
}

.rarity-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 10px;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== ТАБЛИЦЫ ===== */
.table {
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #f7fafc;
}

/* ===== ГРИД СИСТЕМА ===== */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination .btn {
    min-width: 40px;
}

/* ===== ФУТЕР ===== */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.listener-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .now-playing {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .track-cover {
        width: 150px;
        height: 150px;
    }

    .player-controls {
        justify-content: center;
    }

    .row {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.spin {
    animation: spin 2s linear infinite;
}

/* ===== УТИЛИТЫ ===== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.p-5 {
    padding: 3rem;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* ===== БОНУС МОДАЛ ===== */
.bonus-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.bonus-modal.show {
    opacity: 1;
    visibility: visible;
}

.bonus-modal-content {
    background: linear-gradient(145deg, #1e2433, #14181f);
    border-radius: 40px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.bonus-modal.show .bonus-modal-content {
    transform: scale(1);
}

.bonus-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.bonus-modal-header h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bonus-modal-close {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bonus-modal-close:hover {
    color: white;
}

.bonus-modal-body {
    color: white;
    margin-bottom: 2rem;
}

.bonus-modal-body p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.bonus-amount {
    font-size: 3rem !important;
    font-weight: 800;
    color: #ffd700 !important;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin: 1rem 0 !important;
}

.bonus-expiry {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.bonus-modal-footer {
    display: flex;
    gap: 1rem;
}

.bonus-modal-footer .btn {
    flex: 1;
}

/* ===== ИНДИКАТОР БОНУСА ===== */
.bonus-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Не сжимается */
    height: 40px;
}

.bonus-pulse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    color: black;
    cursor: pointer;
    animation: bonusPulse 2s infinite;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    font-size: 1.2rem;
}

.bonus-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem 0.25rem 0.75rem;
    background: rgba(78, 205, 196, 0.15);
    border-radius: 40px;
    color: #4ecdc4;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #4ecdc4;
    height: 40px;
    backdrop-filter: blur(5px);
}

.bonus-progress i {
    font-size: 1rem;
    color: #4ecdc4;
}

.bonus-progress-text {
    background: #4ecdc4;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

@keyframes bonusPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.8);
    }
}

/* ===== КОНФЕТТИ ===== */
.confetti {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    background: #ffd700;
    animation: confettiFall 3s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}