html, body {
    background-color: #000 !important;
    margin: 0; padding: 0;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    font-family: 'Courier New', Courier, monospace;
    color: #00FF41; overflow: hidden;
}

#matrixCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; display: none;
}

.matrix-box {
    border: 3px solid #00FF41;
    padding: 25px;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 25px #00FF41;
    text-align: center;
    border-radius: 20px;
    width: 90%; max-width: 900px;
    z-index: 10;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; margin: 20px 0;
}

@media (min-width: 800px) {
    .grid-container { grid-template-columns: repeat(6, 1fr); }
}

.slot { display: flex; flex-direction: column; align-items: center; gap: 10px; }

input {
    width: 75px; height: 75px;
    background: #111; border: 3px solid #00FF41;
    color: #00FF41; font-size: 2.5rem;
    text-align: center; border-radius: 12px;
}

button {
    background: #004400; color: #00FF41;
    border: 2px solid #00FF41; padding: 12px 5px;
    width: 100%; cursor: pointer; border-radius: 10px;
    font-weight: bold; font-size: 0.8rem;
}

.feedback { height: 20px; font-weight: bold; }

.solved-input { background-color: #00FF41 !important; color: #000 !important; }

.wrong-input { border-color: #ff0000 !important; animation: shake 0.4s; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
}

footer { position: fixed; bottom: 20px; width: 100%; text-align: center; }

.share-btn {
    background: rgba(0, 51, 0, 0.7);
    border: 1px solid #00FF41; color: #00FF41;
    padding: 10px 20px; border-radius: 5px; cursor: pointer;
    width: auto !important;
}

#qr-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none; justify-content: center; align-items: center;
    z-index: 10000;
}

.qr-modal {
    background: #000; border: 2px solid #00FF41;
    padding: 30px; border-radius: 20px; text-align: center;
}

#qrcode { background: white; padding: 15px; display: inline-block; border-radius: 10px; }

.success-text { color: #FFD700 !important; text-shadow: 0 0 20px #FFD700; }

.winner-mode #matrixCanvas { display: block; }