/* --- VARIÁVEIS CSS --- */
:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary: #28a745;
    --primary-hover: #218838;
    --text-main: #ffffff;
    --text-sec: #b0b3b8;
    --border: #333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- CABEÇALHO (Para index.html) --- */
header {
    background-color: #000;
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1.2rem;
}

/* Logo pequeno (usado no cabeçalho do index.html) */
.header-logo {
    height: 40px; 
    width: auto;
    margin-right: 12px;
    vertical-align: middle; 
}

/* --- NOVO BLOCO: AÇÕES DO HEADER (REGRAS E PERFIL) --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Estilo do Link de Regras */
.rules-link {
    color: var(--text-sec);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rules-link:hover {
    color: var(--primary);
    background-color: rgba(40, 167, 69, 0.1);
}

.rules-icon {
    font-size: 1.1rem;
    line-height: 1;
}
/* --- FIM BLOCO NOVO --- */


.user-badge {
    background: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer; /* Adicionado para indicar que é clicável */
}

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.online { background-color: var(--primary); box-shadow: 0 0 5px var(--primary); }
.dot.offline { background-color: red; }

/* --- FILTROS (Para index.html) --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    background: transparent;
    border: 2px solid #444;
    color: #888;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover { border-color: #666; color: white; }
.filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.4);
}

/* --- CONTAINER PRINCIPAL (Para index.html) --- */
#container-itens {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.section-title {
    color: var(--text-sec);
    font-size: 1.2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loading { text-align: center; color: var(--text-sec); margin-top: 50px; }

/* --- A GRADE (GRID) CORRIGIDA --- */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px;
    align-items: stretch; 
}

/* --- CARD (LAYOUT CORRIGIDO) --- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}

.card:hover { border-color: #555; transform: translateY(-3px); }

/* Imagem Fixa */
.card-img {
    width: 100%;
    height: 220px; 
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
}

.card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

/* Corpo do Card */
.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1; 
    gap: 10px;
}

/* Título */
.card-title {
    font-size: 1.1rem;
    margin: 0;
    color: white;
    text-align: center;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em; 
}

/* Descrição */
.card-desc {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em; 
}

/* Timer e Histórico */
.meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
}

.timer-badge {
    background: #333;
    color: #ffd700;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.95rem;
    border: 1px solid #444;
}

.timer-badge.critical {
    background: rgba(220, 53, 69, 0.2);
    color: #ff4d4d;
    border-color: #ff4d4d;
    animation: pulsar 1s infinite;
}

.btn-historico {
    background: none;
    border: 1px solid #444;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    height: 100%;
}
.btn-historico:hover { border-color: #666; color: white; }

/* Grid de Preço */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #333;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.info-item span { font-size: 0.75rem; color: #666; margin-bottom: 2px; }
.info-item strong { font-size: 1rem; color: #ddd; }
.price-highlight { color: #28a745 !important; font-weight: bold; }

/* --- SEÇÃO DE LANCE CORRIGIDA --- */
.bid-section {
    margin-top: auto; 
    padding-top: 15px;
    border-top: 1px solid #333;
    width: 100%;
}

.bid-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch; 
}

.bid-input-group input {
    flex: 1 1 55%; 
    background: #333;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    min-width: 80px; 
}

.bid-btn {
    flex: 0 0 40%; 
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
    min-width: 80px; 
}
.bid-btn:hover { background-color: var(--primary-hover); }

/* --- STATUS E OUTROS --- */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.status-badge.win { background-color: #28a745; color: white; border: 1px solid #1e7e34; }
.status-badge.lose { background-color: #ffc107; color: #212529; border: 1px solid #d39e00; }

.card.winning { border-color: #28a745; box-shadow: 0 0 10px rgba(40, 167, 69, 0.1); }
.card.losing { border-color: #ffc107; }

/* --- CARROSSEL, MODAIS, TOASTS (Sem alteração) --- */
.carousel-controls {
    position: absolute; bottom: 10px; left: 0; width: 100%;
    display: flex; justify-content: center; align-items: center; gap: 15px;
    pointer-events: none;
}
.nav-btn {
    background: rgba(0,0,0,0.6); color: white; border: none; padding: 5px 10px;
    cursor: pointer; border-radius: 50%; font-size: 1rem; pointer-events: all;
}
.img-counter {
    background: rgba(0,0,0,0.6); color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem;
}

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-card {
    background: var(--card-bg); padding: 25px; border-radius: 12px; width: 90%; max-width: 400px;
    border: 1px solid #444; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

#lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); display: flex; justify-content: center; align-items: center;
    z-index: 3000; opacity: 0; pointer-events: none; transition: opacity 0.3s; cursor: zoom-out;
}
#lightbox.active { opacity: 1; pointer-events: all; }
#lightbox img { max-width: 95%; max-height: 95%; border-radius: 5px; box-shadow: 0 0 20px rgba(0,0,0,0.8); transition: transform 0.3s; }
#lightbox.active img { transform: scale(1); }

.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background-color: var(--primary); color: white; padding: 12px 30px; border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4); font-weight: bold; z-index: 9999;
    transition: opacity 0.5s, transform 0.5s;
}
.toast.hidden { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }

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

/* -------------------------------------- */
/* --- ESTILOS DE LOGIN OTIMIZADOS --- */
/* -------------------------------------- */

/* --- LOGIN SUPREMO GRUNNER --- */
.login-body {
    background: radial-gradient(circle at center, #1e1e1e 0%, #0a0a0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.login-container {
    background: #161616;
    padding: 45px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.7);
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* Detalhe verde no topo */
.top-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #1e7e34);
}

.brand-area { margin-bottom: 30px; }
.main-logo { 
    max-width: 200px; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.login-header h1 { 
    font-size: 1.6rem; 
    font-weight: 700; 
    margin-bottom: 8px; 
    color: #fff;
}

.login-header p { 
    font-size: 0.9rem; 
    color: #888; 
    margin-bottom: 35px; 
}

/* --- ESTILIZAÇÃO DO INPUT (Onde estava o erro) --- */
.input-group {
    text-align: left;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    color: #bbb;
    font-size: 0.8rem;
    margin-bottom: 8px;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #222; /* Fundo escuro em vez de branco */
    border: 1.5px solid #333;
    border-radius: 12px;
    padding: 0 15px;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    background: #282828;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 14px 0;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.domain-hint {
    color: #666;
    font-size: 0.9rem;
    padding-left: 10px;
    white-space: nowrap;
    font-weight: 500;
}

/* --- BOTÃO MICROSOFT --- */
.btn-microsoft {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-radius: 12px;
    padding: 16px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.2);
}

.btn-microsoft:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(40, 167, 69, 0.3);
    filter: brightness(1.1);
}

.ms-logo {
    width: 20px;
    height: 20px;
    display: flex;
}

.login-footer {
    margin-top: 35px;
    font-size: 0.75rem;
    color: #555;
}

/* -------------------------------------- */
/* --- RESPONSIVIDADE (Ajustes gerais) --- */
/* -------------------------------------- */
@media (max-width: 600px) {
    .rules-text {
        display: none;
    }
    .rules-link {
        padding: 5px;
    }
    .header-content h1 {
        font-size: 1.1rem;
    }
    .header-logo {
        height: 30px;
    }
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    .login-container {
        padding: 30px 20px;
    }
}