/* main.css */
.pokedex-container {
    background-color: #E51D40;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    width: 1000px;
    height: 600px;
    position: relative;
    transform-origin: left;
    transition: transform 0.5s ease;
    max-width: 95vw;
}
.pokedex-container.closed {
    transform: scaleX(0);
}

/* Responsive design */
@media (max-width: 1024px) {
    .pokedex-container {
        width: 90vw;
        height: auto;
        min-height: 500px;
        flex-direction: column;
    }
    .left-panel, .middle-panel, .right-panel {
        margin-right: 0 !important;
        margin-bottom: 10px;
        flex: none !important;
    }
    .middle-panel {
        order: 1;
    }
    .left-panel {
        order: 2;
    }
    .right-panel {
        order: 3;
    }
}

@media (max-width: 768px) {
    .pokedex-container {
        width: 95vw;
        padding: 15px;
    }
}
.left-panel {
    background-color: #D0112B;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    flex: 1;
    margin-right: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, #E51D40, #A50C20);
    border-radius: 10px;
    box-shadow: inset -4px -4px 10px rgba(0,0,0,0.2), inset 4px 4px 10px rgba(255,255,255,0.2);
    z-index: -1;
}
.left-panel-content {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.middle-panel {
    flex: 2;
    margin-right: 10px;
}
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 200px;
}
.screen {
    background-color: #ffffff;
    border-radius: 5px;
    padding: 20px; /* Aumentar el padding */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px; /* Aumentar el margen */
}
.circle-button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

#open-button {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 10;
}
.mini-screen {
    background-color: #000000;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px; /* Aumentar el margen */
    height: 50px; /* Aumentar la altura */
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-screen h1 {
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1.5rem; /* Aumentar el tamaño de la fuente */
}
#pokemon-image {
    height: 200px; /* Aumentar la altura */
    width: 200px; /* Aumentar el ancho */
}
.text-lg {
    font-size: 1.25rem; /* Aumentar el tamaño de la fuente */
}





/* type.html */
.pokedex-entry {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px;
    margin: 10px;
    text-align: center;
    width: 120px;
    transition: transform 0.3s ease;
}

.pokedex-entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.pokedex-entry img {
    display: block;
    margin: 0 auto 10px;
    width: 96px;
    height: 96px;
}

.pokedex-entry h3 {
    font-size: 16px;
    color: #333;
}

.pokedex-entry p {
    font-size: 14px;
    color: #666;
}

/* Type badges with colors */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    margin: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.type-normal { background-color: #A8A878; }
.type-fire { background-color: #F08030; }
.type-water { background-color: #6890F0; }
.type-electric { background-color: #F8D030; color: #333; }
.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; }

/* Loading state */
#pokemon-image.loading {
    opacity: 0.3;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.loading-text {
    color: #666;
    font-style: italic;
}

/* Error message */
.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

.error-message i {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* Legendary icon */
.legendary-icon {
    color: #FFD700;
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Info sections */
.info-section {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.info-item {
    margin: 8px 0;
    font-size: 14px;
}

/* Abilities */
.abilities-section {
    margin-bottom: 15px;
}

.abilities-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.ability-badge {
    background-color: #6c757d;
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Stats section */
.stats-section {
    margin-top: 15px;
}

.stat-row {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-name {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    color: #555;
    min-width: 70px;
}

.stat-bar {
    flex: 1;
    height: 16px;
    background-color: #e9ecef;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    border-radius: 8px;
    transition: width 0.5s ease;
}

.stat-value {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: bold;
    color: #333;
}

/* Button improvements */
.buttons button {
    transition: all 0.3s ease;
}

.buttons button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.buttons button:active:not(:disabled) {
    transform: translateY(0);
}

.buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth transitions */
#pokemon-image {
    transition: opacity 0.3s ease;
}

#pokemon-type, #pokemon-legendary {
    transition: all 0.3s ease;
}

/* Improve scrolling on right panel */
#info {
    overflow-y: auto;
    max-height: 500px;
}

/* Evolution chain styling */
.evolution-chain {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.evolution-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    min-width: 90px;
    max-width: 110px;
    transition: all 0.3s ease;
    position: relative;
}

.evolution-item:not(.current):hover {
    background: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.evolution-item.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.evolution-item.current .evolution-name {
    color: white;
    font-weight: 700;
}

.evolution-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 4px;
}

.evolution-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.evolution-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.evolution-types .type-badge {
    font-size: 8px;
    padding: 1px 4px;
}

.evolution-arrow {
    font-size: 20px;
    color: #888;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.current-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #ffc107;
    color: #333;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

#info::-webkit-scrollbar {
    width: 6px;
}

#info::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#info::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#info::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Toggle buttons container */
.toggle-buttons-container {
    margin-top: 15px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.toggle-btn {
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.effectiveness-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.effectiveness-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.evolution-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.evolution-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.toggle-btn:active {
    transform: translateY(0);
}

.toggle-btn i {
    font-size: 14px;
}

/* Evolution Section - Above Pokedex (Horizontal) */
.evolution-section-container {
    background-color: #E51D40;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1400px;
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
    transition: all 0.4s ease;
}

.evolution-section-container.closed {
    height: 0;
    opacity: 0;
    transform: scaleY(0);
    padding: 0;
    margin: 0;
}

.evolution-section-header {
    background-color: #D0112B;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    text-align: center;
}

.evolution-section-header h2 {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
}

.evolution-section-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Type Effectiveness Sidebar - Right Side (Vertical) */
.effectiveness-sidebar {
    background-color: #E51D40;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 320px;
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
    transition: all 0.4s ease;
    flex-shrink: 0;
    align-self: stretch;
}

.effectiveness-sidebar.closed {
    width: 0;
    opacity: 0;
    transform: scaleX(0);
    padding: 0;
}

.effectiveness-header {
    background-color: #D0112B;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.effectiveness-header h2 {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.effectiveness-header i {
    font-size: 16px;
}

.close-effectiveness-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-effectiveness-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) rotate(90deg);
}

.close-effectiveness-btn i {
    font-size: 14px;
}

.effectiveness-content {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.effectiveness-content::-webkit-scrollbar {
    width: 8px;
}

.effectiveness-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.effectiveness-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.effectiveness-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.effectiveness-sections {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.effectiveness-section {
    padding: 8px 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.effectiveness-section h3 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}

.effectiveness-section.weak {
    background-color: #ffebee;
    border-left: 4px solid #dc3545;
}

.effectiveness-section.weak h3 {
    color: #dc3545;
}

.effectiveness-section.resist {
    background-color: #e8f5e9;
    border-left: 4px solid #28a745;
}

.effectiveness-section.resist h3 {
    color: #28a745;
}

.effectiveness-section.immune {
    background-color: #e3f2fd;
    border-left: 4px solid #007bff;
}

.effectiveness-section.immune h3 {
    color: #007bff;
}

.effectiveness-section.super {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.effectiveness-section.super h3 {
    color: #f57c00;
}

.effectiveness-section.not-effective {
    background-color: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.effectiveness-section.not-effective h3 {
    color: #9c27b0;
}

.effectiveness-section.no-effect {
    background-color: #eeeeee;
    border-left: 4px solid #757575;
}

.effectiveness-section.no-effect h3 {
    color: #757575;
}

.type-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.type-badges-grid .type-badge {
    font-size: 10px;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.multiplier {
    font-weight: 800;
    font-size: 10px;
    opacity: 0.9;
}

.no-types {
    color: #999;
    font-style: italic;
    font-size: 10px;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .main-container {
        max-width: 100%;
        padding: 0 10px;
    }

    .evolution-section-container {
        max-width: 100%;
    }

    .effectiveness-sidebar {
        width: 280px;
    }
}

@media (max-width: 1100px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .effectiveness-sidebar {
        width: 100%;
        max-width: 90vw;
    }

    .effectiveness-sidebar.closed {
        height: 0;
        transform: scaleY(0);
        transform-origin: top;
    }

    .effectiveness-sidebar:not(.closed) {
        transform: scaleY(1);
    }

    .effectiveness-sections {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .evolution-chain {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .evolution-section-container {
        width: 95vw;
        padding: 12px;
    }

    .effectiveness-sidebar {
        width: 95vw;
        padding: 12px;
    }

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

    .toggle-btn {
        font-size: 11px;
        padding: 8px 12px;
    }

    .evolution-chain {
        flex-wrap: wrap;
        gap: 8px;
    }

    .evolution-item {
        min-width: 80px;
    }

    .evolution-item img {
        width: 50px;
        height: 50px;
    }

    .evolution-arrow {
        font-size: 16px;
    }
}

@media (max-width: 500px) {
    .effectiveness-sections {
        grid-template-columns: 1fr;
    }

    .evolution-item {
        min-width: 70px;
        padding: 6px;
    }

    .evolution-item img {
        width: 45px;
        height: 45px;
    }

    .evolution-name {
        font-size: 10px;
    }
}

/* Adjust body layout */
body {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
    gap: 15px;
}

#open-button {
    position: fixed;
    z-index: 1000;
}

/* Main container - holds pokedex and effectiveness side by side */
.main-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
}

.pokedex-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-shrink: 0;
}
