:root {
    --bg-color: #1a0525;
    --primary: #8e44ad;
    --secondary: #f1c40f;
    --accent: #2ecc71;
    --danger: #e74c3c;
    --text: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka One', cursive;
}

body {
    background: radial-gradient(circle at center, #3b1054 0%, var(--bg-color) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    overflow-x: hidden;
}

.game-container {
    width: 90%;
    max-width: 480px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 4px solid #6b2f96;
    border-radius: 40px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 0 30px rgba(107, 47, 150, 0.4);
    position: relative;
    text-align: center;
}

header {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.game-title {
    font-size: 2.2rem;
    color: var(--secondary);
    text-shadow: 3px 3px 0 #d35400, 5px 5px 15px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.highlight { color: #fff; }

.btn-reset-icon {
    position: absolute;
    right: -10px;
    background: var(--danger);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 0 #c0392b;
    transition: transform 0.1s;
}

.btn-reset-icon:active { transform: translateY(4px); box-shadow: none; }

.panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

.input-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-field label { color: #a29bfe; font-size: 0.9rem; }

input[type="number"] {
    width: 90px;
    padding: 12px;
    font-size: 1.5rem;
    text-align: center;
    border: 3px solid var(--primary);
    border-radius: 15px;
    background: #2d133e;
    color: white;
    outline: none;
}

/* Botões Estilo Game */
.btn-main, .btn-next, .btn-modal-yes, .btn-modal-no {
    border: none;
    padding: 18px 30px;
    font-size: 1.4rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    transition: transform 0.1s, box-shadow 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-main {
    background: linear-gradient(180deg, #f1c40f 0%, #e67e22 100%);
    box-shadow: 0 8px 0 #d35400, 0 10px 20px rgba(0,0,0,0.3);
}

.btn-next {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 8px 0 #219a52;
}

button:active:not(:disabled) {
    transform: translateY(6px);
    box-shadow: 0 2px 0 transparent;
}

button:disabled {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Canvas e Roleta */
.canvas-wrapper { margin: 10px auto; }

/* Histórico */
.history-container {
    margin-top: 30px;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 20px;
    border: 2px solid var(--primary);
}

.history-container h3 {
    font-size: 0.8rem;
    color: #00d2d3;
    margin-bottom: 15px;
}

.history-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.history-item {
    background: var(--primary);
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    box-shadow: 0 4px 0 #5f27cd;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-card {
    background: #2d133e;
    border: 4px solid var(--secondary);
    border-radius: 30px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: modalSlide 0.3s ease-out;
}

.modal-header i { font-size: 3.5rem; color: var(--secondary); margin-bottom: 15px; }
.modal-card p { margin: 20px 0 30px; color: #ccc; line-height: 1.4; }

.modal-footer { display: flex; flex-direction: column; gap: 10px; }

.btn-modal-yes { background: var(--danger); box-shadow: 0 6px 0 #c0392b; }
.btn-modal-no { background: #95a5a6; box-shadow: 0 6px 0 #7f8c8d; }

.hidden { display: none !important; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes modalSlide { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }