* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    min-height: 100vh;
}

/* Light Mode */
body.light {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
}

/* Dark Mode */
body.dark {
    background: linear-gradient(135deg, #0f0f23 0%, #2d1b69 50%, #1a0f3d 100%);
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.mode-toggle:hover {
    transform: scale(1.05);
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    outline: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pokemon-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

body.dark .pokemon-card {
    background: rgba(255,255,255,0.1);
}

.pokemon-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.pokemon-id {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 10px;
}

.pokemon-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    display: block;
}

.pokemon-name {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
}

.pokemon-types {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.type-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: slideIn 0.3s ease;
}

body.dark .modal-content {
    background: rgba(30,30,50,0.95);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.close-modal:hover {
    color: #000;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-pokemon-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

body.dark .stat-item {
    background: rgba(255,255,255,0.1);
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn {
    background: #4CAF50;
    color: white;
}

.next-btn {
    background: #2196F3;
    color: white;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
}

.error {
    text-align: center;
    color: #ff4444;
    padding: 20px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .pokemon-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Type Colors */
.type-normal { background: #A8A878; }
.type-fire { background: #F08030; }
.type-water { background: #6890F0; }
.type-electric { background: #F8D8D030; }
.type-grass { background: #78C850; }
.type-ice { background: #98D8D8; }
.type-fighting { background: #C03028; }
.type-poison { background: #A040A0; }
.type-ground { background: #E0C068; }
.type-flying { background: #A890F0; }
.type-psychic { background: #F85888; }
.type-bug { background: #A8B820; }
.type-rock { background: #B8A038; }
.type-ghost { background: #705898; }
.type-dragon { background: #7038F8; }
.type-dark { background: #705848; }
.type-steel { background: #B8B8D0; }
.type-fairy { background: #EE99AC; }

/* Botão Carregar Mais */
.load-more-container {
    text-align: center;
    padding: 40px 20px;
}

.load-more-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(76, 175, 80, 0.6);
}

.load-more-btn:active {
    transform: translateY(-2px);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-count {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.complete-message {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 25px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    box-shadow: 0 20px 40px rgba(76, 175, 80, 0.4);
}

.search-complete {
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid rgba(76, 175, 80, 0.3);
    color: #2e7d32;
    font-weight: 600;
}

