/* Pokemon Types - Styles CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.2);
}

.tab-btn.active {
    background: #6366f1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== SEARCH ==================== */
.search-section {
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    display: none;
}

.clear-btn:hover {
    color: #e74c3c;
}

.clear-btn.visible {
    display: block;
}

.search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-input:focus {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d2d44;
    border-radius: 15px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: rgba(255,255,255,0.1);
}

.suggestion-item img {
    width: 40px;
    height: 40px;
}

.suggestion-item .name {
    font-weight: bold;
    text-transform: capitalize;
}

.suggestion-item .number {
    color: #888;
    font-size: 0.85rem;
}

/* ==================== POKEMON CARD ==================== */
.pokemon-card {
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.pokemon-card.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.pokemon-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.pokemon-image {
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    padding: 10px;
}

.pokemon-info h2 {
    font-size: 2rem;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.pokemon-info .number {
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.pokemon-types {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pokemon-type {
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ==================== EFFECTIVENESS ==================== */
.effectiveness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.eff-section {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
}

.eff-section h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.eff-section.weak h3 { color: #f87171; }
.eff-section.resist h3 { color: #4ade80; }
.eff-section.immune h3 { color: #a78bfa; }

.eff-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eff-type {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.eff-type .mult {
    opacity: 0.8;
    margin-left: 4px;
    font-size: 0.75rem;
}

.no-types {
    color: #666;
    font-style: italic;
}

/* ==================== STATS ==================== */
.stats-section {
    margin-top: 25px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
}

.stats-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-name {
    width: 80px;
    font-size: 0.8rem;
    color: #aaa;
    text-align: right;
}

.stat-bar-container {
    flex: 1;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.stat-value {
    width: 35px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: right;
}

.stat-hp .stat-bar { background: linear-gradient(90deg, #ff5959, #ff8080); }
.stat-atk .stat-bar { background: linear-gradient(90deg, #f5ac78, #f8c878); }
.stat-def .stat-bar { background: linear-gradient(90deg, #fae078, #ffe066); }
.stat-spa .stat-bar { background: linear-gradient(90deg, #9db7f5, #a8c0f5); }
.stat-spd .stat-bar { background: linear-gradient(90deg, #a7db8d, #b8e8a0); }
.stat-spe .stat-bar { background: linear-gradient(90deg, #fa92b2, #ffb0c4); }

.stat-total {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-total span {
    font-size: 1.1rem;
    font-weight: bold;
    color: #6366f1;
}

/* ==================== PROFILE ==================== */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.profile-box {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.profile-box h4 {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.profile-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.profile-stat {
    text-align: center;
}

.profile-stat .value {
    font-size: 1.4rem;
    font-weight: bold;
}

.profile-stat .label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
}

.profile-stat.highlight .value {
    color: #4ade80;
}

.profile-vs {
    color: #666;
    font-size: 0.8rem;
}

.profile-verdict {
    margin-top: 10px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.profile-verdict.physical { background: #f5ac78; color: #333; }
.profile-verdict.special { background: #9db7f5; color: #333; }
.profile-verdict.mixed { background: #a78bfa; color: #fff; }
.profile-verdict.tank { background: #fae078; color: #333; }
.profile-verdict.sp-tank { background: #a7db8d; color: #333; }
.profile-verdict.balanced { background: #888; color: #fff; }

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 50px;
    color: #888;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== MATRIX ==================== */
.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.legend-box {
    width: 30px;
    height: 20px;
    border-radius: 4px;
}

.container {
    max-width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: center;
}

.matrix-wrapper {
    position: relative;
}

.axis-label {
    position: absolute;
    font-weight: bold;
    font-size: 0.9rem;
    color: #aaa;
}

.axis-attack {
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.axis-defense {
    left: -25px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    white-space: nowrap;
}

table {
    border-collapse: collapse;
    font-size: 0.75rem;
}

th, td {
    width: 50px;
    height: 50px;
    text-align: center;
    border: 1px solid #333;
    position: relative;
}

th {
    font-weight: bold;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.corner {
    background: #1a1a2e;
    border: none;
}

.row-header {
    position: sticky;
    left: 0;
    z-index: 10;
}

.col-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

td:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
    z-index: 20;
}

.eff-0 { background: #2d2d2d; color: #666; }
.eff-025 { background: #7c2d12; color: #fca5a5; }
.eff-05 { background: #991b1b; color: #fecaca; }
.eff-1 { background: #374151; color: #9ca3af; }
.eff-2 { background: #166534; color: #bbf7d0; }
.eff-4 { background: #14532d; color: #4ade80; }

/* ==================== MATRIX INTERACTIONS ==================== */

/* Cell hover effects */
#matrix td, #matrix th {
    transition: all 0.15s ease;
}

#matrix td:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Row/Column highlight */
.highlight-row {
    filter: brightness(1.3);
    background: rgba(255, 255, 255, 0.1) !important;
}

.highlight-col {
    filter: brightness(1.3);
    background: rgba(255, 255, 255, 0.1) !important;
}

.highlight-cell {
    filter: brightness(1.5) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.25) !important;
    z-index: 20 !important;
    outline: 2px solid #fff;
}

/* Header highlights */
#matrix th.highlight-row {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}

#matrix th.highlight-col {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}

/* ==================== MATCHUP MODAL ==================== */

.matchup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.matchup-content {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.matchup-content.super-effective {
    border-color: #22c55e;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.3);
}

.matchup-content.not-effective {
    border-color: #ef4444;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.3);
}

.matchup-content.immune {
    border-color: #6b7280;
    box-shadow: 0 0 40px rgba(107, 114, 128, 0.3);
}

.matchup-content.normal {
    border-color: #6366f1;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.matchup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.matchup-close:hover {
    color: #fff;
}

/* Versus layout */
.matchup-versus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.matchup-fighter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-radius: 12px;
    min-width: 120px;
}

.matchup-fighter.attacker {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.matchup-fighter.defender {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.4);
}

.fighter-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #9ca3af;
}

.matchup-fighter.attacker .fighter-label {
    color: #f87171;
}

.matchup-fighter.defender .fighter-label {
    color: #60a5fa;
}

.fighter-icon {
    font-size: 1.5rem;
}

.matchup-vs {
    font-size: 1.2rem;
    font-weight: 800;
    color: #6b7280;
}

/* Result display */
.matchup-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
}

.matchup-result.super-effective {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.2) 100%);
    border: 2px solid #22c55e;
}

.matchup-result.not-effective {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.2) 100%);
    border: 2px solid #ef4444;
}

.matchup-result.immune {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.3) 0%, rgba(75, 85, 99, 0.2) 100%);
    border: 2px solid #6b7280;
}

.matchup-result.normal {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid #4b5563;
}

.result-icon {
    font-size: 2rem;
}

.result-mult {
    font-size: 2.5rem;
    font-weight: 800;
}

.matchup-result.super-effective .result-mult {
    color: #4ade80;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.6);
}

.matchup-result.not-effective .result-mult {
    color: #f87171;
}

.matchup-result.immune .result-mult {
    color: #9ca3af;
}

.matchup-result.normal .result-mult {
    color: #d1d5db;
}

.result-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.matchup-result.super-effective .result-label {
    color: #86efac;
}

.matchup-result.not-effective .result-label {
    color: #fca5a5;
}

/* Explanation */
.matchup-explanation {
    text-align: center;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.matchup-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.matchup-example-col {
    padding: 12px;
    border-radius: 10px;
}

.matchup-example-col.attacker-col {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.matchup-example-col.defender-col {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.matchup-example-col h4 {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 10px;
    text-align: center;
}

.attacker-col h4 {
    color: #f87171;
}

.defender-col h4 {
    color: #60a5fa;
}

.example-pokemon-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.example-pokemon {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
}

/* ==================== TYPE COLORS ==================== */
.normal { background: #A8A878; }
.fire, .feu { background: #F08030; }
.water, .eau { background: #6890F0; }
.electric, .electrik { background: #F8D030; }
.grass, .plante { background: #78C850; }
.ice, .glace { background: #98D8D8; }
.fighting, .combat { background: #C03028; }
.poison { background: #A040A0; }
.ground, .sol { background: #E0C068; }
.flying, .vol { background: #A890F0; }
.psychic, .psy { background: #F85888; }
.bug, .insecte { background: #A8B820; }
.rock, .roche { background: #B8A038; }
.ghost, .spectre { background: #705898; }
.dragon { background: #7038F8; }
.dark, .tenebres { background: #705848; }
.steel, .acier { background: #B8B8D0; }
.fairy, .fee { background: #EE99AC; }

.placeholder-msg {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.placeholder-msg h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* ==================== EVOLUTION ==================== */
.evolution-section {
    margin-top: 25px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
}

.evolution-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #f0f0f0;
}

.evolution-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.evo-pokemon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 15px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.05);
}

.evo-pokemon:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.evo-pokemon.current {
    background: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.evo-pokemon img {
    width: 70px;
    height: 70px;
}

.evo-pokemon .evo-name {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: capitalize;
    margin-top: 5px;
}

.evo-pokemon .evo-method {
    font-size: 0.65rem;
    color: #888;
    margin-top: 3px;
}

.evo-arrow {
    font-size: 1.5rem;
    color: #666;
}

.no-evolution {
    color: #888;
    font-style: italic;
    text-align: center;
}

/* ==================== LOCATIONS ==================== */
.locations-section {
    margin-top: 25px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 20px;
}

.locations-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.game-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.game-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    color: #aaa;
    transition: all 0.2s;
}

.game-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.game-btn.active {
    background: #6366f1;
    color: #fff;
}

.locations-list {
    max-height: 300px;
    overflow-y: auto;
}

.location-game {
    margin-bottom: 15px;
}

.location-game-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: #6366f1;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.location-name {
    color: #ddd;
}

.location-method {
    font-size: 0.7rem;
    color: #888;
    background: rgba(0,0,0,0.3);
    padding: 3px 8px;
    border-radius: 10px;
}

.no-locations {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* ==================== TYPE CALCULATOR ==================== */
.type-calculator {
    max-width: 800px;
    margin: 30px auto 0;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
}

.type-calculator h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.calc-instructions {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.type-selectors {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.type-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-selector label {
    font-size: 0.85rem;
    color: #aaa;
}

.type-selector select {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    min-width: 160px;
    background: #2d2d44;
    color: #fff;
}

.calc-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.calc-section {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 15px;
}

.calc-section h4 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.calc-section.weak h4 { color: #f87171; }
.calc-section.resist h4 { color: #4ade80; }
.calc-section.immune h4 { color: #a78bfa; }

.calc-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.calc-type {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.calc-type .mult {
    opacity: 0.8;
    margin-left: 3px;
}

.calc-empty {
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

/* ==================== QUIZ ==================== */
.quiz-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.quiz-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.quiz-reset-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-reset-btn:hover {
    background: rgba(255,255,255,0.3);
}

.quiz-question {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.quiz-prompt {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.quiz-target-type {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.quiz-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-choice {
    padding: 18px 25px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.quiz-choice:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.quiz-choice:disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-choice.correct {
    box-shadow: 0 0 0 4px #22c55e, 0 5px 20px rgba(34, 197, 94, 0.5);
}

.quiz-choice.wrong {
    box-shadow: 0 0 0 4px #ef4444, 0 5px 20px rgba(239, 68, 68, 0.5);
    opacity: 0.5;
}

.quiz-feedback {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.quiz-feedback.correct {
    background: rgba(34, 197, 94, 0.3);
    border: 2px solid #22c55e;
}

.quiz-feedback.wrong {
    background: rgba(239, 68, 68, 0.3);
    border: 2px solid #ef4444;
}

.quiz-next-btn {
    background: #6366f1;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-next-btn:hover {
    background: #4f46e5;
    transform: scale(1.05);
}

/* ==================== TEAM BUILDER ==================== */
.team-container {
    max-width: 900px;
    margin: 0 auto;
}

.team-search {
    position: relative;
    margin-bottom: 25px;
}

.team-search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
    transition: all 0.3s;
}

.team-search-input:focus {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.team-search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.team-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2d2d3a;
    border-radius: 15px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.team-suggestions.show {
    display: block;
}

.team-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.team-suggestion-item:hover {
    background: rgba(255,255,255,0.1);
}

.team-suggestion-item img {
    width: 40px;
    height: 40px;
}

.team-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.team-slot {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 15px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
}

.team-slot.empty {
    border: 2px dashed rgba(255,255,255,0.3);
    background: transparent;
}

.slot-placeholder {
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
}

.team-slot .slot-pokemon {
    text-align: center;
}

.team-slot .slot-pokemon img {
    width: 80px;
    height: 80px;
}

.team-slot .slot-name {
    font-weight: bold;
    margin: 5px 0;
}

.team-slot .slot-types {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.team-slot .slot-type {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.team-slot .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.8);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.team-slot .remove-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.team-clear-btn {
    display: block;
    margin: 0 auto 30px;
    padding: 10px 25px;
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.team-clear-btn:hover {
    background: rgba(239, 68, 68, 0.5);
}

.team-analysis {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
}

.team-analysis h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.team-empty-msg {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

.team-analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.analysis-section {
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 15px;
}

.analysis-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section.danger h3 { color: #ef4444; }
.analysis-section.warning h3 { color: #f59e0b; }
.analysis-section.good h3 { color: #22c55e; }
.analysis-section.neutral h3 { color: #94a3b8; }

.analysis-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.analysis-type {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.analysis-type .count {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.analysis-empty {
    color: rgba(255,255,255,0.4);
    font-style: italic;
    font-size: 0.85rem;
}

.team-coverage {
    margin-top: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    padding: 15px;
}

.team-coverage h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    text-align: center;
}

.coverage-bar {
    display: flex;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255,255,255,0.1);
}

.coverage-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: width 0.3s;
}

.coverage-segment.danger { background: #ef4444; }
.coverage-segment.warning { background: #f59e0b; }
.coverage-segment.neutral { background: #64748b; }
.coverage-segment.good { background: #22c55e; }

.coverage-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.8rem;
}

.coverage-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coverage-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ==================== SUGGESTIONS ==================== */
.team-suggestions-section {
    margin-top: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.team-suggestions-section h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #a5b4fc;
}

.suggestions-info {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 15px;
}

.suggestions-loading {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.suggestion-pokemon {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.suggestion-pokemon:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.03);
}

.suggestion-pokemon img {
    width: 60px;
    height: 60px;
}

.suggestion-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin: 5px 0;
}

.suggestion-types {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.suggestion-resists {
    font-size: 0.75rem;
    color: #22c55e;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    /* Tabs mobile */
    .tabs {
        gap: 5px;
        margin-bottom: 15px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
        border-radius: 20px;
    }

    /* Search mobile */
    .search-input {
        padding: 12px 40px 12px 15px;
        font-size: 1rem;
    }

    .suggestion-item {
        padding: 10px 15px;
    }

    .suggestion-item img {
        width: 35px;
        height: 35px;
    }

    /* Pokemon card mobile */
    .pokemon-card {
        padding: 15px;
        border-radius: 20px;
    }

    .pokemon-header {
        flex-direction: column;
        gap: 15px;
    }

    .pokemon-image {
        width: 120px;
        height: 120px;
    }

    .pokemon-info h2 {
        font-size: 1.5rem;
    }

    .pokemon-info .number {
        font-size: 1rem;
    }

    .pokemon-type {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    /* Effectiveness grid mobile */
    .effectiveness-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .eff-section {
        padding: 15px;
    }

    .eff-section h3 {
        font-size: 0.9rem;
    }

    .eff-type {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    /* Stats mobile */
    .stats-section {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-name {
        width: 65px;
        font-size: 0.7rem;
    }

    .stat-value {
        width: 30px;
        font-size: 0.8rem;
    }

    .stat-bar-container {
        height: 10px;
    }

    /* Profile section mobile */
    .profile-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .profile-box {
        padding: 12px;
    }

    .profile-stat .value {
        font-size: 1.2rem;
    }

    .profile-stat .label {
        font-size: 0.65rem;
    }

    .profile-verdict {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    /* Matrix mobile */
    .legend {
        gap: 10px;
        margin-bottom: 15px;
    }

    .legend-item {
        font-size: 0.7rem;
        gap: 5px;
    }

    .legend-box {
        width: 20px;
        height: 15px;
    }

    .container {
        justify-content: flex-start;
    }

    .axis-label {
        font-size: 0.7rem;
    }

    .axis-attack {
        top: -20px;
    }

    .axis-defense {
        left: -20px;
    }

    table {
        font-size: 0.6rem;
    }

    th, td {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    th {
        font-size: 0.5rem;
    }

    td {
        font-size: 0.7rem;
    }

    td:hover {
        transform: none;
        box-shadow: none;
    }

    .placeholder-msg {
        padding: 40px 15px;
    }

    .placeholder-msg h3 {
        font-size: 1.1rem;
    }

    .placeholder-msg p {
        font-size: 0.9rem;
    }

    /* Evolution mobile */
    .evolution-section {
        padding: 15px;
    }

    .evo-pokemon {
        padding: 8px;
    }

    .evo-pokemon img {
        width: 55px;
        height: 55px;
    }

    .evo-pokemon .evo-name {
        font-size: 0.7rem;
    }

    .evo-pokemon .evo-method {
        font-size: 0.6rem;
    }

    .evo-arrow {
        font-size: 1.2rem;
    }

    /* Locations mobile */
    .locations-section {
        padding: 15px;
    }

    .game-btn {
        padding: 5px 10px;
        font-size: 0.65rem;
    }

    .location-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px;
    }

    .location-name {
        font-size: 0.8rem;
    }

    .location-method {
        font-size: 0.65rem;
    }

    /* Type Calculator mobile */
    .type-calculator {
        padding: 15px;
        margin-top: 20px;
    }

    .type-calculator h3 {
        font-size: 1.1rem;
    }

    .calc-instructions {
        font-size: 0.8rem;
    }

    .type-selectors {
        gap: 15px;
    }

    .type-selector select {
        min-width: 140px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .calc-results {
        grid-template-columns: 1fr;
    }

    .calc-section {
        padding: 12px;
    }

    .calc-type {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    /* Team Builder mobile */
    .team-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .team-slot {
        min-height: 120px;
        padding: 10px;
    }

    .team-slot .slot-pokemon img {
        width: 60px;
        height: 60px;
    }

    .team-slot .slot-name {
        font-size: 0.85rem;
    }

    .team-analysis-grid {
        grid-template-columns: 1fr;
    }

    .coverage-legend {
        flex-wrap: wrap;
        gap: 10px;
    }

    .suggestions-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .suggestion-pokemon img {
        width: 50px;
        height: 50px;
    }

    .suggestion-name {
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media screen and (max-width: 380px) {
    .tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .tab-btn {
        text-align: center;
    }

    th, td {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    th {
        font-size: 0.45rem;
    }

    td {
        font-size: 0.6rem;
    }

    .pokemon-image {
        width: 100px;
        height: 100px;
    }
}

/* ==================== COUNTERS SECTION ==================== */
.counters-section {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    border: 1px solid #475569;
}

.counters-section h3 {
    color: #f1f5f9;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.counters-info {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.counters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.counter-pokemon {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.counter-pokemon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.counter-pokemon img {
    width: 60px;
    height: 60px;
    image-rendering: pixelated;
}

.counter-name {
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
}

.counter-types {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.counter-types .slot-type {
    font-size: 0.65rem;
    padding: 2px 6px;
}

.counters-loading {
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.no-counters {
    color: #94a3b8;
    text-align: center;
    font-style: italic;
}

/* ==================== SAVED TEAMS ==================== */
.team-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.team-save-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.team-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.saved-teams-section {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    border: 1px solid #475569;
}

.saved-teams-section h3 {
    color: #f1f5f9;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.saved-teams-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-saved-teams {
    color: #94a3b8;
    text-align: center;
    font-style: italic;
    padding: 10px;
}

.saved-team-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.saved-team-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #60a5fa;
}

.saved-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.saved-team-name {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
}

.saved-team-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.saved-team-delete:hover {
    background: #ef4444;
    color: white;
}

.saved-team-pokemon {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.saved-team-pokemon img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

@media screen and (max-width: 600px) {
    .counters-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .counter-pokemon img {
        width: 50px;
        height: 50px;
    }

    .counter-name {
        font-size: 0.75rem;
    }

    .team-buttons {
        flex-direction: column;
    }
}

/* ==================== QUIZ DIFFICULTY ==================== */
.difficulty-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #94a3b8;
    margin-left: 10px;
    vertical-align: middle;
    font-weight: 500;
}

.multi-hint {
    display: block;
    font-size: 0.85rem;
    color: #f59e0b;
    margin-top: 5px;
    font-weight: 600;
}

.quiz-choice.selected {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
    transform: scale(1.05);
}

.quiz-validate-btn {
    width: 100%;
    margin-top: 15px;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-validate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.quiz-validate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Master mode - 18 types grid */
.quiz-choices-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.quiz-choice-small {
    padding: 8px 4px !important;
    font-size: 0.75rem !important;
    min-width: auto !important;
}

@media screen and (max-width: 600px) {
    .quiz-choices-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .quiz-choice-small {
        font-size: 0.7rem !important;
        padding: 10px 6px !important;
    }
}

/* Quiz Master Mode Button */
.quiz-master-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.quiz-master-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Quiz Pokemon Mode Button */
.quiz-pokemon-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.quiz-pokemon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Quiz Pokemon Target Display */
.quiz-pokemon-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
}

.quiz-pokemon-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.quiz-pokemon-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-top: 10px;
}

.quiz-pokemon-types {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.quiz-pokemon-types .pokemon-type {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Quiz mobile responsive */
@media screen and (max-width: 600px) {
    .quiz-score {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .quiz-score span {
        text-align: center;
        margin-bottom: 5px;
    }

    .quiz-score button {
        width: 100%;
        padding: 12px;
    }

    .quiz-reset-btn,
    .quiz-master-btn,
    .quiz-pokemon-btn {
        font-size: 0.9rem;
    }

    .quiz-pokemon-img {
        width: 120px;
        height: 120px;
    }

    .quiz-pokemon-name {
        font-size: 1.2rem;
    }
}

/* Quiz Stats Button */
.quiz-stats-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.quiz-stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

/* Stats Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #475569;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
}

.modal-content h2 {
    color: #f1f5f9;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.stats-summary {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.stats-total {
    color: #94a3b8;
    font-size: 1rem;
}

.stats-total strong {
    color: #f1f5f9;
    font-size: 1.2rem;
}

.stats-section-bad,
.stats-section-good {
    margin-bottom: 20px;
}

.stats-section-bad h4 {
    color: #ef4444;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.stats-section-good h4 {
    color: #22c55e;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stats-count {
    font-size: 0.85rem;
    font-weight: 600;
}

.stats-count.error {
    color: #ef4444;
}

.stats-count.correct {
    color: #22c55e;
}

.stats-empty,
.stats-none {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 15px;
}

.stats-reset-btn {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.stats-reset-btn:hover {
    background: #ef4444;
    color: white;
}

/* ==================== BANNIÈRES PUB ==================== */
.ad-banner {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    text-align: center;
    min-height: 90px;
}

.ad-banner ins {
    background: transparent;
}

/* Pub en haut - discrète mais visible */
.ad-banner.ad-top {
    margin: 10px auto 15px;
    min-height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Pub milieu - bien intégrée après FAQ */
.ad-banner.ad-middle {
    max-width: 900px;
    margin: 30px auto;
    min-height: 250px;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.5) 0%, rgba(20, 20, 35, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Pub en bas */
.ad-banner:last-of-type {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .ad-banner.ad-top {
        min-height: 60px;
        margin: 8px 10px 12px;
    }

    .ad-banner.ad-middle {
        min-height: 200px;
        margin: 20px 10px;
    }
}

/* ==================== QUIZ MODES SELECTOR ==================== */
.quiz-modes {
    text-align: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.quiz-modes-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.quiz-modes-header h3 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #6bcb77 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sprites Pokeball officiels */
.pokeball-sprite {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: pokeball-float 3s ease-in-out infinite;
}

.pokeball-sprite.left {
    animation-delay: 0s;
}

.pokeball-sprite.right {
    animation-delay: 1.5s;
}

@keyframes pokeball-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

/* Type icons officiels */
.type-icon-img {
    image-rendering: auto;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.mnemonic-header .type-icon-img {
    margin-right: 10px;
}

.mnemonic-tip-icon .type-icon-img {
    width: 28px;
    height: 28px;
}

.quiz-modes-subtitle {
    color: #a5b4fc;
    font-size: 1rem;
    margin-bottom: 25px;
}

.quiz-modes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    justify-content: center;
}

.quiz-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: linear-gradient(180deg, rgba(40, 40, 60, 0.9) 0%, rgba(25, 25, 40, 0.95) 100%);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.quiz-mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff4444, #ff8844);
    opacity: 0;
    transition: opacity 0.3s;
}

.quiz-mode-btn:hover::before {
    opacity: 1;
}

.quiz-mode-btn:hover {
    transform: translateY(-5px);
    border-color: #ff6b6b;
    box-shadow: 0 10px 30px rgba(255, 68, 68, 0.2);
}

.mode-icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 50%;
    margin-bottom: 12px;
    border: 2px solid rgba(255,255,255,0.1);
}

.mode-icon {
    font-size: 2rem;
}

.mode-classic .mode-icon-wrapper { border-color: #ff6b6b; background: rgba(255, 107, 107, 0.15); }
.mode-reverse .mode-icon-wrapper { border-color: #4dabf7; background: rgba(77, 171, 247, 0.15); }
.mode-speedrun .mode-icon-wrapper { border-color: #ffd93d; background: rgba(255, 217, 61, 0.15); }
.mode-revision .mode-icon-wrapper { border-color: #69db7c; background: rgba(105, 219, 124, 0.15); }
.mode-pokemon .mode-icon-wrapper { border-color: #da77f2; background: rgba(218, 119, 242, 0.15); }
.mode-master .mode-icon-wrapper { border-color: #ffd700; background: rgba(255, 215, 0, 0.2); }
.mode-flashcard .mode-icon-wrapper { border-color: #74c0fc; background: rgba(116, 192, 252, 0.15); }
.mode-tips .mode-icon-wrapper { border-color: #ffa94d; background: rgba(255, 169, 77, 0.15); }

.pokemon-icon .mode-icon {
    font-size: 1.8rem;
}

.mode-icon-img {
    width: 45px;
    height: 45px;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.master-icon {
    animation: glow-gold 2s ease-in-out infinite;
}

@keyframes glow-gold {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

.mode-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-desc {
    font-size: 0.75rem;
    color: #adb5bd;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 40px;
}

.mode-difficulty {
    font-size: 0.7rem;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffd93d;
    font-weight: 600;
}

.quiz-stats-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5a 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-stats-btn-large:hover {
    background: linear-gradient(135deg, #2d2d5a 0%, #3d3d7a 100%);
    border-color: #6366f1;
    transform: scale(1.05);
}

.stats-icon {
    font-size: 1.3rem;
}

/* ==================== QUIZ AREA ==================== */
.quiz-area, .flashcards-area, .mnemonics-area {
    padding: 20px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-back-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quiz-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.quiz-mode-indicator {
    text-align: center;
    margin-bottom: 15px;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
    color: #a5b4fc;
}

.quiz-timer {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    animation: pulse 1s infinite;
}

.quiz-timer.warning {
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==================== FLASHCARDS ==================== */
.flashcard-container {
    perspective: 1000px;
    max-width: 400px;
    margin: 30px auto;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 300px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.flashcard-front {
    background: linear-gradient(135deg, #1e1e3f 0%, #2d2d5a 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.flashcard-back {
    background: linear-gradient(135deg, #2d5a2d 0%, #1e3f1e 100%);
    border: 2px solid rgba(100, 200, 100, 0.2);
    transform: rotateY(180deg);
}

.flashcard-type {
    font-size: 3rem;
    margin-bottom: 15px;
}

.flashcard-label {
    font-size: 0.9rem;
    color: #a5b4fc;
    margin-bottom: 20px;
}

.flashcard-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.flashcard-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.flashcard-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.flashcard-btn.prev, .flashcard-btn.next {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.flashcard-btn.flip {
    background: #6366f1;
    color: #fff;
}

.flashcard-btn:hover {
    transform: scale(1.05);
}

.flashcard-progress {
    font-size: 1rem;
    color: #a5b4fc;
}

/* ==================== MNEMONICS ==================== */
.mnemonics-content {
    max-width: 800px;
    margin: 0 auto;
}

.mnemonic-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.mnemonic-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.mnemonic-type {
    font-size: 1.5rem;
    padding: 8px 15px;
    border-radius: 10px;
}

.mnemonic-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.mnemonic-tips {
    display: grid;
    gap: 10px;
}

.mnemonic-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.mnemonic-tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mnemonic-tip-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.mnemonic-tip-text strong {
    color: #6366f1;
}

/* ==================== RESPONSIVE QUIZ MODES ==================== */

/* Écrans moyens-grands : 3 colonnes */
@media (max-width: 1100px) {
    .quiz-modes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Tablettes : 2 colonnes */
@media (max-width: 850px) {
    .quiz-modes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mode-icon {
        font-size: 2rem;
    }

    .mode-title {
        font-size: 1rem;
    }

    .flashcard {
        height: 250px;
    }

    .flashcard-type {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .quiz-modes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .quiz-mode-btn {
        padding: 15px 10px;
    }

    .mode-icon {
        font-size: 1.8rem;
    }

    .flashcard-controls {
        flex-wrap: wrap;
    }
}

/* ==================== SPEEDRUN END ==================== */
.speedrun-end {
    text-align: center;
    padding: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.speedrun-end h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.speedrun-end p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* ==================== ERROR BADGE ==================== */
.error-badge {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: 10px;
    font-weight: 600;
}

/* ==================== QUIZ MODE INDICATOR ==================== */
#quizModeIndicator {
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

/* ==================== STREAK & BADGES BAR ==================== */
.streak-badges-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 68, 68, 0.2);
    position: relative;
    overflow: hidden;
}

.streak-badges-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff4444, #ffd700, #ff4444);
    background-size: 200% 100%;
    animation: streak-bar-glow 3s linear infinite;
}

@keyframes streak-bar-glow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.streak-pokeball-img {
    width: 45px;
    height: 45px;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(255, 68, 68, 0.4));
    animation: pokeball-bounce 2s ease-in-out infinite;
}

@keyframes pokeball-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.streak-info {
    display: flex;
    flex-direction: column;
}

.streak-count {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.streak-label {
    font-size: 0.8rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.streak-best {
    font-size: 0.75rem;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
    padding: 4px 10px;
    border-radius: 10px;
    margin-left: 10px;
}

.badges-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
}

.badges-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 165, 0, 0.25) 100%);
    border-color: #ffd700;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.badges-preview {
    display: flex;
    gap: 5px;
    font-size: 1.3rem;
}

.badges-count {
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==================== BADGES MODAL ==================== */
.badges-modal-content {
    max-width: 600px;
}

.badges-subtitle {
    text-align: center;
    color: #a5b4fc;
    margin-bottom: 25px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.badge-item.unlocked {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(80%);
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.badge-icon-img {
    width: 50px;
    height: 50px;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.4));
    transition: transform 0.3s ease;
}

.badge-item.unlocked .badge-icon-img {
    animation: badge-shine 2s ease-in-out infinite;
}

.badge-item.locked .badge-icon-img {
    filter: grayscale(100%) brightness(0.5);
}

@keyframes badge-shine {
    0%, 100% { filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.4)); }
    50% { filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.8)); }
}

.badge-preview-img {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    margin: 0 2px;
    vertical-align: middle;
}

.badge-unlock-img {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6));
    animation: badge-unlock 0.5s ease-out;
}

@keyframes badge-unlock {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.badge-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.badge-desc {
    font-size: 0.7rem;
    color: #9ca3af;
    text-align: center;
}

.badge-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.badge-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #f97316);
    border-radius: 2px;
    transition: width 0.3s;
}

.badges-streak-info {
    text-align: center;
    padding: 15px;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badges-streak-info h4 {
    color: #f97316;
    margin-bottom: 5px;
}

/* ==================== BADGE UNLOCK NOTIFICATION ==================== */
.badge-unlock-notif {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.badge-unlock-notif.show {
    transform: translateX(-50%) translateY(0);
}

.badge-unlock-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5a 100%);
    border: 3px solid #ffd700;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3), 0 0 60px rgba(255, 215, 0, 0.1);
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3), 0 0 60px rgba(255, 215, 0, 0.1); }
    50% { box-shadow: 0 10px 50px rgba(255, 215, 0, 0.5), 0 0 80px rgba(255, 215, 0, 0.2); }
}

.badge-unlock-icon {
    font-size: 3rem;
    animation: badge-bounce 0.5s ease-out;
}

@keyframes badge-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.badge-unlock-text {
    display: flex;
    flex-direction: column;
}

.badge-unlock-text strong {
    font-size: 1.1rem;
    color: #ffd700;
}

.badge-unlock-text span {
    font-size: 0.85rem;
    color: #a5b4fc;
}

/* ==================== RESPONSIVE BADGES ==================== */
@media (max-width: 600px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .streak-badges-bar {
        flex-direction: column;
        gap: 15px;
    }

    .badge-unlock-content {
        padding: 12px 18px;
    }

    .badge-unlock-icon {
        font-size: 2.5rem;
    }
}

/* ==================== HEADER SEO ==================== */

.site-header {
    text-align: center;
    padding: 20px;
    margin-bottom: 10px;
}

.site-header h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #6bcb77 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.site-tagline {
    color: #9ca3af;
    font-size: 1rem;
    margin: 0;
}

.apk-download-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.apk-download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

/* ==================== FAQ SECTION SEO ==================== */

.faq-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.8) 0%, rgba(20, 20, 35, 0.9) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-section h2 {
    text-align: center;
    font-size: 1.5rem;
    color: #f9fafb;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.faq-item summary {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.faq-item summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-item summary::marker {
    color: #6366f1;
}

.faq-item[open] summary {
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item p {
    padding: 15px 20px;
    color: #9ca3af;
    line-height: 1.7;
    margin: 0;
}

.faq-item p strong {
    color: #f9fafb;
}

/* ==================== FOOTER SEO ==================== */

.site-footer {
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    margin-top: 40px;
    padding: 40px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #f9fafb;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #6366f1;
    display: inline-block;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    color: #9ca3af;
    padding: 5px 0;
    font-size: 0.9rem;
}

.footer-section ul li::before {
    content: '→ ';
    color: #6366f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

/* ==================== RESPONSIVE SEO SECTIONS ==================== */

@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.4rem;
    }

    .site-tagline {
        font-size: 0.9rem;
    }

    .faq-section {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    .faq-section h2 {
        font-size: 1.2rem;
    }

    .faq-item summary {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .faq-item p {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3 {
        display: block;
    }
}
