@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght=500;800&family=Poppins:wght=400;600;700&display=swap');

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle, #20100a 0%, #080302 100%);
    color: #fff;
    text-align: center;
    padding: 0;
    margin: 0;
    height: 100vh;
    height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-wrapper {
    width: 100%;
    max-width: 390px;
    height: 94vh;
    background: linear-gradient(180deg, rgba(43, 24, 16, 0.85) 0%, rgba(15, 7, 4, 0.98) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid #e2b474;
    padding: 20px 15px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(226, 180, 116, 0.15), inset 0 0 20px rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header-zone {
    margin-top: 5px;
}

h2 {
    font-family: 'Orbitron', sans-serif;
    color: #e2b474;
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 3px;
    margin: 0;
    text-shadow: 0 0 12px rgba(226, 180, 116, 0.6);
}

.subtitle {
    color: #ddc3a5;
    font-size: 11px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.password-zone {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: auto 0;
    padding: 10px;
}

.password-zone p {
    font-size: 13px;
    color: #ddc3a5;
    line-height: 1.6;
    margin: 0 0 10px 0;
}

#inputSandi {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e2b474;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: all 0.3s;
}

#inputSandi:focus {
    border-color: #ff4757;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
}

.btn-verify {
    width: 100%;
    padding: 12px;
    background: #e2b474;
    color: #120704;
    border: none;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-verify:active {
    transform: scale(0.98);
    background: #ddc3a5;
}

.error-msg {
    color: #ff4757;
    font-size: 12px;
    font-weight: 600;
    display: none;
}

.card-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: auto 0;
    width: 100%;
    animation: fadeInKartu 0.4s ease forwards;
}

@keyframes fadeInKartu {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.mystery-card {
    height: 125px;
    background: linear-gradient(135deg, #4e3124 0%, #1e110b 100%);
    border: 2px solid #e2b474;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    position: relative;
    overflow: hidden;
}

.mystery-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.mystery-card:active {
    transform: scale(0.95);
    border-color: #ff4757;
}

.mystery-card .icon {
    font-size: 28px;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    animation: melayang 2.5s ease-in-out infinite;
}

.mystery-card .label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: #e2b474;
    font-weight: 800;
}

@keyframes melayang {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(3deg); }
}

.scratch-area {
    position: relative;
    width: 100%;
    height: 280px;
    margin: auto 0;
    background: #120704;
    border-radius: 16px;
    border: 3px solid #e2b474;
    box-shadow: 0 0 25px rgba(226, 180, 116, 0.3);
    overflow: hidden;
    display: none;
    animation: fokusKartu 0.5s ease forwards;
}

@keyframes fokusKartu {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.prize-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    background: radial-gradient(circle, #2d1910 0%, #120704 100%);
    padding: 15px;
}

.prize-title { 
    font-size: 13px; 
    color: #ddc3a5; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    font-weight: bold;
}

.prize-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 12px 0;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.voucher-neon {
    background: #ff4757;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 10px;
    font-size: 22px;
    letter-spacing: 4px;
    box-shadow: 0 0 25px rgba(255, 71, 87, 0.9);
    animation: berdenyut 1.5s infinite;
}

@keyframes berdenyut {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    touch-action: none;
}

.action-zone {
    margin-bottom: 5px;
    min-height: 35px;
    font-size: 12px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}