/* ===== ROLETA ===== */

.roleta-main {
    max-width: 500px;
    margin: 80px auto 40px;
    padding: 0 16px;
    text-align: center;
}

.roleta-header {
    margin-bottom: 24px;
}

.roleta-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.roleta-header h1 i { -webkit-text-fill-color: #f97316; }

.roleta-header p {
    color: rgba(255,255,255,0.45);
    margin: 0;
    font-size: 0.9rem;
}

/* Config */
.roleta-config {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.roleta-config-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.roleta-source-btns, .roleta-type-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.roleta-src, .roleta-type {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.roleta-src:hover, .roleta-type:hover {
    background: rgba(255,255,255,0.06);
}

.roleta-src.active {
    background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(236,72,153,0.15));
    border-color: rgba(249,115,22,0.4);
    color: #fb923c;
}

.roleta-type.active {
    background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.15));
    border-color: rgba(139,92,246,0.4);
    color: #a78bfa;
}

.roleta-src i, .roleta-type i {
    margin-right: 4px;
}

/* Spinner Area */
.roleta-area {
    margin-bottom: 20px;
}

.roleta-spinner {
    width: 220px;
    height: 280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.02);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.roleta-spinner.spinning {
    border-color: rgba(249,115,22,0.4);
    box-shadow: 0 0 30px rgba(249,115,22,0.15);
}

.roleta-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.3);
}

.roleta-placeholder i {
    font-size: 3rem;
    color: rgba(249,115,22,0.4);
}

.roleta-placeholder p {
    font-size: 0.9rem;
    margin: 0;
}

.roleta-placeholder-loading i {
    animation: roletaLoading 0.8s ease-in-out infinite alternate;
}

@keyframes roletaLoading {
    from { transform: rotate(-14deg) scale(0.92); opacity: 0.55; }
    to { transform: rotate(14deg) scale(1.08); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .roleta-placeholder-loading i { animation: none; }
}

/* Spin Item */
.roleta-spin-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    width: 100%;
    height: 100%;
    animation: spinFadeIn 0.15s ease;
    color: inherit;
    text-decoration: none;
}

.roleta-spin-final {
    animation: spinReveal 0.5s ease;
}

.roleta-spin-clickable {
    cursor: pointer;
}

.roleta-spin-clickable:hover img,
.roleta-spin-clickable:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.5);
}

.roleta-spin-clickable:focus-visible {
    outline: 2px solid rgba(249,115,22,0.8);
    outline-offset: -6px;
}

.roleta-spin-item img {
    width: 120px;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.roleta-spin-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.roleta-spin-icon i {
    font-size: 2.5rem;
}

.roleta-spin-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@keyframes spinFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spinReveal {
    0% { opacity: 0; transform: scale(0.8); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Resultado */
.roleta-resultado {
    margin-top: 16px;
    animation: fadeUp 0.5s ease;
}

.roleta-resultado.show {
    animation: fadeUp 0.5s ease;
}

.roleta-resultado-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(236,72,153,0.06));
    border: 1px solid rgba(249,115,22,0.2);
    border-radius: 14px;
    text-align: left;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.roleta-resultado-card:hover,
.roleta-resultado-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(249,115,22,0.45);
    background: linear-gradient(135deg, rgba(249,115,22,0.13), rgba(236,72,153,0.1));
}

.roleta-resultado-card:focus-visible {
    outline: 2px solid rgba(249,115,22,0.8);
    outline-offset: 3px;
}

.roleta-resultado-card img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.roleta-resultado-info h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}

.roleta-resultado-type {
    font-size: 0.75rem;
    font-weight: 600;
}

.roleta-resultado-msg {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin: 8px 0 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button */
.roleta-btn-girar {
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}

.roleta-btn-girar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249,115,22,0.4);
}

.roleta-btn-girar:disabled {
    opacity: 0.6;
    cursor: default;
}

.roleta-pool-info {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .roleta-main { margin-top: 70px; padding: 0 12px; }
    .roleta-spinner { width: 190px; height: 250px; }
    .roleta-spin-item img { width: 100px; height: 145px; }
}

/* Light theme: surfaces, content and interaction states. */
:is(html.light-theme-early, body.light-theme) .roleta-header p,
:is(html.light-theme-early, body.light-theme) .roleta-config-group label,
:is(html.light-theme-early, body.light-theme) .roleta-placeholder,
:is(html.light-theme-early, body.light-theme) .roleta-resultado-msg,
:is(html.light-theme-early, body.light-theme) .roleta-pool-info {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .roleta-spin-title,
:is(html.light-theme-early, body.light-theme) .roleta-resultado-info h2 {
    color: var(--text, #1e293b);
}

:is(html.light-theme-early, body.light-theme) .roleta-src,
:is(html.light-theme-early, body.light-theme) .roleta-type,
:is(html.light-theme-early, body.light-theme) .roleta-spin-icon {
    background: var(--surface2, #f8f7f3); border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .roleta-src,
:is(html.light-theme-early, body.light-theme) .roleta-type {
    color: var(--text-muted, #526070);
}

:is(html.light-theme-early, body.light-theme) .roleta-src:hover,
:is(html.light-theme-early, body.light-theme) .roleta-type:hover {
    background: #edeaf5; border-color: rgba(109, 40, 217, .22);
}

:is(html.light-theme-early, body.light-theme) .roleta-src.active {
    color: #9a3412;
}

:is(html.light-theme-early, body.light-theme) .roleta-type.active {
    color: #6d28d9;
}

:is(html.light-theme-early, body.light-theme) .roleta-spinner {
    background: var(--surface, #fff); border-color: var(--border, rgba(30, 41, 59, .12));
}

:is(html.light-theme-early, body.light-theme) .roleta-btn-girar {
    background: linear-gradient(135deg, #c2410c, #be185d); color: #fff; border-color: transparent;
}

:is(html.light-theme-early, body.light-theme) .roleta-main {
    --type-movie: #1d4ed8;
}

:is(html.light-theme-early, body.light-theme) .roleta-header h1 { background-image: linear-gradient(135deg, #c2410c, #be185d, #6d28d9); }
:is(html.light-theme-early, body.light-theme) .roleta-header h1 i { -webkit-text-fill-color: #c2410c; }
:is(html.light-theme-early, body.light-theme) .roleta-src.active { background: linear-gradient(135deg, #ffedd5, #fce7f3); border-color: #d88b5d; }
:is(html.light-theme-early, body.light-theme) .roleta-type.active { background: #ede9fe; border-color: #b7a1ee; }

:is(html.light-theme-early, body.light-theme) .roleta-placeholder i { color: #c2410c; }
