/* =================================================================
   4. CARDS (Padrões e Variações)
   ================================================================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
    backdrop-filter: blur(12px);
    color: var(--text-main);
}

:root.dark-mode .card {
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.card-header {
    background: var(--bg-surface-header);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 20px 20px 0 0 !important;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.2px;
}

.card-header.bg-primary { background: var(--grad-primary) !important; color: white !important; }
.card-header.bg-success { background: linear-gradient(135deg, #4caf50, #2e7d32) !important; color: white !important; }
.card-header.bg-danger { background: linear-gradient(135deg, #ff4081, #c62828) !important; color: white !important; }
.card-header.bg-info { background: linear-gradient(135deg, #00bcd4, #00838f) !important; color: white !important; }
.card-header.bg-warning { background: linear-gradient(135deg, #ffc107, #ffa000) !important; color: #000 !important; }

.stats-card, .action-card, .info-card, .partida-card, .ranking-card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-card-header));
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    backdrop-filter: blur(10px);
}

:root.dark-mode .stats-card,
:root.dark-mode .action-card,
:root.dark-mode .partida-card,
:root.dark-mode .ranking-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stats-card:hover, .action-card:hover, .partida-card:hover, .ranking-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
}

:root.dark-mode .stats-card:hover,
:root.dark-mode .action-card:hover,
:root.dark-mode .partida-card:hover,
:root.dark-mode .ranking-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.1);
}

.stats-card { padding: 1.5rem; }
.action-card { padding: 2rem; text-align: center; }
.partida-card { overflow: hidden; position: relative; }

/* --- Indicador de Palpite Salvo --- */
.partida-card.partida-salva {
    border-color: rgba(var(--brand-secondary-rgb), 0.6);
    box-shadow: 0 4px 15px rgba(var(--brand-secondary-rgb), 0.15);
}

:root.dark-mode .partida-card.partida-salva {
    border-color: rgba(var(--brand-secondary-rgb), 0.8);
    box-shadow: 0 4px 15px rgba(var(--brand-secondary-rgb), 0.3);
}

.partida-card.partida-salva:hover {
    border-color: var(--brand-secondary);
    box-shadow: 0 10px 25px rgba(var(--brand-secondary-rgb), 0.3);
}

.badge-salvo {
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--brand-secondary);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 20px 0 20px;
    font-size: 0.9rem;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* --- Componentes Internos dos Cards --- */
.stats-card-icon { font-size: 2rem; }
.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.partida-mini {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--brand-primary);
    transition: background 0.3s ease;
}
.partida-mini:hover {
    background: var(--bg-card-header);
}

.countdown-timer {
    background: linear-gradient(135deg, #2ecc71, #009688);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}
.countdown-timer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
    filter: brightness(1.05);
    color: white;
}

.ranking-position {
    background: var(--grad-primary);
    color: white;
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(var(--brand-primary-rgb), 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.ranking-position:hover {
    transform: scale(1.05) rotate(1deg);
}

.ranking-position::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ranking-position h2 {
    font-size: 3rem;
    margin: 0.5rem 0;
    font-family: 'Outfit', sans-serif;
}

.stats-card {
    padding: 1.5rem;
    border-radius: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-md);
}

.stats-card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.action-card {
    padding: 2.5rem;
    text-align: center;
    border-radius: 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.action-card h4 {
    font-family: 'Outfit', sans-serif;
    margin: 1rem 0;
}
