/* ═══════════════════════════════════════════
   MODALS SYSTEM
   ═══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay.closing {
    opacity: 0;
}

.modal-container {
    background: rgba(12, 12, 18, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* ── Rank Detail Ambient Glow ── */
.rank-ambient {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 250px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.modal-body { position: relative; z-index: 1; }

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-overlay.closing .modal-container {
    transform: translateY(20px);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 75, 92, 0.2);
    border-color: rgba(255, 75, 92, 0.4);
    color: #ff4b5c;
}

.modal-body {
    padding: 32px;
}

/* ── Modal Back Button ── */
.modal-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    font-family: inherit;
}

.modal-back:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* ── Modal Titles ── */
.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 30px;
}

/* ── Rank List in Modal ── */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s;
}

.rank-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.rank-list-badge {
    width: 48px;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    flex-shrink: 0;
}

.rank-list-info {
    flex: 1;
    min-width: 0;
}

.rank-list-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.rank-list-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.rank-list-prices {
    text-align: right;
    flex-shrink: 0;
}

.rank-list-price {
    font-size: 0.95rem;
    font-weight: 700;
}

.rank-list-price-bs {
    font-size: 0.72rem;
    color: #55ff55;
    font-weight: 500;
}

.rank-list-arrow {
    color: rgba(255, 255, 255, 0.25);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Rank Detail in Modal ── */
.rank-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.rank-detail-badge {
    width: 96px;
    height: auto;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    flex-shrink: 0;
}

.rank-detail-title {
    font-size: 1.8rem;
    font-weight: 900;
}

.rank-detail-price {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 4px;
}

.rank-detail-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    display: inline-block;
    margin-top: 6px;
}

/* ── Rank Sections ── */
.rank-section {
    margin-bottom: 28px;
}

.rank-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rank-benefit {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.rank-benefit::before {
    content: '✓';
    font-weight: 700;
    flex-shrink: 0;
}

.rank-limits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.rank-limit {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.rank-limit-value {
    font-size: 1.3rem;
    font-weight: 800;
    display: block;
}

.rank-limit-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* ── Rank Buy Buttons ── */
.rank-buy {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.rank-buy-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 12px;
}

/* ── Kit Description (text below GUI) ── */
.kit-desc {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kit-desc-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

.kit-desc-group {
    margin-bottom: 18px;
}

.kit-desc-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kit-desc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.kit-desc-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kit-desc-name {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 0.82rem;
}

.kit-desc-qty {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    font-size: 0.72rem;
}

.kit-desc-enchants {
    color: #9999ff;
    font-size: 0.75rem;
    font-weight: 500;
}

.kit-desc-lore {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    font-style: italic;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .kit-desc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .kit-desc-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Rank Badge Showcase ── */
.rank-badge-showcase {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px 20px;
}

.rank-badge-big {
    width: 80px;
    height: auto;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.rank-badge-text p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

/* ── Rank Checkout Price Box ── */
.rank-price-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.rank-price-main {
    font-size: 2rem;
    font-weight: 900;
}

.rank-price-bs {
    font-size: 1.1rem;
    font-weight: 700;
    color: #55ff55;
    margin-top: 4px;
}

.rank-price-tasa {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    margin-top: 6px;
}

.rank-price-tasa span {
    color: rgba(255,255,255,0.25);
}

.rank-price-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 8px;
}

.btn-checkout {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s;
    -webkit-appearance: none;
}

.btn-checkout:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ── Checkout Flow ── */
.ck-step {
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
}

.ck-step-num {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 8px;
}

.ck-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.ck-subtitle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 24px;
}

.ck-summary {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.ck-item-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.ck-price-main {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
}

.ck-price-bs {
    font-size: 1.1rem;
    font-weight: 700;
    color: #55ff55;
    margin-top: 4px;
}

.ck-tasa {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    margin-top: 8px;
}

.ck-tasa small {
    color: rgba(255,255,255,0.2);
}

/* ── Checkout Buttons ── */
.ck-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 10px;
    transition: all 0.2s;
    background: linear-gradient(135deg, #ff4b5c, #d53f8c);
    color: #fff;
    -webkit-appearance: none;
}

.ck-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ck-btn-wa {
    background: #25D366;
    color: #fff;
}

.ck-btn-cancel,
.ck-btn-back {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    -webkit-appearance: none;
}

.ck-btn-cancel:hover,
.ck-btn-back:hover {
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── Payment Methods ── */
.ck-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ck-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: left;
    color: #fff;
    font-family: inherit;
    -webkit-appearance: none;
    width: 100%;
}

.ck-method:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.ck-method-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.ck-method-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.ck-method-desc {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
}

.ck-method-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #55ff55;
    flex-shrink: 0;
}

/* ── Payment Details ── */
.ck-pay-detail {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.ck-pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
}

.ck-pay-row:last-child { border-bottom: none; }

.ck-pay-row span:first-child {
    color: rgba(255,255,255,0.5);
}

.ck-pay-row strong {
    color: #fff;
    font-weight: 700;
    user-select: all;
}

.ck-pay-tasa span {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
}

.ck-pay-inst {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Report Form ── */
.ck-form {
    text-align: left;
    margin-bottom: 20px;
}

.ck-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    margin-bottom: 5px;
    margin-top: 14px;
}

.ck-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.ck-input:focus {
    border-color: rgba(255,75,92,0.5);
}

.ck-input::placeholder {
    color: rgba(255,255,255,0.2);
}

.ck-methods-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ck-method-info {
    flex: 1;
    text-align: left;
}

/* ── Phone row ── */
.ck-phone-row {
    display: flex;
    gap: 8px;
}

.ck-select {
    padding: 12px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: #1a1a24;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    min-width: 100px;
}

.ck-select option {
    background: #1a1a24;
    color: #fff;
    padding: 8px;
}

.ck-select:focus {
    border-color: rgba(255,75,92,0.5);
}

.ck-input-phone {
    flex: 1;
}

/* ── File upload ── */
.ck-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ck-file-input {
    display: none;
}

.ck-file-label {
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ck-file-label:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
}

.ck-file-name {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* ── Success screen ── */
.ck-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(85,255,85,0.15);
    color: #55ff55;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.ck-wa-urgency {
    background: rgba(37,211,102,0.08);
    border: 1px solid rgba(37,211,102,0.2);
    border-radius: 14px;
    padding: 24px 20px;
    margin: 24px 0 16px;
    text-align: center;
}

.ck-wa-urgency h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.ck-wa-urgency p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin-bottom: 14px;
}

.ck-wa-note {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    margin-top: 10px;
    margin-bottom: 0;
    font-style: italic;
}

/* ── Events Modal ── */
.events-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.event-modal-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.event-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.event-modal-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0 6px;
}

.event-modal-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.event-modal-week {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
}

.event-modal-icon {
    font-size: 32px;
    margin-bottom: 6px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 20px 10px;
    }

    .modal-body {
        padding: 24px 18px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .rank-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .rank-detail-badge {
        width: 72px;
    }

    .rank-benefits {
        grid-template-columns: 1fr;
    }

    .events-modal-grid {
        grid-template-columns: 1fr;
    }

    .rank-list-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .rank-list-badge {
        width: 36px;
    }
}
