/* MOBILE-FIRST CSS - REFATORADO DO ZERO */

/* Reset completo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Variáveis CSS */
:root {
    /* Cores principais */
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-light: #2a2a2a;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --text-dim: #888888;
    
    /* Cores de destaque */
    --green: #00ff00;
    --red: #ff0040;
    --yellow: #ffd700;
    --border: #333333;
    
    /* Tamanhos */
    --radius: 8px;
    --gap-xs: 4px;
    --gap-sm: 8px;
    --gap-md: 16px;
    --gap-lg: 24px;
}

/* Base do body */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.4;
    font-size: 14px;
    overflow-x: hidden;
}

/* Container responsivo */
.container {
    width: 100%;
    max-width: 100vw;
    padding: 0 12px;
    margin: 0 auto;
}

/* Header simplificado */
.header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--green);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 8px 0;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: var(--gap-sm);
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--green);
    background: transparent;
    color: var(--green);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
}

.btn:hover, .btn:focus {
    background: var(--green);
    color: var(--bg-dark);
}

.btn-primary {
    background: var(--green);
    color: var(--bg-dark);
}

/* Main content */
.main {
    padding: 16px 0;
}

/* Seção de tempo */
.time-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.time-display {
    font-size: 18px;
    font-weight: 700;
    color: var(--green);
    font-family: 'Courier New', monospace;
    margin: 8px 0;
}

.time-status {
    font-size: 12px;
    color: var(--text-gray);
}

/* Bitcoin section */
.bitcoin-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.bitcoin-title {
    color: var(--yellow);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.bitcoin-price {
    font-size: 14px;
    color: var(--text-gray);
    margin: 8px 0;
}

.bitcoin-alert {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 11px;
    margin: 12px 0;
}

/* Plataformas section */
.platforms-section {
    margin-bottom: 20px;
}

.section-title {
    color: var(--green);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.platform-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.platform-number {
    background: var(--green);
    color: var(--bg-dark);
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    min-width: 24px;
    text-align: center;
}

.platform-title {
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    flex: 1;
}

.platform-btn {
    color: var(--text-white);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 255, 0, 0.3);
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-btn:hover {
    background: var(--green);
    color: var(--bg-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

/* GRID DE JOGOS - MOBILE FIRST 4x4 */
.games-section {
    margin-bottom: 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px 0;
}

/* Card do jogo - MOBILE FIRST */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.game-card:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

/* Imagem do jogo - MOBILE (foto completa sem cortar) */
.game-image-container {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 3px;
    position: relative;
}

.game-image {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.game-card:hover .game-image {
    transform: scale(1.05);
}

/* Info do jogo */
.game-info {
    flex-shrink: 0;
    padding: 2px;
}

.game-name {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 3px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Porcentagens */
.game-percentages {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    padding: 2px;
    margin-bottom: 2px;
}

.percentage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8px;
    line-height: 1;
    margin-bottom: 1px;
}

.percentage-item:last-child {
    margin-bottom: 0;
}

.percentage-label {
    color: var(--text-gray);
    font-weight: 400;
}

.percentage-value {
    color: var(--green);
    font-weight: 600;
    font-size: 7px;
}

/* Classes de cor para porcentagens */
.percentage-value.medium-percentage {
    color: var(--yellow) !important;
}

.percentage-value.low-percentage {
    color: var(--red) !important;
}

/* Min pagantes */
.min-pagante {
    color: var(--yellow);
    font-size: 7px;
    font-weight: 600;
    text-align: center;
}

/* Status badges */
.game-card.hot-game::after {
    content: '🔥';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    z-index: 10;
}

.game-card.medium-game::after {
    content: '⚡';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    z-index: 10;
}

.game-card.active-pagantes {
    border-color: var(--green) !important;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Como jogar */
.how-to-play {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 20px 0;
}

.how-to-play h2 {
    color: var(--green);
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
}

.bet-type {
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-gray);
}

.bet-label {
    color: var(--green);
    font-weight: 600;
}

/* Contatos */
.contacts-section {
    margin: 20px 0;
}

.contacts-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-white);
    font-size: 12px;
    transition: all 0.2s ease;
}

.contact-link:hover {
    border-color: var(--green);
    color: var(--green);
}

/* Aviso legal */
.legal-notice {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: 12px;
    margin: 20px 0;
}

.legal-notice p {
    font-size: 10px;
    color: var(--text-gray);
    line-height: 1.4;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
}

.footer p {
    font-size: 10px;
    color: var(--text-dim);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: var(--bg-card);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    color: var(--text-gray);
    cursor: pointer;
}

.close:hover {
    color: var(--red);
}

/* RESPONSIVIDADE - TABLET E DESKTOP */
@media (min-width: 480px) {
    body { font-size: 15px; }
    .container { padding: 0 16px; }
    .games-grid { gap: 8px; }
    .game-card { padding: 6px; }
    .game-name { font-size: 10px; }
    .percentage-item { font-size: 9px; }
    .percentage-value { font-size: 8px; }
}

@media (min-width: 768px) {
    body { font-size: 16px; }
    .container { padding: 0 20px; max-width: 800px; }
    .games-grid { gap: 10px; padding: 12px 0; }
    .game-card { padding: 8px; }
    
    /* DESKTOP: imagem quadrada com crop */
    .game-image-container {
        aspect-ratio: 1 / 1;
        overflow: hidden;
        background: #000;
    }
    
    .game-image {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: cover;
    }
    
    .game-name { font-size: 11px; }
    .percentage-item { font-size: 10px; }
    .percentage-value { font-size: 9px; }
    .contacts-grid { 
        flex-direction: row; 
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (min-width: 1024px) {
    .container { max-width: 900px; }
    .games-grid { gap: 12px; padding: 16px 0; }
    .game-card { padding: 10px; }
    .game-name { font-size: 12px; }
    .percentage-item { font-size: 11px; }
    .percentage-value { font-size: 10px; }
}

/* ADMIN STYLES */
.admin-section {
    background: var(--bg-light);
    border: 2px solid var(--green);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.admin-title {
    color: var(--green);
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 500;
}

.form-input, .form-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 14px;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--green);
}

.admin-platforms {
    margin-top: 20px;
}

.admin-platform-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.platform-info {
    flex: 1;
}

.platform-admin-name {
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}

.platform-admin-url {
    color: var(--text-gray);
    font-size: 10px;
    word-break: break-all;
}

.btn-danger {
    background: var(--red);
    color: var(--text-white);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
}

/* LOGIN FORM */
.login-form {
    max-width: 300px;
    margin: 50px auto;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.login-title {
    color: var(--green);
    text-align: center;
    margin-bottom: 20px;
}

/* Animações sutis */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-card {
    animation: fadeIn 0.3s ease forwards;
}

/* Print media */
@media print {
    * { background: white !important; color: black !important; }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --bg-dark: #000000;
        --bg-card: #111111;
        --text-white: #ffffff;
        --green: #00ff00;
        --border: #666666;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}