* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #f39c12, #e74c3c, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(243, 156, 18, 0.3);
}

h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 30px;
    color: #ecf0f1;
}

/* Main Menu */
#main-menu {
    text-align: center;
    padding-top: 50px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 40px auto;
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.menu-buttons button {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.menu-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.back-btn {
    background: linear-gradient(145deg, #7f8c8d, #95a5a6) !important;
    margin-top: 20px;
}

/* Player Cards */
#player-cards, #opponent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.player-card {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-card.selected {
    border-color: #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.4);
}

.player-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #f39c12;
}

.player-card .stat {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    font-size: 0.9rem;
}

.player-card .stat-label {
    color: #bdc3c7;
}

.player-card .stat-value {
    font-weight: bold;
}

.league-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
}

/* League Colors */
.league-hell { background: linear-gradient(145deg, #1a0000, #330000); color: #ff4444; }
.league-rookie { background: linear-gradient(145deg, #555, #777); color: #fff; }
.league-novice { background: linear-gradient(145deg, #27ae60, #2ecc71); }
.league-bronze { background: linear-gradient(145deg, #cd7f32, #b87333); }
.league-silver { background: linear-gradient(145deg, #c0c0c0, #a8a8a8); color: #333; }
.league-gold { background: linear-gradient(145deg, #ffd700, #ffb700); color: #333; }
.league-emerald { background: linear-gradient(145deg, #50c878, #2e8b57); }
.league-ruby { background: linear-gradient(145deg, #e0115f, #c41e3a); }
.league-amethyst { background: linear-gradient(145deg, #9966cc, #7b68ee); }
.league-pearl { background: linear-gradient(145deg, #f0ead6, #eae0c8); color: #333; }
.league-obsidian { background: linear-gradient(145deg, #1a1a1a, #333); }
.league-diamond { background: linear-gradient(145deg, #b9f2ff, #89cff0); color: #333; }
.league-platinum { background: linear-gradient(145deg, #e5e4e2, #c0c0c0); color: #333; }
.league-champion { background: linear-gradient(145deg, #ff6b6b, #ee5a5a); }
.league-god { background: linear-gradient(145deg, #ffeaa7, #fdcb6e); color: #333; }
.league-infinite { background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff); }

/* Battle Screen */
.battle-header {
    text-align: center;
    margin-bottom: 30px;
}

.map-name {
    font-size: 1.5rem;
    color: #f39c12;
    margin-bottom: 10px;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
}

.first-to-win {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.battle-arena {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 40px 0;
}

.player-side, .opponent-side {
    text-align: center;
}

.player-name {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ecf0f1;
}

.choice-display {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto;
    border: 4px solid #3498db;
    transition: all 0.3s ease;
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: #e74c3c;
}

.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: 3px solid #3498db;
    color: white;
}

.choice-btn:hover {
    background: linear-gradient(145deg, #3498db, #2980b9);
    transform: scale(1.05);
}

.choice-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.round-result {
    text-align: center;
    font-size: 1.5rem;
    margin: 20px 0;
    min-height: 40px;
    color: #f39c12;
}

/* Cheat Reveal */
.cheat-reveal {
    text-align: center;
    background: linear-gradient(145deg, #c0392b, #e74c3c);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 300px;
    animation: pulse 0.5s infinite alternate;
}

.cheat-reveal.hidden {
    display: none;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.02); }
}

.cheat-timer {
    font-size: 0.9rem;
    color: #ffcccc;
}

/* Battle Result */
#battle-result {
    text-align: center;
    padding-top: 50px;
}

#result-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

#result-details {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

#result-details p {
    margin: 10px 0;
    font-size: 1.1rem;
}

.result-win { color: #2ecc71; }
.result-lose { color: #e74c3c; }

/* Shop */
.shop-coins {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #f39c12;
}

#shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.shop-item {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.shop-item h3 {
    color: #f39c12;
    margin-bottom: 10px;
}

.shop-item p {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.shop-item .price {
    font-size: 1.2rem;
    color: #f39c12;
    margin-bottom: 10px;
}

.shop-item button {
    width: 100%;
    background: linear-gradient(145deg, #27ae60, #2ecc71);
}

.shop-item button:disabled {
    background: linear-gradient(145deg, #555, #666);
    cursor: not-allowed;
}

.owned-count {
    color: #3498db;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Booster Select */
#available-boosters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.booster-card {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.booster-card:hover {
    border-color: #3498db;
}

.booster-card.selected {
    border-color: #f39c12;
    background: linear-gradient(145deg, #3d5a80, #4a6fa1);
}

.booster-card h4 {
    color: #f39c12;
    margin-bottom: 5px;
}

.booster-card p {
    font-size: 0.85rem;
    color: #bdc3c7;
}

.booster-card .quantity {
    font-size: 0.8rem;
    color: #3498db;
    margin-top: 5px;
}

.booster-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.booster-actions button:first-child {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

/* Leaderboard */
#leaderboard-list {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 20px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #3d566e;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: bold;
    width: 50px;
    color: #f39c12;
}

.leaderboard-name {
    flex: 1;
    font-size: 1.1rem;
}

.leaderboard-trophies {
    font-size: 1rem;
    color: #f39c12;
}

.info-text {
    text-align: center;
    color: #bdc3c7;
    margin-bottom: 20px;
}

/* Leagues Screen */
#leagues-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

#leagues-list::-webkit-scrollbar {
    width: 8px;
}

#leagues-list::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 4px;
}

#leagues-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.league-card {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 5px solid #3498db;
}

.league-card.current-league {
    border-color: #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
}

.league-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.league-info {
    flex: 1;
}

.league-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.league-info .trophy-req {
    color: #f39c12;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.league-info .coin-reward {
    color: #2ecc71;
    font-size: 0.9rem;
}

.league-number {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: bold;
}

/* Map Backgrounds */
.map-arena { background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%); }
.map-forest { background: linear-gradient(180deg, #1a472a 0%, #2d5a3f 100%); }
.map-ocean { background: linear-gradient(180deg, #006994 0%, #00a8cc 100%); }
.map-volcano { background: linear-gradient(180deg, #8b0000 0%, #ff4500 100%); }
.map-city { background: linear-gradient(180deg, #2c3e50 0%, #5d6d7e 100%); }
.map-crystal-city { background: linear-gradient(180deg, #4a0080 0%, #9b30ff 100%); }
.map-hells-gate { background: linear-gradient(180deg, #1a0000 0%, #4a0000 100%); }
.map-hell { background: linear-gradient(180deg, #000 0%, #330000 100%); }
.map-hells-exit { background: linear-gradient(180deg, #330000 0%, #660000 100%); }
.map-heaven { background: linear-gradient(180deg, #87ceeb 0%, #fff 100%); }
.map-heavens-exit { background: linear-gradient(180deg, #add8e6 0%, #87ceeb 100%); }
.map-diamond-mine { background: linear-gradient(180deg, #1a1a2e 0%, #4fc3f7 100%); }
.map-core-of-the-world { background: linear-gradient(180deg, #ff4500 0%, #ff8c00 100%); }
.map-outer-space { background: linear-gradient(180deg, #000 0%, #0d0d2b 100%); }
.map-the-multiverse { background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3); }
.map-the-end { background: linear-gradient(180deg, #000 0%, #1a1a1a 50%, #fff 100%); }

/* Responsive */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.4rem; }

    .choice-display {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .choice-btn {
        padding: 15px 20px;
    }

    .choice-icon {
        font-size: 1.8rem;
    }
}
