:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);
    --accent-cyan: #00d4ff;
    --accent-red: #e1251b;
    --accent-purple: #635bff;
    --accent-yellow: #ffc439;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(0, 212, 255, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,26,0.93) 0%, rgba(26,26,46,0.9) 50%, rgba(22,33,62,0.93) 100%),
                url('../images/fondo_ff.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    will-change: transform;
}

/* Particle background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(0, 212, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 30%, rgba(0, 212, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 70%, rgba(225, 37, 27, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 90%, rgba(0, 212, 255, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(99, 91, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ===================== HEADER ===================== */
header {
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left img {
    height: 32px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
}

.header-left .divider {
    width: 1px;
    height: 24px;
    background: var(--border-glass);
}

.header-left .title {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-right .user-icon {
    font-size: 30px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-right .user-icon:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    position: relative;
    z-index: 1;
}

/* ===================== HERO SECTION ===================== */
.hero-section {
    text-align: center;
    padding: 40px 20px 30px;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), #60efff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ===================== SECTION CONTAINER ===================== */
.section-container {
    margin-bottom: 35px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-number {
    background: linear-gradient(135deg, var(--accent-cyan), #0098b3);
    color: var(--bg-primary);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===================== CARD LOGIN (ID Verification) ===================== */
.card-login {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 24px;
    max-width: 520px;
    transition: border-color 0.3s;
}

.card-login:hover {
    border-color: rgba(0, 212, 255, 0.2);
}

.input-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-id-wrapper {
    display: flex;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s;
}

.player-id-wrapper:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.player-id-wrapper input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

.player-id-wrapper input::placeholder {
    color: var(--text-muted);
}

.player-id-wrapper .btn-login-small {
    background: linear-gradient(135deg, var(--accent-cyan), #0098b3);
    color: var(--bg-primary);
    border: none;
    padding: 0 28px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.player-id-wrapper .btn-login-small:hover {
    filter: brightness(1.15);
}

/* Player verified status */
#player_verify_status {
    margin-top: 12px;
    font-size: 14px;
}

/* ===================== DIAMONDS GRID ===================== */
.diamonds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.diamond-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.diamond-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.diamond-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.diamond-card:hover::before {
    opacity: 1;
}

.diamond-card.selected {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: var(--shadow-glow), inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.diamond-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 11px;
    color: var(--bg-primary);
    background: var(--accent-cyan);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.diamond-card svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.4));
    transition: filter 0.3s;
    animation: diamondIdle 3s ease-in-out infinite;
}

@keyframes diamondIdle {
    0%   { transform: translateY(0)    rotate(0deg)   scale(1);    filter: drop-shadow(0 0 6px  rgba(0,212,255,0.4)); }
    25%  { transform: translateY(-4px) rotate(8deg)   scale(1.08); filter: drop-shadow(0 0 10px rgba(0,212,255,0.7)); }
    50%  { transform: translateY(0)    rotate(0deg)   scale(1);    filter: drop-shadow(0 0 6px  rgba(0,212,255,0.4)); }
    75%  { transform: translateY(-4px) rotate(-8deg)  scale(1.08); filter: drop-shadow(0 0 10px rgba(0,212,255,0.7)); }
    100% { transform: translateY(0)    rotate(0deg)   scale(1);    filter: drop-shadow(0 0 6px  rgba(0,212,255,0.4)); }
}

.diamond-card:hover svg,
.diamond-card.selected svg {
    animation: diamondActive 0.6s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.9));
}

@keyframes diamondActive {
    from { transform: translateY(0)    rotate(-12deg) scale(1.1); }
    to   { transform: translateY(-6px) rotate(12deg)  scale(1.18); }
}

.diamond-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.diamond-price {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Loading state for diamonds grid */
.diamonds-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.diamonds-loading i {
    font-size: 24px;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

/* ===================== PAYMENT SECTION ===================== */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.payment-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-card:hover {
    transform: translateY(-2px);
}

.payment-card.stripe-card:hover,
.payment-card.stripe-card.selected {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(99, 91, 255, 0.15);
    background: rgba(99, 91, 255, 0.08);
}

.payment-card.paypal-card:hover,
.payment-card.paypal-card.selected {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 20px rgba(255, 196, 57, 0.15);
    background: rgba(255, 196, 57, 0.08);
}

.payment-card .payment-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-card img {
    max-height: 30px;
}

/* ===================== PAYMENT BUTTONS ===================== */
.payment-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 480px;
}

.btn-pay {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.btn-pay:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.btn-stripe {
    background: linear-gradient(135deg, #635bff, #7c3aed);
    color: #fff;
}

.btn-stripe:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 91, 255, 0.35);
}

.btn-paypal {
    background: linear-gradient(135deg, #ffc439, #f0b000);
    color: #111;
}

.btn-paypal:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 196, 57, 0.35);
}

/* PayPal button container */
#paypal-button-container {
    margin-top: 10px;
    max-width: 480px;
}

/* ===================== ORDER SUMMARY ===================== */
.order-summary {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 30px;
    max-width: 480px;
    display: none;
}

.order-summary.visible {
    display: block;
}

.order-summary h3 {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 14px;
    font-weight: 700;
}

.order-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-glass);
    font-size: 14px;
}

.order-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-cyan);
    padding-top: 12px;
}

.order-row span:first-child {
    color: var(--text-secondary);
}

/* ===================== LOGIN POPUP ===================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-popup {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid var(--border-glass);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: 20px;
}

.login-popup .close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.login-popup .close:hover {
    color: var(--accent-red);
}

.login-popup h2 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--accent-cyan);
    font-weight: 700;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-submit-login {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-red), #c41e15);
    color: white;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.btn-submit-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(225, 37, 27, 0.3);
}

.login-popup .register-link {
    text-align: center;
    border-top: 1px solid var(--border-glass);
    margin-top: 22px;
    padding-top: 16px;
    font-size: 13px;
}

.login-popup .register-link a {
    color: var(--text-muted);
    text-decoration: none;
}

.login-popup .register-link a span {
    color: var(--accent-cyan);
    font-weight: 600;
}

.login-popup .register-link a:hover span {
    text-decoration: underline;
}

/* ===================== SECTION LOCKED ===================== */
.section-locked {
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
    filter: grayscale(0.4);
    transition: opacity 0.4s, filter 0.4s;
}

/* ===================== HIDDEN ===================== */
.hidden {
    display: none !important;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.9rem;
    }

    .diamonds-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .diamond-card {
        padding: 16px 12px;
    }

    .diamond-val {
        font-size: 1.1rem;
    }

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

    .main-content {
        padding: 20px 16px 40px;
    }

    header {
        padding: 10px 16px;
    }

    .header-left .title {
        font-size: 13px;
    }

    .player-id-wrapper .btn-login-small {
        padding: 0 14px;
        font-size: 13px;
    }

    .step-dot {
        padding: 6px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
}

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

    .player-id-wrapper input {
        flex: 1 1 0;
        min-width: 0;
        font-size: 13px;
        padding: 12px 10px;
    }

    .player-id-wrapper .btn-login-small {
        flex-shrink: 0;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* ===================== STEP INDICATOR ===================== */
.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.step-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    transition: all 0.3s;
}

.step-dot.active {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
}

.step-dot.completed {
    color: #22c55e;
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.step-connector {
    width: 30px;
    height: 1px;
    background: var(--border-glass);
    align-self: center;
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-container {
    animation: fadeInUp 0.5s ease both;
}

.section-container:nth-child(2) {
    animation-delay: 0.1s;
}

.section-container:nth-child(3) {
    animation-delay: 0.2s;
}
