/* Estilos da Roleta de Sorteio */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 16px 24px;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #38bdf8;
}

.header-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
}

.main-container {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media(min-width: 992px) {
    .main-container {
        grid-template-columns: 1.3fr 1fr;
        align-items: start;
    }
}

.card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* ÁREA DA ROLETA */
.roulette-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

canvas#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.pointer-arrow {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 48px;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.spin-center-btn {
    position: absolute;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle, #f8fafc 30%, #e2e8f0 100%);
    color: #0f172a;
    border: 5px solid #0284c7;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.spin-center-btn:hover {
    transform: scale(1.06);
    border-color: #38bdf8;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.spin-center-btn:active {
    transform: scale(0.96);
}

.roulette-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    justify-content: center;
    width: 100%;
}

.btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

.btn-primary:hover {
    background-color: #0369a1;
}

.btn-secondary {
    background-color: #334155;
    color: #f8fafc;
    border-color: #475569;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-link {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 12px;
    cursor: pointer;
}

/* PAINEL DE OPÇÕES */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #cbd5e1;
}

.badge {
    background-color: #0284c7;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.presets-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.presets-label {
    font-size: 12px;
    color: #64748b;
}

.preset-pill {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.preset-pill:hover {
    color: #38bdf8;
    border-color: #38bdf8;
}

.input-label {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 6px;
}

textarea#itemsTextarea {
    width: 100%;
    height: 200px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    color: #f8fafc;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

textarea#itemsTextarea:focus {
    outline: none;
    border-color: #38bdf8;
}

.config-settings {
    margin-top: 14px;
    border-top: 1px solid #334155;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    color: #cbd5e1;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.duration-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duration-item select {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 6px 10px;
    border-radius: 6px;
}

.history-section {
    margin-top: 18px;
    border-top: 1px solid #334155;
    padding-top: 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-header h3 {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.history-list {
    list-style: none;
    max-height: 140px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: #0f172a;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.history-empty {
    color: #64748b;
    font-size: 12px;
    padding: 6px 0;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: #1e293b;
    border: 2px solid #38bdf8;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-badge {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #38bdf8;
    margin-bottom: 8px;
}

.winner-display {
    font-size: 2rem;
    font-weight: 800;
    color: #facc15;
    word-break: break-word;
    margin: 14px 0 24px 0;
    padding: 12px;
    background: #0f172a;
    border-radius: 12px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
