/* Random Decision Maker */
header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #111827;
}

.input-section {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.input-section label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-section textarea {
    width: 100%;
    min-height: 140px;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-section textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

.char-count {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

.button {
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.75rem;
}

.button:not(.secondary) {
    background: #2563eb;
    color: #fff;
}

.button:not(.secondary):hover { background: #1d4ed8; transform: translateY(-1px); }
.button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.button.secondary { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.button.secondary:hover { background: #e5e7eb; }

.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#canvas {
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.result {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    min-height: 1.5rem;
    text-align: center;
}

.result.highlight { color: #2563eb; }

.instructions, .faq, .related {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.instructions h2, .faq h2, .related h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.instructions ol { padding-left: 1.25rem; }
.instructions li { color: #4b5563; font-size: 0.9rem; margin-bottom: 0.4rem; }

.faq-item { margin-bottom: 1rem; }
.faq-item h3 { font-size: 0.95rem; font-weight: 700; color: #111827; margin-bottom: 0.3rem; }
.faq-item p { color: #4b5563; font-size: 0.875rem; }

.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 0.5rem; }
.related a { color: #2563eb; text-decoration: none; font-size: 0.9rem; }
.related a:hover { text-decoration: underline; }

footer { text-align: center; padding: 1.5rem; color: #6b7280; font-size: 0.85rem; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

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

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal h2 { font-size: 1.2rem; font-weight: 700; color: #111827; margin-bottom: 1rem; }

.winner {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2563eb;
    margin: 1rem 0;
    word-break: break-word;
}

.modal button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.75rem;
    background: #2563eb;
    color: #fff;
    transition: background 0.2s;
}

.modal button:hover { background: #1d4ed8; }
.modal button.secondary { background: #f3f4f6; color: #374151; }
.modal button.secondary:hover { background: #e5e7eb; }

/* Dark mode */
html[data-theme="dark"] header h1 { color: #f1f5f9; }
html[data-theme="dark"] .input-section,
html[data-theme="dark"] .instructions,
html[data-theme="dark"] .faq,
html[data-theme="dark"] .related { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .input-section label,
html[data-theme="dark"] .instructions h2,
html[data-theme="dark"] .faq h2,
html[data-theme="dark"] .related h2,
html[data-theme="dark"] .faq-item h3 { color: #f1f5f9; }
html[data-theme="dark"] .input-section textarea { background: #0f172a; border-color: #475569; color: #e2e8f0; }
html[data-theme="dark"] .instructions li,
html[data-theme="dark"] .faq-item p { color: #94a3b8; }
html[data-theme="dark"] .modal { background: #1e293b; }
html[data-theme="dark"] .modal h2 { color: #f1f5f9; }
