.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 300;
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    align-items: stretch;
}

/* =========================================
   THEMING SYSTEM
   ========================================= */

/* Default fallback color (Purple) */
.privilege-card {
    flex: 1 1 380px;
    max-width: 430px;
    width: 100%;

    --accent-color: #a855f7; /* Default Purple */
    --accent-glow: rgba(168, 85, 247, 0.3);

    background: linear-gradient(135deg, #2d2d2d 0%, #242424 100%);
    border-radius: 12px;
    border: 2px solid #3d3d3d;
    padding: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
}

/* Specific Card Themes */

/* Premium - Purple */
.privilege-card:has(.card-header.premium) {
    --accent-color: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.3);
}

/* Rainbow - Light Blue / Mixed */
.privilege-card:has(.card-header.rainbow) {
    --accent-color: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.3);
}

/* Reserve - Gold/Amber */
.privilege-card:has(.card-header.reserve) {
    --accent-color: #fbbf24;
    --accent-glow: rgba(251, 191, 36, 0.3);
}

/* Centurion - Blue */
.privilege-card:has(.card-header.centurion) {
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
}

/* Mason - Purple/Dark Violet */
.privilege-card:has(.card-header.mason) {
    --accent-color: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.3);
}

/* Grandmaster - Yellow/Gold */
.privilege-card:has(.card-header.grandmaster) {
    --accent-color: #eab308;
    --accent-glow: rgba(234, 179, 8, 0.3);
}

/* Overlord - Red */
.privilege-card:has(.card-header.overlord) {
    --accent-color: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.3);
}

/* UNIFIED: Uses Variable */

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color) / 0%;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    z-index: 1;
    box-shadow: 0 4px 15px var(--accent-glow);
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.card-header {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    padding: 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--accent-color); /* Uses Variable */
}

/* Keep existing header animations/styles specific content untouched */
.card-header.premium::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(139, 61, 219, 0.12) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

.card-header.premium::after {
    content: '✦';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 75px;
    color: rgb(190 127 249 / 42%);
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.card-header.rainbow::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: conic-gradient(
            from 0deg,
            rgba(255, 0, 0, 0.1),
            rgba(255, 165, 0, 0.1),
            rgba(255, 255, 0, 0.1),
            rgba(0, 255, 0, 0.1),
            rgba(0, 191, 255, 0.1),
            rgba(138, 43, 226, 0.1),
            rgba(255, 0, 0, 0.1)
    );
    animation: rotate 10s linear infinite;
    filter: blur(40px);
    opacity: 0.8;
}

.card-header.rainbow::after {
    content: '🎨';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    opacity: 0.2;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.card-header.reserve::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(245, 158, 11, 0.15) 0%, transparent 40%),
    conic-gradient(from 225deg,
            rgba(251, 191, 36, 0.1),
            rgba(255, 255, 255, 0.05),
            rgba(251, 191, 36, 0.1));
    animation: rotate 20s linear infinite;
    filter: blur(20px);
}

.card-header.reserve::after {
    content: '🗝️';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    color: rgba(251, 191, 36, 0.25);
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.5));
}

.card-header.centurion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(96, 165, 250, 0.15) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.card-header.centurion::after {
    content: '⚔';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    color: rgba(59, 130, 246, 0.25);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

.card-header.mason::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(168 85 247 / 53%);
    animation: pulse 6s ease-in-out infinite alternate;
}

.card-header.mason::after {
    content: '👁️';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    color: rgba(168, 85, 247, 0.2);
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.5));
}

.card-header.grandmaster::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at 30% 30%, rgba(234, 179, 8, 0.18) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 40%),
    conic-gradient(from 45deg,
            rgba(234, 179, 8, 0.1),
            rgba(168, 85, 247, 0.1),
            rgba(234, 179, 8, 0.1));
    animation: rotate 25s linear infinite;
    filter: blur(25px);
}

.card-header.grandmaster::after {
    content: '♚';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    color: rgba(234, 179, 8, 0.3);
    filter: drop-shadow(0 0 20px rgba(234, 179, 8, 0.6));
}

.card-header.overlord::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.2) 0%, transparent 60%),
    conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(239, 68, 68, 0.1) 180deg, transparent 360deg);
    animation: rotate 15s linear infinite;
    filter: blur(10px);
}

.card-header.overlord::after {
    content: '🦅';
    position: absolute;
    top: 20px;
    right: 18px;
    font-size: 70px;
    color: rgba(239, 68, 68, 0.25);
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.5));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.25;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    from {
        opacity: 0.15;
        text-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
    }
    to {
        opacity: 0.25;
        text-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
    }
}

@keyframes slide {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 80px 80px;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.card-title {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.card-price {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* UNIFIED: Uses Variable */
.card-price.regular {
    background: var(--accent-color);
    color: #fff;
}

/* UNIFIED: Uses Variable */
.card-price.discount-price {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.old-price {
    font-size: 1rem;
    color: #888;
    text-decoration: line-through;
    z-index: 1;
    position: relative;
}

.card-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.benefits-list {
    list-style: none;
    flex: 1;
    padding: 0;
}

.benefits-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #d1d1d1;
    border-bottom: 1px solid #333;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color); /* Uses Variable */
    font-size: 1.2rem;
    top: 12px;
    line-height: 1.2;
}

.offline-purchase-btn {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: default !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.purchase-btn {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.purchase-btn::before {
    margin-right: 8px;
}

.purchase-btn:hover {
    background: var(--accent-color);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.purchase-btn:active {
    transform: scale(0.98);
}
/* Specific Border Colors are now handled by variable, but we keep these just in case or for redundancy if needed, though they are technically overridden by the var on .card-header */
.card-header.premium {
    border-bottom-color: var(--accent-color);
}
.card-header.rainbow {
    border-bottom-color: var(--accent-color);
}
.card-header.reserve {
    border-bottom-color: var(--accent-color);
}
.card-header.centurion {
    border-bottom-color: var(--accent-color);
}
.card-header.mason {
    border-bottom-color: var(--accent-color);
}
.card-header.grandmaster {
    border-bottom-color: var(--accent-color);
}
.card-header.overlord {
    border-bottom-color: var(--accent-color);
}

/* Close Button */
.cabinet-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    z-index: 2;
}

/* UNIFIED: Uses Variable */
.info-value.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

/* Price Display */
.price-display {
    background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
    border: 2px solid var(--accent-color); /* Uses Variable */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.price-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 8px;
}

/* UNIFIED: Uses Variable */
.price-amount {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Demo button to show modal */
.demo-btn {
    padding: 15px 30px;
    background: #a855f7;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.demo-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* =========================================
   SECTON: PURCHASES (ПРИОБРЕТЕНИЯ)
   ========================================= */

.section-title {
    font-size: 2rem;
    margin: 60px 0 30px;
    padding-left: 20px;
    border-left: 4px solid #a855f7;
    color: #fff;
    font-weight: 300;
}

.purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.purchase-card {
    background: linear-gradient(145deg, #2a2a2a 0%, #202020 100%);
    border: 1px solid #3d3d3d;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.purchase-card:hover {
    border-color: #555;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Header: Title & Timer */
.purchase-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.purchase-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.purchase-timer {
    font-size: 0.85rem;
    color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.purchase-timer::before {
    content: '⏳';
    font-size: 0.8rem;
}

/* Prefix Preview Section */
.prefix-preview-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.prefix-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prefix-visual {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 4px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.05); /* Default bg */
}

/* Action Buttons Area */
.purchase-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Change Prefix / Rules Button (Primary-ish) */
.btn-settings {
    background: #3d3d3d;
    color: #fff;
    border: 1px solid #4a4a4a;
}

.btn-settings:hover {
    background: #4a4a4a;
    border-color: #666;
}

.btn-settings.prefix-btn::before {
    content: '✎';
}

.btn-settings.rules-btn::before {
    content: '📜';
}

/* Refund Button (Danger) */
.btn-refund {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    opacity: 0.8;
}

.btn-refund:hover {
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.btn-refund::before {
    content: '↩';
    font-size: 1.1rem;
}

/* =========================================
   MODAL CONTENTS (Specifics)
   ========================================= */

/* Rules Text Area */
.rules-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    padding: 20px;
    max-height: 700px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.rules-text {
    color: #d1d1d1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Scrollbar styling for rules */
.rules-container::-webkit-scrollbar {
    width: 8px;
}

.rules-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.rules-container::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* Helper Text for Inputs */
.input-hint {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 6px;
    text-align: right;
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .modal-container {
        width: 95%;
    }

    .modal-body {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .price-amount {
        font-size: 1.6rem;
    }
}