/* League-specific styling */
.pokemon-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.type-badges {
    margin-bottom: 10px;
}

.type-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    margin: 2px;
    text-transform: capitalize;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
}

/* สีของแต่ละธาตุ */
.type-normal { background: linear-gradient(135deg, #A8A878, #C6C6A7); }
.type-fire { background: linear-gradient(135deg, #F08030, #FA9C78); }
.type-water { background: linear-gradient(135deg, #6890F0, #98D8D8); }
.type-electric { background: linear-gradient(135deg, #F8D030, #FAE078); }
.type-grass { background: linear-gradient(135deg, #78C850, #A7DB8D); }
.type-ice { background: linear-gradient(135deg, #98D8D8, #BCE6E6); }
.type-fighting { background: linear-gradient(135deg, #C03028, #D67873); }
.type-poison { background: linear-gradient(135deg, #A040A0, #C183C1); }
.type-ground { background: linear-gradient(135deg, #E0C068, #EBD69D); }
.type-flying { background: linear-gradient(135deg, #A890F0, #C6B7F5); }
.type-psychic { background: linear-gradient(135deg, #F85888, #FA92B2); }
.type-bug { background: linear-gradient(135deg, #A8B820, #C6D16E); }
.type-rock { background: linear-gradient(135deg, #B8A038, #D1C17D); }
.type-ghost { background: linear-gradient(135deg, #705898, #A292BC); }
.type-dragon { background: linear-gradient(135deg, #7038F8, #A27DFA); }
.type-dark { background: linear-gradient(135deg, #705848, #A29288); }
.type-steel { background: linear-gradient(135deg, #B8B8D0, #D1D1E0); }
.type-fairy { background: linear-gradient(135deg, #EE99AC, #F4BDC9); }

/* League tabs styling */
.league-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.league-tab {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.league-tab:hover {
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}

.league-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.league-tab img {
    width: 24px;
    height: 24px;
}

/* Pokemon Number Styling */
.pokemon-number {
        font-size: 0.75rem;
    margin-top: 5px;
    margin-left: 10px;
}

/* Zoom-in animation for new cards */
@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Cards start hidden until they enter viewport */
.card-animate {
    opacity: 0;
    transform: scale(0.8);
    transition: none;
}

.card-zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
}

/* Ensure consistent animation timing */
.card-zoom-in-delay-1 { animation-delay: 0.1s; }
.card-zoom-in-delay-2 { animation-delay: 0.2s; }
.card-zoom-in-delay-3 { animation-delay: 0.3s; }
.card-zoom-in-delay-4 { animation-delay: 0.4s; }

/* Search Box Styling */
.search-box {
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Shadow Pokemon Background */
.pokemon-shadow .pokemon-image {
    background-image: url('/images/rocket-ball.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    max-width: 180px;
    max-height: 180px;
}

.pokemon-shadow .pokemon-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.pokemon-shadow .pokemon-image {
    position: relative;
    z-index: 2;
}

/* League rank/score badges */
.badge-top-left {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.badge-top-right {
    position: absolute;
    top: 8px;
    right: 8px;
        z-index: 10;
    }
    
.rank-badge {
    background: rgba(128, 128, 128, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.score-badge {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.rank-label, .score-label {
    font-size: 0.6rem;
    line-height: 0.9;
    margin-bottom: 2px;
    opacity: 0.9;
}

.rank-value, .score-value {
    font-size: 0.85rem;
    line-height: 1.1;
    font-weight: 700;
}

.move-info {
    margin-top: 10px;
}

.move-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin: 2px;
    color: white;
}

.fast-move {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

.charged-move {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

/* Enhanced move badges */
.move-item {
    margin-bottom: 8px;
}

.move-label {
    font-size: 8px;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.move-type-icon-badge {
    width: 12px;
    height: 12px;
    object-fit: contain;
    border-radius: 2px;
}

.move-name-text {
    line-height: 1;
}

/* Add padding for bottom navigation */
body {
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 0.75rem;
    }
    
    .league-tabs {
        gap: 6px;
    }
    
    .league-tab {
        padding: 8px 10px;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 4px;
        min-width: 65px;
        text-align: center;
    }
    
    .league-tab img {
        width: 28px;
        height: 28px;
    }
    
    .pokemon-card-content {
        padding: 0.75rem;
    }
    
    .pokemon-name {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.5rem;
    }
    
    .league-tab {
        padding: 6px 8px;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 3px;
        min-width: 60px;
        text-align: center;
    }
    
    .league-tab img {
        width: 24px;
        height: 24px;
    }
    
    .pokemon-image-container {
        height: 170px;
    }
    
    .pokemon-image {
        max-width: 80px;
        max-height: 80px;
    }
}

/* Debug Styles */
.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.85rem;
}

.debug-info h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.debug-info pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Pokemon Card Grid */
.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Pokemon Card Enhancements */
.pokemon-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
}

.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pokemon-card-content {
    padding: 1rem;
}

/* Pokemon Image Container */
.pokemon-image-container {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pokemon-image {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
}

/* Pokemon Name */
.pokemon-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.3;
}

/* Stats Container */
.stats-container {
    margin-top: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: 0.85rem;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #333;
}

/* Moves Container */
.moves-container {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
}

.move-category {
    margin-bottom: 0.5rem;
}

.move-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.move-badge {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Loading States */
.loading-card {
    background: #f8f9fa;
    border-radius: 15px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
} 