/* style.css - Estilo básico em dark theme para o painel Aviator */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #122015 0, #050b08 45%, #020504 100%);
    color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.app-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-main {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
    align-items: stretch;
}

/* Modo jogo: iframe centralizado e apenas o card do Aviator visível */
.app-main.game-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-main.game-mode .game-card {
    max-width: 960px;
    width: 100%;
}

.app-main.game-mode .analytics-card {
    max-width: 960px;
    width: 100%;
}

.app-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 16px;
    background: radial-gradient(circle at top left, rgba(0, 255, 148, 0.25), transparent 50%),
                linear-gradient(135deg, #050f09, #021e11);
    border: 1px solid rgba(46, 255, 140, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.app-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    background: radial-gradient(circle at 20% 0, rgba(80, 255, 150, 0.3), transparent 55%);
    box-shadow: 0 0 0 1px rgba(80, 255, 150, 0.3);
}

.app-logo.small {
    width: 28px;
    height: 28px;
    border-radius: 10px;
}

.app-header-text h1 {
    font-size: 1.5rem;
    letter-spacing: 0.04em;
}

.app-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.card {
    background: radial-gradient(circle at top, #0c1910 0, #050a07 55%, #020504 100%);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

.card h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.9rem;
    opacity: 0.9;
}

input,
select {
    background: #050913;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 9px 10px;
    color: #e5ecff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus {
    border-color: #00ffb4;
    box-shadow: 0 0 0 1px rgba(0, 255, 180, 0.4);
    background: #050b18;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#loginButton {
    width: 100%;
    background: linear-gradient(135deg, #00ff94, #00c24a);
    color: #02030a;
    box-shadow: 0 8px 18px rgba(0, 255, 148, 0.45);
}

#loginButton:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 27px rgba(0, 255, 180, 0.6);
}

#loginButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: #f5f7fa;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.status-text {
    margin-top: 10px;
    font-size: 0.88rem;
    min-height: 1.2em;
}

.status-text.info {
    color: #00ff94;
}

.status-text.success {
    color: #00ffb4;
}

.status-text.error {
    color: #ff5b5b;
}

.game-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.game-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-header h2 {
    font-size: 1.05rem;
}

.game-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle at top, #101827, #050811 60%, #000 100%);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Estados dinâmicos no container do jogo conforme últimas velas */
.game-card.game-glow-pink {
    box-shadow: 0 0 40px rgba(255, 111, 191, 0.9);
    border-color: rgba(255, 111, 191, 0.7);
}

.game-card.game-glow-blue {
    box-shadow: 0 0 40px rgba(53, 182, 255, 0.9);
    border-color: rgba(53, 182, 255, 0.7);
}

.app-footer {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
    padding: 4px 0;
}

/* Reposiciona o badge do reCAPTCHA próximo ao rodapé, rolando junto com a página (sem ocultar) */
.grecaptcha-badge {
    right: -1114px !important;
    bottom: 0 !important;
    z-index: 5 !important;
    transform: scale(0.9);
    transform-origin: bottom right;
}

/* CARD DE ANÁLISE RÁPIDA */
.analytics-card {
    margin-top: 8px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.analytics-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.analytics-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.analytics-block {
    background: radial-gradient(circle at top, rgba(0, 255, 148, 0.08), rgba(3, 8, 6, 0.95));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
    font-size: 0.8rem;
}

.analytics-block h4 {
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.analytics-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.74rem;
    background: rgba(0, 255, 148, 0.12);
    border: 1px solid rgba(0, 255, 148, 0.5);
    color: #9fffd1;
}

.analytics-list {
    list-style: none;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.analytics-list li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.analytics-list span {
    font-size: 0.78rem;
}

.analytics-bars {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
}

.analytics-bar-label {
    width: 46px;
    opacity: 0.8;
}

.analytics-bar-track {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    overflow: hidden;
}

.analytics-bar-fill {
    height: 6px;
    border-radius: 999px;
}

/* BARRA DE ÚLTIMAS VELAS */
.candles-bar {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: radial-gradient(circle at top, rgba(0, 255, 148, 0.18), rgba(5, 10, 8, 0.95));
    border: 1px solid rgba(0, 255, 148, 0.35);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

/* CARD DE SINAL ENTRE VELAS E JOGO */
.signal-card {
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: radial-gradient(circle at top, rgba(0, 255, 148, 0.22), rgba(5, 10, 8, 0.96));
    border: 1px solid rgba(0, 255, 148, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
}

.signal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 255, 148, 0.4);
}

.signal-body {
    font-size: 0.9rem;
    line-height: 1.4;
}

.signal-body p {
    margin: 4px 0;
}

.candles-bar-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.candles-bar-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.candles-bar-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.candles-bar-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0;
}

.candles-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.candle-item {
    min-width: 56px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(3, 8, 6, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.78rem;
}

.candle-mult {
    font-weight: 600;
}

.candle-mult.blue {
    color: #35b6ff;
}

.candle-mult.purple {
    color: #c37bff;
}

.candle-mult.pink {
    color: #ff6fbf;
}

.candle-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* HERO (lado esquerdo no desktop) */
.hero-card {
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top right, rgba(0, 255, 148, 0.18), transparent 60%);
    opacity: 0.85;
    pointer-events: none;
}

.hero-card h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.hero-text {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 14px;
}

.hero-list {
    position: relative;
    z-index: 1;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-badge {
    background: rgba(0, 255, 148, 0.14);
    border: 1px solid rgba(0, 255, 148, 0.6);
    color: #9fffd1;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.hero-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
}

.hero-pill {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #00ff94, #008f3d);
    color: #021108;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.78rem;
}

.hero-note {
    opacity: 0.85;
}

/* MODAL GENÉRICO */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 999;
}

.modal-card {
    width: 100%;
    max-width: 720px;
    background: radial-gradient(circle at top, #0c1910 0, #050a07 55%, #020504 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-header {
    padding: 14px 18px 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-header h3 {
    font-size: 1rem;
}

.modal-subtitle {
    font-size: 0.82rem;
    opacity: 0.8;
}

.modal-filters {
    padding: 10px 16px 2px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    align-items: flex-end;
}

.modal-filters-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-body {
    padding: 10px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    font-size: 0.8rem;
    opacity: 0.75;
    padding: 4px 6px;
}

.history-list {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 8, 6, 0.98);
    max-height: 360px;
    overflow-y: auto;
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
}

.history-list .candle-item {
    width: auto;
    min-width: 56px;
}

.history-time-full {
    font-size: 0.78rem;
    opacity: 0.8;
}

.history-empty {
    padding: 10px 12px;
    text-align: center;
    opacity: 0.8;
}

/* SCROLLBAR PERSONALIZADO (barras com fundo escuro e trilho/verdes) */
.history-list,
.candles-list {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(0, 255, 148, 0.6) rgba(3, 8, 6, 0.95);
}

.history-list::-webkit-scrollbar,
.candles-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.history-list::-webkit-scrollbar-track,
.candles-list::-webkit-scrollbar-track {
    background: rgba(3, 8, 6, 0.95);
    border-radius: 999px;
}

.history-list::-webkit-scrollbar-thumb,
.candles-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff94, #00b85b);
    border-radius: 999px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.candles-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4dffc1, #00d46d);
}

/* LOGIN CARD */
.login-card {
    display: flex;
    flex-direction: column;
}

.login-card h2 {
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 14px;
}

.login-disclaimer {
    margin-top: 10px;
    font-size: 0.78rem;
    opacity: 0.75;
}

@media (max-width: 900px) {
    .app-wrapper {
        margin: 12px;
    }

    .app-main {
        grid-template-columns: 1fr;
    }

    .hero-card {
        order: 2;
    }

    .login-card {
        order: 1;
    }
}

@media (max-width: 600px) {
    .card {
        padding: 16px 14px;
    }

    .app-header {
        padding: 12px 14px;
    }

    .app-header-text h1 {
        font-size: 1.2rem;
    }

    /* Deixa o jogo mais alto no mobile para facilitar a visualização/toque */
    .app-main.game-mode .game-card {
        max-width: 100%;
    }

    .iframe-wrapper {
        /* Aumenta bastante a altura no mobile para exibir os dois painéis de aposta sem precisar rolar dentro do iframe */
        padding-top: 165%;
    }
}


