/* MeowCraft Gym Leaders Styles - Clean Sober Design */

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

:root {
    --primary-color: #ff6b35;
    --secondary-color: #8b5cf6;
    --dark-bg: #0a0a0f;
    --card-bg: rgba(20, 20, 30, 0.9);
}

/* Page Container */
.gym-leaders-page {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--dark-bg);
}

/* Hero Section */
.hero-section {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(180deg, #0a0a0f 0%, #14141e 100%);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-title i {
    margin-right: 12px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #a0a0a0;
}

/* Section Titles */
.section-title {
    font-size: 1.75rem;
    margin: 40px 0 25px;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title i {
    margin-right: 8px;
}

.elite-four-title {
    color: #e74c3c;
}

.champion-title {
    color: #f39c12;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gym-leaders-container {
    padding: 20px 0 80px;
}

/* Leader Card */
.leader-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 107, 53, 0.15);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.leader-card:hover {
    border-color: rgba(255, 107, 53, 0.4);
}

/* Leader Header - Clickable */
.leader-header {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    cursor: pointer;
    gap: 18px;
    transition: background 0.2s ease;
}

.leader-header:hover {
    background: rgba(255, 107, 53, 0.03);
}

/* Arrow */
.leader-arrow {
    transition: transform 0.2s ease;
    color: var(--primary-color);
}

.leader-card.expanded .leader-arrow {
    transform: rotate(90deg);
}

.leader-arrow i {
    font-size: 1.1rem;
}

/* Leader Sprite */
.leader-sprite {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.leader-sprite img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Leader Info */
.leader-info {
    flex: 1;
}

.leader-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.leader-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.type-badge {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leader-gym {
    color: #888;
    font-size: 0.95rem;
    margin: 4px 0 0 0;
}

/* Team Preview */
.leader-team-preview {
    display: flex;
    gap: 6px;
}

.team-sprite {
    width: 46px;
    height: 46px;
    background: rgba(10, 10, 15, 0.6);
    border-radius: 6px;
    padding: 4px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.2s ease;
}

.team-sprite:hover {
    transform: scale(1.08);
    border-color: var(--primary-color);
}

.team-sprite img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Level Cap */
.leader-level-cap {
    text-align: center;
    padding: 8px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    min-width: 70px;
}

.level-cap-label {
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.level-cap-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Team Expansion */
.leader-team-expansion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(10, 10, 15, 0.5);
}

.leader-card.expanded .leader-team-expansion {
    max-height: 8000px;
    border-top: 1px solid rgba(255, 107, 53, 0.1);
}

.team-content {
    padding: 25px 18px;
}

/* Pokemon Grid */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

/* Pokemon Card */
.pokemon-card {
    background: rgba(30, 30, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.pokemon-card:hover {
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.pokemon-card-header {
    position: relative;
    padding: 14px;
    background: rgba(40, 40, 50, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pokemon-type-badges {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.type-badge-small {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pokemon-sprite-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.pokemon-sprite-container img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

.shiny-indicator {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 1.75rem;
    animation: sparkle 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(180deg); }
}

.pokemon-hp-display {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid #ff5959;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.pokemon-title-section {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pokemon-level-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.pokemon-name-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 6px 0;
}

.pokemon-ability-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.85rem;
    color: #f1c40f;
}

.pokemon-moves-section {
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.move-item {
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.15s ease;
}

.move-item:hover {
    border-color: rgba(255, 107, 53, 0.3);
}

.move-name-power {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.move-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
}

.move-power {
    font-size: 0.8rem;
    font-weight: 600;
    color: #888;
}

.pokemon-stats-section {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row {
    display: grid;
    grid-template-columns: 40px 35px 1fr;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    text-transform: lowercase;
}

.stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-align: right;
}

.stat-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Type Colors */
.type-normal { background: #A8A878; color: #fff; }
.type-fire { background: #F08030; color: #fff; }
.type-water { background: #6890F0; color: #fff; }
.type-electric { background: #F8D030; color: #333; }
.type-grass { background: #78C850; color: #fff; }
.type-ice { background: #98D8D8; color: #333; }
.type-fighting { background: #C03028; color: #fff; }
.type-poison { background: #A040A0; color: #fff; }
.type-ground { background: #E0C068; color: #333; }
.type-flying { background: #A890F0; color: #fff; }
.type-psychic { background: #F85888; color: #fff; }
.type-bug { background: #A8B820; color: #fff; }
.type-rock { background: #B8A038; color: #fff; }
.type-ghost { background: #705898; color: #fff; }
.type-dragon { background: #7038F8; color: #fff; }
.type-dark { background: #705848; color: #fff; }
.type-steel { background: #B8B8D0; color: #333; }
.type-fairy { background: #EE99AC; color: #333; }
.type-champion { background: linear-gradient(135deg, #f39c12, #e74c3c); color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.75rem;
    }

    .leader-header {
        flex-wrap: wrap;
        padding: 14px;
    }

    .leader-sprite {
        width: 55px;
        height: 55px;
    }

    .leader-team-preview {
        order: 4;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .pokemon-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pokemon-moves-section {
        grid-template-columns: 1fr;
    }

    .team-content {
        padding: 18px 12px;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
}
