/* Pokemon Battle Challenge CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2c3e50;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Loading Screen */
.loading-content {
    text-align: center;
    animation: fadeIn 1s ease-out;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.loading-content h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 10px;
    color: #fff;
}

.loading-content p {
    color: #f0f0f0;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffcb05;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: #fff;
    font-size: 0.9rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Main Menu */
.menu-content {
    text-align: center;
    animation: fadeIn 1s ease-out;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #cc0000, #ffcb05);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
    letter-spacing: 2px;
    margin-bottom: 60px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-btn {
    padding: 20px 60px;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(45deg, #3b4cca, #2a75bb);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.menu-btn:hover {
    background: linear-gradient(45deg, #cc0000, #ffcb05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Back Button */
.back-button {
    position: fixed;
    top: 40px;
    left: 40px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #3b4cca;
    color: #3b4cca;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    letter-spacing: 2px;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-button:hover {
    background: #3b4cca;
    color: #fff;
    transform: translateX(-3px);
}

/* Screen Titles */
.screen-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.screen-subtitle {
    font-size: 1rem;
    color: #f0f0f0;
    letter-spacing: 2px;
    margin-bottom: 40px;
    text-align: center;
}

/* Pokemon Grid */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pokemon-card {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #e0e0e0;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.pokemon-card:hover {
    background: #fff;
    border-color: #ffcb05;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.pokemon-card.selected {
    background: #fff;
    border-color: #3b4cca;
    box-shadow: 0 8px 25px rgba(59, 76, 202, 0.3);
}

.pokemon-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(59, 76, 202, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.pokemon-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    image-rendering: pixelated;
}

.pokemon-card h3 {
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 700;
}

.pokemon-types {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0;
}

.type-badge {
    padding: 4px 12px;
    font-size: 0.75rem;
    border: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 12px;
    font-weight: 700;
    color: #fff;
}

.pokemon-stats {
    font-size: 0.85rem;
    color: #555;
    margin-top: 10px;
    line-height: 1.6;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.search-box input,
.search-box select {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    color: #2c3e50;
    font-size: 0.95rem;
    font-family: inherit;
    letter-spacing: 1px;
    border-radius: 25px;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #999;
}

.search-box input:focus,
.search-box select:focus {
    outline: none;
    background: #fff;
    border-color: #3b4cca;
    box-shadow: 0 0 0 3px rgba(59, 76, 202, 0.1);
}

/* Battle Screen */
.battle-field {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin: 40px auto 20px;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8C8 50%, #90EE90 100%);
    border: 4px solid #3b4cca;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.opponent-side,
.player-side {
    position: absolute;
}

.opponent-side {
    top: 40px;
    right: 80px;
}

.player-side {
    bottom: 40px;
    left: 80px;
}

.pokemon-sprite {
    width: 150px;
    height: 150px;
    position: relative;
    image-rendering: pixelated;
}

.pokemon-sprite.opponent {
    animation: slideInRight 0.5s ease-out;
}

.pokemon-sprite.player {
    animation: slideInLeft 0.5s ease-out;
}

.pokemon-sprite img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Attack Animation */
@keyframes attackShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.attacking {
    animation: attackShake 0.3s ease-in-out;
}

/* Damage Animation */
@keyframes damageFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.taking-damage {
    animation: damageFlash 0.5s ease-in-out;
}

/* Faint Animation */
@keyframes faint {
    to {
        opacity: 0;
        transform: translateY(50px);
    }
}

.fainted {
    animation: faint 0.8s ease-out forwards;
}

/* Pokemon Status */
.pokemon-status {
    position: absolute;
    width: 250px;
}

.opponent-side .pokemon-status {
    top: -10px;
    left: -270px;
}

.player-side .pokemon-status {
    bottom: -10px;
    right: -270px;
}

.status-bar {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #3b4cca;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pokemon-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.pokemon-name {
    font-size: 0.95rem;
    letter-spacing: 1px;
    font-weight: 700;
    color: #2c3e50;
}

.pokemon-level {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.hp-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(200, 200, 200, 0.5);
    border: 2px solid #555;
    margin: 5px 0;
    overflow: hidden;
    border-radius: 4px;
}

.hp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 100%);
    transition: width 0.5s ease-out, background 0.3s ease;
    width: 100%;
}

.hp-bar.low {
    background: linear-gradient(90deg, #ff9800 0%, #ffc107 100%);
}

.hp-bar.critical {
    background: linear-gradient(90deg, #f44336 0%, #ff5722 100%);
}

.hp-text {
    font-size: 0.85rem;
    color: #333;
    text-align: right;
    font-weight: 600;
}

/* Battle Menu */
.battle-menu {
    max-width: 900px;
    margin: 0 auto;
}

.battle-log {
    min-height: 100px;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #3b4cca;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 15px;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.battle-log p {
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease-out;
}

.battle-log p.effectiveness {
    color: #2e7d32;
    font-weight: 700;
}

.battle-log p.not-effective {
    color: #f57c00;
    font-weight: 700;
}

.battle-log p.critical {
    color: #c62828;
    font-weight: 700;
}

.action-menu {
    display: flex;
    gap: 15px;
}

.move-buttons {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.move-btn {
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #3b4cca;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-align: left;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.move-btn:hover:not(:disabled) {
    background: #3b4cca;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 76, 202, 0.3);
}

.move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.move-name {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.move-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

.forfeit-btn {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #cc0000;
    color: #cc0000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 1px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.forfeit-btn:hover {
    background: #cc0000;
    color: #fff;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
}

/* Result Screen */
.result-content {
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.result-title {
    font-size: 4rem;
    font-weight: 200;
    letter-spacing: 10px;
    margin-bottom: 30px;
}

.result-title.victory {
    color: #4caf50;
}

.result-title.defeat {
    color: #f44336;
}

.result-message {
    font-size: 1.2rem;
    color: #999;
    letter-spacing: 3px;
    margin-bottom: 60px;
}

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

/* Opponent Content */
.opponent-content {
    width: 100%;
    max-width: 1400px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .menu-content {
        padding: 40px 20px;
        margin: 0 10px;
    }

    .menu-btn {
        padding: 15px 30px;
        font-size: 0.9rem;
    }

    .screen-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .screen-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
        padding: 10px;
    }

    .pokemon-card {
        padding: 15px 10px;
    }

    .pokemon-image {
        width: 80px;
        height: 80px;
    }

    .pokemon-card h3 {
        font-size: 0.95rem;
    }

    .pokemon-number {
        top: 5px;
        right: 5px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }

    .search-box input,
    .search-box select {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .player-team-container {
        padding: 20px 15px;
        margin: 15px 10px;
        position: relative;
        top: 0;
    }

    .player-team-container h3 {
        font-size: 1.2rem;
    }

    .player-team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .team-pokemon-card img {
        width: 60px;
        height: 60px;
    }

    .battle-field {
        height: 300px;
        margin: 20px 10px;
    }

    .opponent-side {
        top: 20px;
        right: 20px;
    }

    .player-side {
        bottom: 20px;
        left: 20px;
    }

    .pokemon-sprite {
        width: 100px;
        height: 100px;
    }

    .pokemon-status {
        width: 180px;
        font-size: 0.85rem;
    }

    .opponent-side .pokemon-status {
        left: -190px;
    }

    .player-side .pokemon-status {
        right: -190px;
    }

    .move-buttons {
        grid-template-columns: 1fr;
    }

    .action-menu {
        flex-direction: column;
    }

    .result-title {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }

    .config-content {
        padding: 0 10px;
    }

    .config-pokemon-display img {
        width: 100px;
        height: 100px;
    }

    .config-pokemon-display h3 {
        font-size: 1.5rem;
    }

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

    .ev-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ev-row label {
        min-width: auto;
    }

    .ev-row input[type="range"] {
        width: 100%;
    }

    .switch-pokemon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Extra small devices (phones in portrait, less than 400px) */
@media (max-width: 400px) {
    .title {
        font-size: 1.5rem;
    }

    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .pokemon-card {
        padding: 10px 5px;
    }

    .pokemon-image {
        width: 60px;
        height: 60px;
    }

    .pokemon-card h3 {
        font-size: 0.85rem;
    }

    .type-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .pokemon-stats {
        font-size: 0.75rem;
    }

    .menu-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .battle-field {
        height: 250px;
    }

    .pokemon-sprite {
        width: 80px;
        height: 80px;
    }

    .opponent-side {
        top: 10px;
        right: 10px;
    }

    .player-side {
        bottom: 10px;
        left: 10px;
    }

    .pokemon-status {
        width: 150px;
        font-size: 0.75rem;
    }

    .opponent-side .pokemon-status {
        left: -160px;
    }

    .player-side .pokemon-status {
        right: -160px;
    }
}

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

/* Effectiveness Indicators */
.effectiveness-super {
    color: #2e7d32;
    font-weight: 700;
    font-size: 0.85em;
}

.effectiveness-weak {
    color: #f57c00;
    font-weight: 700;
    font-size: 0.85em;
}

.effectiveness-none {
    color: #c62828;
    font-weight: 700;
    font-size: 0.85em;
}

/* Team Building Styles */
.player-team-container {
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #3b4cca;
    padding: 30px;
    margin: 30px auto;
    max-width: 1000px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 20px;
    z-index: 50;
}

.player-team-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
}

.player-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.team-pokemon-card {
    background: #fff;
    border: 3px solid #e0e0e0;
    padding: 15px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.team-pokemon-card:hover {
    background: #f8f8f8;
    border-color: #ffcb05;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.team-pokemon-card img {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    margin-bottom: 10px;
}

.team-pokemon-card .pokemon-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
    color: #2c3e50;
}

.team-pokemon-card .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #cc0000;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.3s ease;
    font-weight: 700;
}

.team-pokemon-card .remove-btn:hover {
    background: #ff0000;
}

/* Pokemon Configuration Screen */
.config-content {
    max-width: 900px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.config-pokemon-display {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.config-pokemon-display img {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    margin-bottom: 15px;
}

.config-pokemon-display h3 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.config-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.config-section h3 {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #fff;
}

/* Move Selection */
.selected-moves {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    min-height: 120px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.selected-moves.empty::before {
    content: '点击下方技能选择（最多4个）';
    position: absolute;
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.available-moves-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.move-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    text-align: center;
}

.move-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.move-card.selected {
    background: rgba(100, 200, 100, 0.2);
    border-color: rgba(100, 200, 100, 0.6);
}

.move-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.move-card .move-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.move-card .move-info {
    font-size: 0.85rem;
    color: #aaa;
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.move-card .type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 5px 0;
}

/* EV Sliders */
.ev-sliders {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ev-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ev-row label {
    min-width: 120px;
    font-size: 1rem;
    color: #ccc;
}

.ev-row input[type="range"] {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

.ev-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ev-row input[type="range"]::-webkit-slider-thumb:hover {
    background: #6ab0ff;
    transform: scale(1.2);
}

.ev-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.ev-row input[type="range"]::-moz-range-thumb:hover {
    background: #6ab0ff;
    transform: scale(1.2);
}

.ev-row span {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: #4a9eff;
}

#totalEVs {
    color: #4a9eff;
    font-weight: 600;
}

/* Battle Team Status */
.team-status {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.team-pokemon-icon {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.team-pokemon-icon:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.team-pokemon-icon.active {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.2);
}

.team-pokemon-icon.fainted {
    opacity: 0.3;
    cursor: not-allowed;
}

.team-pokemon-icon img {
    width: 50px;
    height: 50px;
    image-rendering: pixelated;
}

/* Switch Pokemon Menu */
.switch-menu {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.switch-menu h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.switch-pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.switch-pokemon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border-radius: 8px;
}

.switch-pokemon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.switch-pokemon-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.switch-pokemon-btn img {
    width: 60px;
    height: 60px;
    image-rendering: pixelated;
}

.switch-pokemon-btn .name {
    margin-top: 10px;
    font-size: 0.9rem;
}

.switch-pokemon-btn .hp {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
}

/* Responsive Updates */
@media (max-width: 768px) {
    .player-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .available-moves-grid {
        grid-template-columns: 1fr;
    }
    
    .ev-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ev-row label {
        min-width: auto;
    }
    
    .ev-row input[type="range"] {
        width: 100%;
    }
    
    .switch-pokemon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
