/**
 * Portal — hub do questionário (lista / welcome).
 * Visual leve alinhado à experiência game, sem o bundle completo do questionário.
 */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap');
@import './game-start-button.css';
@import './battery-ranking.css';

.qhub {
    --qhub-bg-center: #1e40af;
    --qhub-bg-mid: #0f172a;
    --qhub-bg-edge: #020617;
    --qhub-gold: #d4a84b;
    --qhub-gold-light: #f0d78c;
    --qhub-gold-dark: #8b6914;
    --qhub-gem: #38bdf8;
    --qhub-text: #f8fafc;
    --qhub-muted: #94a3b8;
    --qhub-font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
}

.qhub .page-header__title {
    font-family: var(--qhub-font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.qhub-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: radial-gradient(
        ellipse 110% 90% at 50% -10%,
        color-mix(in srgb, var(--qhub-bg-center) 55%, transparent),
        var(--qhub-bg-mid) 42%,
        var(--qhub-bg-edge) 100%
    );
    box-shadow:
        0 12px 40px rgba(2, 6, 23, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--qhub-text);
}

.qhub-card__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 65% 45% at 50% 0%, rgba(56, 189, 248, 0.14), transparent 70%);
}

.qhub-card__inner {
    position: relative;
    z-index: 1;
    padding: 1.35rem 1.25rem 1.5rem;
}



@media (min-width: 640px) {
    .qhub-card__inner {
        padding: 1.5rem 1.5rem 1.65rem;
    }
}

.qhub-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    border-radius: 9999px;
    border: 1px solid rgba(212, 168, 75, 0.35);
    background: rgba(0, 0, 0, 0.22);
    padding: 0.2rem 0.65rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--qhub-gold-light);
}

.qhub-card__title {
    margin: 0;
    font-family: var(--qhub-font-display);
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
}

.qhub-meta {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1.1rem 0 0;
    padding: 0;
    font-size: 0.875rem;
}

.qhub-meta__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.qhub-meta dt {
    margin: 0;
    font-weight: 600;
    color: var(--qhub-muted);
}

.qhub-meta dd {
    margin: 0;
    color: var(--qhub-text);
}

.qhub-meta__dates {
    font-size: 0.75rem;
    color: var(--qhub-muted);
}

.qhub-actions {
    margin-top: 1.35rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .qhub-actions {
        align-items: flex-start;
    }
}

.qhub-notice {
    margin: 0 0 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.qhub-notice--ok {
    color: #86efac;
}

.qhub-notice--warn {
    color: #fcd34d;
}

/* Espaço lateral para asas do botão game */
.qhub-actions__btn-wrap {
    position: relative;
    width: 100%;
    padding: 0 0.85rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .qhub-actions__btn-wrap {
        width: auto;
        padding: 0 0.65rem;
    }
}

.qhub-btn {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: none;
    border-radius: 9999px;
    font-family: var(--qhub-font-display);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 640px) {
    .qhub-btn {
        display: inline-flex;
        width: auto;
    }
}

.qhub-btn--ghost {
    padding: 0.85rem 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--qhub-text);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    animation: none;
}

.qhub-btn--ghost::before,
.qhub-btn--ghost::after {
    display: none;
}

.qhub-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.qhub-hint {
    margin: 0;
    font-size: 0.7rem;
    color: var(--qhub-muted);
}

.qhub-hint--game {
    margin-top: 0.5rem;
    color: #bfdbfe;
    font-size: 0.78rem;
}

.qhub-empty {
    border-radius: 1rem;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    background: rgba(255, 255, 255, 0.65);
    padding: 1.25rem 1.35rem;
}

/* Controles de áudio — canto inferior direito */
.qhub-audio-controls {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem 0.4rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.qhub-audio-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 5.5rem;
    height: 0.22rem;
    margin: 0;
    border-radius: 9999px;
    background: rgba(240, 215, 140, 0.25);
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
}

.qhub-audio-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--qhub-gold-light, #f0d78c);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(240, 215, 140, 0.5);
}

.qhub-audio-volume::-moz-range-thumb {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    background: var(--qhub-gold-light, #f0d78c);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(240, 215, 140, 0.5);
}

.qhub-audio-controls.is-muted .qhub-audio-volume {
    opacity: 0.45;
}

.qhub-audio-toggle {
    position: static;
    bottom: auto;
    right: auto;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(100, 116, 139, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.qhub-audio-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(100, 116, 139, 0.65);
    box-shadow: none;
}

@media (max-width: 480px) {
    .qhub-audio-controls {
        bottom: 1rem;
        right: 1rem;
        gap: 0.4rem;
        padding: 0.35rem 0.45rem 0.35rem 0.6rem;
    }

    .qhub-audio-volume {
        width: 4rem;
    }
}

.qhub-audio-toggle .audio-off-mark {
    display: none;
}

.qhub-audio-toggle.is-muted .audio-off-mark {
    display: block;
}
