/*
  Copyright (c) 2024 Juan Antonio Barrionuevo

  All Rights Reserved.

  This app is free to be used by anyone for non-commercial purposes. For commercial purposes, contact the owner to discuss options.

  No modification or distribution is allowed.
*/

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Arial', sans-serif;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23E5E7EB" fill-opacity="0.4"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm-2-16h-4v2h4v4h2v-4h4v-2h-4v-4h-2v4zM16 8h-4v2h4v4h2V10h4V8h-4V4h-2v4zM2 34v-4h-2v4h-4v2h4v4h2v-4h4v-2H2z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    position: relative;
}

.hidden {
    display: none !important;
}

#video-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

#intro-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#unmute-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
}

#app-wrapper.hidden {
    display: none;
}

.main-content {
    margin-left: 80px; /* Default collapsed sidebar width */
    transition: margin-left 0.3s ease;
}

body.sidebar-expanded .main-content {
    margin-left: 250px; /* Expanded sidebar width */
}

.hero {
    width: 90%;
    max-width: 1280px;
    background: #FFFFFF;
    margin: 2rem auto;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
}

.header-video-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 15px;
}

#header-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left;
}

.hero-pokemon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    min-height: 300px;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-pokemon-image {
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.highlight {
    color: #D94441;
    font-weight: 600;
}

.pokemon-star {
    color: #FFCB05;
    margin: 0 5px;
}

#generations-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.generation {
    background-color: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    color: #1F2937;
  }

  .trio-conclusion .font-bold {
      margin-top: 1.5rem;
      text-align: center;
      display: block;
  }

.title {
    color: #3D62B5;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.content {
    color: #4B5563;
    font-size: 1.125rem;
    text-align: center;
    margin-top: 20px;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 20px 0;
    justify-items: center;
}

.trio-title {
    color: #D94441;
    font-size: 2rem;
    font-weight: 700;
    margin: 15px 0;
    text-align: center;
}

.trio-subtitle {
    color: #4B5563;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 15px 0;
    text-align: center;
}

.pokemon-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;    
}

.pokemon-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 350px;
    padding: 20px;
    border-radius: 15px;
    background-color: #FFFFFF;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-items: center;
    justify-content: flex-start;
}

.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pokemon-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.pokemon-name {
    color: #3D62B5;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 10px 0;
}

.pokemon-type {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.water-type { background-color: #3B82F6; } 
.fire-type { background-color: #EF4444; } 
.flying-type { background-color: #8B5CF6; } 
.ice-type { background-color: #60A5FA; } 
.psychic-type { background-color: #EC4899; } 
.electric-type { background-color: #FBBF24; } 
.ground-type { background-color: #CA8A04; } 
.dragon-type { background-color: #7C3AED; } 
.rock-type { background-color: #A16207; } 
.steel-type { background-color: #6B7280; } 
.ghost-type { background-color: #6D28D9; } 
.dark-type { background-color: #4B5563; } 
.normal-type { background-color: #9CA3AF; } 
.grass-type { background-color: #22C55E; } 
.fighting-type { background-color: #DC2626; } 
.bug-type { background-color: #84CC16; } 
.fairy-type { background-color: #F472B6; } 
.poison-type { background-color: #A855F7; } 

.region-label {
    background-color: #FFCB05;
    color: #1F2937;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 15px;
}

.stats-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    text-align: left;
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    background-color: #F3F4F6;
    margin-top: 1rem;
    }

.pokemon-description {
    margin-top: 1rem;
    font-style: italic;
    color: #6B7280;
}

.power-icon {
    font-size: 24px;
    color: #FFCB05;
    margin: 0 5px;
}

.conclusion-container {
    width: 90%;
    max-width: 1280px;
    min-height: 720px;
    background: #FFFFFF;
    margin: 2rem auto;
    padding: 20px;
    font-family: 'Poppins', 'Arial', sans-serif;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.conclusion-title {
    color: #3D62B5;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.2);
}

.conclusion-image {
    width: 600px;
    height: 400px;
    object-fit: contain;
    margin-bottom: 30px;
}

.conclusion-text {
    color: #D94441;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.refresh-icon {
    background-color: #ffcb05; /* Placeholder color */
}

@media (max-width: 768px) {
    .header-video-container {
        height: 70vh;
        max-height: 600px;
    }
    
    .main-content {
        margin-left: 0;
    }

    .hero-pokemon-image {
        max-height: 200px;
    }

    .pokemon-card {
        flex-basis: calc(50% - 20px);
    }

    .conclusion-image {
        width: 100%;
        height: auto;
    }

    .title {
        font-size: 2rem;
    }

    .trio-title {
        font-size: 1.75rem;
    }

    .pokemon-name {
        font-size: 1.5rem;
    }

    .conclusion-title {
        font-size: 2.25rem;
    }

    .conclusion-text {
        font-size: 1.5rem;
    }
}

@media (min-width: 769px) {
    .header-video-container {
        height: 400px;
        background-color: #FFFFFF;
    }

    #header-image {
        object-position: center;
    }
}

@media (max-width: 480px) {
    .pokemon-card {
        flex-basis: 100%;
    }

    .title {
        font-size: 1.75rem;
    }

    .trio-title {
        font-size: 1.5rem;
    }

    .pokemon-name {
        font-size: 1.25rem;
    }
}

.progress-bar {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar::-webkit-progress-bar {
  background-color: #E5E7EB;
}

.dark .progress-bar::-webkit-progress-bar {
  background-color: #4B5563;
}

.progress-bar::-webkit-progress-value {
  background-color: #FFCB05;
  transition: width 0.5s ease-in-out;
}

/* === Image Fallback Styles === */

.image-fallback-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px; /* Ensure it has some height */
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    background: #2e2e2e; /* A dark background for the placeholder */
    border-radius: 8px;
    border: 1px dashed #555;
    font-family: 'Orbitron', sans-serif; /* Use the project's font */
}

.image-fallback-text {
    font-size: 2.5rem; /* Large, prominent text */
    font-weight: bold;
    color: #ffffff;
    margin: 0;
    text-transform: capitalize; /* Capitalize Pokémon names */
}

.image-fallback-subtext {
    font-size: 1.2rem; /* Smaller subtext */
    color: #cccccc;
    margin-top: 10px;
}
