/* ================================================================
   CUSTOM FONTS: CHAKRA PETCH & PRESS START 2P
   ================================================================ */
@font-face {
    font-family: 'Press Start 2P';
    src: url('../fonts/Press_Start_2P/PressStart2P-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chakra Petch';
    src: url('../fonts/Chakra_Petch/ChakraPetch-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chakra Petch';
    src: url('../fonts/Chakra_Petch/ChakraPetch-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chakra Petch';
    src: url('../fonts/Chakra_Petch/ChakraPetch-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chakra Petch';
    src: url('../fonts/Chakra_Petch/ChakraPetch-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at 92% 50%, #462d1c 0%, #221610 25%, #0b0e16 60%, #05070c 100%);
    font-family: 'Chakra Petch', sans-serif;
    overflow: hidden;
    user-select: none;
    position: relative;
    padding: 4px 0;
}

/* ================================================================
   RETRO CRT ARCADE MONITOR CASING & SCREEN BEZEL
   ================================================================ */
.arcade-cabinet {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.crt-monitor {
    position: relative;
    background: linear-gradient(135deg, #52565c 0%, #3a3d42 25%, #24272a 65%, #18191b 100%);
    border-radius: 38px;
    padding: 14px 18px 18px 18px;
    box-shadow:
        0 0 0 2px #5a5f66,
        0 0 0 6px #1b1d20,
        0 0 0 10px #2a2d30,
        0 25px 70px rgba(0, 0, 0, 0.92),
        inset 0 2px 4px rgba(255, 255, 255, 0.45),
        inset 0 -4px 8px rgba(0, 0, 0, 0.85);
}

.crt-bezel {
    background: #000000;
    border-radius: 28px;
    padding: 5px;
    box-shadow:
        inset 2px 2px 0 rgba(255, 255, 255, 0.28),
        inset -2px -2px 0 rgba(0, 0, 0, 0.95),
        0 0 15px rgba(0, 0, 0, 0.9);
}

.screen-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.95),
        inset 0 0 10px rgba(0, 0, 0, 0.98);
    display: flex;
}

canvas {
    display: block;
    border-radius: 22px;
    cursor: crosshair;
    max-width: 95vw;
    max-height: 90vh;
    width: 900px;
    height: 600px;
}

.crt-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.12) 0px,
        rgba(0, 0, 0, 0.12) 1.5px,
        transparent 1.5px,
        transparent 3px
    );
    opacity: 0.75;
}

.crt-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow:
        inset 0 0 65px rgba(0, 0, 0, 0.8),
        inset 0 0 25px rgba(0, 0, 0, 0.9);
}

.crt-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 32%,
        transparent 60%
    );
}

/* ================================================================
   NICKNAME MODAL DIALOG
   ================================================================ */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 18, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-overlay.visible {
    display: flex;
}

.modal-card {
    background: linear-gradient(180deg, #131d33 0%, #0c1424 100%);
    border: 2px solid #2d4875;
    box-shadow: 0 0 50px rgba(0, 180, 255, 0.2), 0 20px 40px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 38px 32px;
    width: 480px;
    max-width: 90vw;
    text-align: center;
    color: #ffffff;
    animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-badge {
    display: inline-block;
    padding: 6px 14px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: #55ccff;
    background: rgba(0, 180, 255, 0.12);
    border: 1px solid rgba(0, 180, 255, 0.3);
    border-radius: 20px;
    margin-bottom: 20px;
}

.modal-card h2 {
    font-family: 'Press Start 2P', monospace;
    font-size: 18px;
    line-height: 1.4;
    color: #ffd700;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.modal-card p {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 15px;
    color: #8899bb;
    line-height: 1.6;
    margin-bottom: 24px;
}

#nickname-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#nickname-input {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: #080d1a;
    border: 2px solid #283d63;
    border-radius: 8px;
    outline: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

#nickname-input:focus {
    border-color: #00d2ff;
    box-shadow: 0 0 18px rgba(0, 210, 255, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

#nickname-submit {
    width: 100%;
    padding: 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #167a3a 0%, #1e9949 100%);
    border: 1px solid #44dd88;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(30, 153, 73, 0.4);
}

#nickname-submit:hover {
    background: linear-gradient(135deg, #1b8f45 0%, #26bf5d 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38, 191, 93, 0.55);
}

#nickname-submit:active {
    transform: translateY(1px);
}

/* ================================================================
   PRIVACY POLICY MODAL & OVERLAY STYLES
   ================================================================ */
.privacy-modal-card {
    width: 640px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 32px 30px;
}

.privacy-modal-content {
    overflow-y: auto;
    max-height: 52vh;
    padding-right: 12px;
    margin-bottom: 20px;
    user-select: text;
}

.privacy-modal-content::-webkit-scrollbar {
    width: 6px;
}

.privacy-modal-content::-webkit-scrollbar-track {
    background: rgba(8, 14, 28, 0.6);
    border-radius: 3px;
}

.privacy-modal-content::-webkit-scrollbar-thumb {
    background: #25446a;
    border-radius: 3px;
}

.privacy-modal-content::-webkit-scrollbar-thumb:hover {
    background: #3a689f;
}

.privacy-modal-content .policy-lead {
    font-size: 14px;
    line-height: 1.6;
    color: #e0ecff;
    margin-bottom: 16px;
    border-left: 3px solid #00d2ff;
    padding-left: 10px;
}

.privacy-modal-content h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 11px;
    color: #ffd700;
    margin: 16px 0 6px 0;
    letter-spacing: 0.5px;
}

.privacy-modal-content p {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 13.5px;
    line-height: 1.6;
    color: #9cb2d4;
    margin-bottom: 12px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    border-top: 1px solid rgba(85, 204, 255, 0.15);
    padding-top: 16px;
}

.policy-link-btn {
    padding: 11px 18px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #184275 0%, #2566b5 100%);
    border: 1px solid #55ccff;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.policy-link-btn:hover {
    background: linear-gradient(135deg, #205596 0%, #2f80e0 100%);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
    transform: translateY(-1px);
}

.modal-close-btn {
    padding: 11px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: #ffffff;
    background: #401818;
    border: 1px solid #aa3333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #662020;
    border-color: #ff5555;
    box-shadow: 0 0 12px rgba(255, 85, 85, 0.4);
}

/* ================================================================
   EXTERIOR ARCADE CABINET FOOTER
   ================================================================ */
.arcade-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    font-size: 12px;
    font-family: 'Chakra Petch', sans-serif;
    color: #617799;
    letter-spacing: 0.5px;
    z-index: 10;
    flex-wrap: wrap;
}

.arcade-footer .game-tag {
    color: #8da4ca;
    font-weight: 600;
}

.arcade-footer .dot {
    color: #3b4e6d;
}

.arcade-footer .creator-credit {
    color: #8da4ca;
}

.arcade-footer .creator-name {
    color: #ffd700;
    font-weight: 700;
}

.arcade-footer .footer-link {
    color: #00d2ff;
    background: none;
    border: none;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 2px 4px;
    transition: color 0.2s, text-shadow 0.2s;
}

.arcade-footer .footer-link:hover {
    color: #66ffff;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

/* ================================================================
   DIAMOND REWARDS MODAL (CYAN-TO-MAGENTA NEON SCI-FI CRT THEME)
   Matches arcade CRT synthwave aesthetic:
   - Cyan-to-magenta glowing gradient border
   - Deep space navy card background
   - Chakra Petch clean geometric tech typography
   - Neon glowing line-art vector icons (gamepad & retro TV)
   - Faceted glowing cyan gem
   - Deep plum action buttons with hot magenta border
   ================================================================ */
#diamond-modal.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(4, 8, 18, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    box-sizing: border-box;
}

#diamond-modal.visible {
    display: flex;
}

.diamond-modal-card {
    position: relative;
    width: 630px;
    max-width: 95%;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: auto;
    padding: 24px 28px 18px 28px;
    border-radius: 18px;
    background: #0e1626;
    /* Glowing rounded cyan-to-magenta neon gradient border */
    border: 2px solid transparent;
    background-image: 
        linear-gradient(#0e1626, #0e1626), 
        linear-gradient(135deg, #00e5ff 0%, #00e5ff 38%, #d946ef 70%, #ec4899 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 
        0 0 24px rgba(0, 229, 255, 0.35),
        0 0 30px rgba(236, 72, 153, 0.35),
        0 15px 45px rgba(0, 0, 0, 0.9);
    text-align: center;
    color: #ffffff;
    box-sizing: border-box;
    animation: popIn 0.25s ease-out;
}

.diamond-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.diamond-badge-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 6px #00e5ff);
}

.diamond-badge-text {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #1e133d;
    -webkit-text-stroke: 1.2px #a855f7;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.diamond-gem-wrapper {
    margin: 4px auto 4px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diamond-gem-svg {
    width: 38px;
    height: 32px;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.85));
}

.diamond-modal-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #f8fafc;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.diamond-modal-subtitle {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    color: #8fa0b8;
    margin: 0 0 22px 0;
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.diamond-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    margin-bottom: 8px;
    padding: 0 8px;
}

.diamond-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 236px;
}

.diamond-column-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin-bottom: 12px;
}

.neon-gamepad-svg {
    width: 48px;
    height: 34px;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.8));
}

.neon-tv-svg {
    width: 44px;
    height: 38px;
    filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.8));
}

.diamond-column-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #f6e5c5;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 10px 0;
}

.diamond-column-spacer {
    flex: 1;
}

/* Sponsored Video Ad Slot */
.diamond-ad-slot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 12px;
}

.ad-slot-header-label,
.ad-slot-footer-label {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #f6e5c5;
    text-transform: uppercase;
    text-align: center;
}

.ad-slot-header-label {
    margin-bottom: 6px;
}

.ad-slot-footer-label {
    margin-top: 8px;
}

.ad-placement-slot {
    background: #111827;
    border: 1px solid #28374d;
    border-radius: 8px;
    padding: 7px 16px;
    width: 100%;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.ad-play-arrow {
    color: #f6e5c5;
    font-size: 10px;
    line-height: 1;
}

.ad-preview-text {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

/* Action Buttons */
.diamond-btn {
    font-family: 'Chakra Petch', sans-serif;
    cursor: pointer;
    box-sizing: border-box;
}

.diamond-primary-btn {
    width: 100%;
    max-width: 250px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #ffffff;
    background: #42132e;
    border: 2px solid #b8236d;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-align: center;
    text-transform: uppercase;
}

.diamond-primary-btn:hover {
    background: #561b3f;
    border-color: #db2777;
    box-shadow: 0 0 14px rgba(219, 39, 119, 0.5);
    transform: translateY(-1px);
}

.diamond-primary-btn:active {
    transform: translateY(1px);
}

.diamond-primary-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Ad Feedback / Status */
.diamond-ad-status {
    min-height: 20px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    margin: 4px 0 6px 0;
    padding: 4px 10px;
    border-radius: 4px;
    display: none;
    text-align: center;
}

.diamond-ad-status.visible {
    display: block;
    background: rgba(14, 25, 45, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Footer Balance & Close */
.diamond-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    margin-top: 14px;
    padding-top: 12px;
}

.current-pts-badge {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #f6e5c5;
    text-transform: uppercase;
}

.current-pts-badge span {
    color: #f6e5c5;
}

.diamond-close-btn {
    padding: 6px 18px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fce7f3;
    background: #381126;
    border: 1.5px solid #9d174d;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.diamond-close-btn:hover {
    background: #4c1634;
    border-color: #db2777;
    box-shadow: 0 0 10px rgba(219, 39, 119, 0.4);
    transform: translateY(-1px);
}

.diamond-close-btn:active {
    transform: translateY(1px);
}
