@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none; 
}
* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

h1{
    color: rgb(255, 255, 255);
    font-weight:bold;
    padding: 1rem;
    text-align: center;
    margin-top: 80px;
    font-size: 3rem;
}

.main-title:not(.homepage .main-title) {
    display: none;
}

.type-badge {
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'Inter', -webkit-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
    position: relative;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
}

body{
    background: #2d3748;
    font-family: 'Inter', sans-serif;
}

.navbar-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 90px;
    background: #2d3748;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-background h1 {
    color: #F8D030;
    font-weight: bold;
    text-align: center;
    margin: 0;
    font-size: 2.5rem;
}

.top-navbar {
    position: fixed;
    top: 0px;
    right: 0px;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #4a5568;
    border-left: 2px solid #4a5568;
    border-bottom-left-radius: 12px;
    z-index: 1000;
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.homepage {
    padding-top: 70px;
}

.homepage .navbar-background {
    display: none;
}

.homepage h1 {
    margin-top: 0;
}

.top-navbar .nav-item {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    border: 2px solid transparent;
}

.top-navbar .nav-item:hover {
    background-color: #4a5568;
    transform: translateY(-1px);
    border-color: #cbd5e0;
}

.top-navbar .nav-item.active {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #c82333;
}

@media (max-width: 768px) {
    .top-navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        border-left: none;
        border-bottom: 2px solid #4a5568;
        justify-content: space-around;
        flex-wrap: nowrap;
        gap: 0;
        padding: 12px 20px;
    }
    
    .navbar-background {
        display: none;
    }
    
    .homepage {
        padding-top: 60px;
    }
    
    .top-navbar .nav-item {
        font-size: 14px;
        padding: 10px 15px;
        flex: 1;
        text-align: center;
        min-width: 0;
        white-space: nowrap;
        border: none;
        transform: none;
    }
    
    .top-navbar .nav-item:hover {
        transform: none;
        border-color: transparent;
    }
    
    .top-navbar .nav-item.active {
        border: none;
        transform: none;
    }
}

body {
    padding-top: 70px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    #search {
        position: static !important;
        top: auto !important;
        z-index: auto !important;
    }
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

#search {
    position: sticky;
    top: 0;
    background: #2d3748;
    padding: 20px;
    text-align: center;
    z-index: 100;
    margin-bottom: 20px;
}

#pokemon-input {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    width: 300px;
    max-width: 80%;
    margin-right: 10px;
    outline: none;
    transition: border-color 0.2s ease;
}


#search-button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4a5568;
    color: white;
    border: none;
    height: 46px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#search-button:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

#search-button:active {
    transform: translateY(0);
}

/* Sorting Controls Styles */
#sorting-controls {
    padding: 15px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#sorting-controls label {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    margin-right: 8px;
}

#sorting-controls select {
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #2d3748;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 180px;
}

#sorting-controls select:hover {
    border-color: #007bff;
}

#sorting-controls select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.results-count {
    text-align: center;
    color: #cbd5e0;
    font-size: 14px;
    margin: 15px 0;
    font-weight: 500;
}

/* Responsive Design for Sorting */
@media (max-width: 768px) {
    #sorting-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    #sorting-controls select {
        min-width: 250px;
    }
}

/* Pokemon Grid Styles */
.pokemon-card {
    background-color: #f7fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pokemon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border-color: #a0aec0;
}

.pokemon-sprite {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.pokemon-name {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.loading,
.error {
    text-align: center;
    padding: 40px;
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
}

.loading {
    color: #ffffff;
}

.error {
    color: #fed7d7;
    background-color: #742a2a;
    border-radius: 8px;
    margin: 20px;
    border: 1px solid #e53e3e;
}

/* Navigation Bar Styles */
.navigation-bar {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

#back-button,
#home-button {
    background-color: #4a5568;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    box-sizing: border-box;
}

#back-button:hover,
#home-button:hover {
    background-color: #2d3748;
    transform: translateY(-1px);
}

#back-button:active,
#home-button:active {
    transform: translateY(0);
}

/* Legacy back button styles for compatibility */
#back-button {
    background-color: #4a5568;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 16px;
}

#back-button:hover {
    background-color: #2d3748;
}

@media (max-width: 768px) {
    .navigation-bar {
        flex-direction: row !important;
        gap: 10px;
        align-items: flex-start !important;
        width: 100%;
        margin-bottom: 20px;
    }
    
    #back-button,
    #home-button {
        width: auto !important;
        max-width: none !important;
        text-align: center !important;
        margin-bottom: 0 !important;
        padding: 10px 20px !important;
        font-size: 16px !important;
        display: inline-flex !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        height: 44px !important;
        min-width: 120px;
        justify-content: center !important;
        align-items: center !important;
    }
    
    #back-button {
        margin-bottom: 0 !important;
        width: auto !important;
        display: inline-flex !important;
    }
    
    .detail-container {
        padding: 20px;
        margin: 70px 0 0 0; 
        border-radius: 0;
    }
}

.detail-container {
    background-color: #1a202c;
    border-radius: 12px;
    padding: 30px;
    max-width: 100%;
    margin: 80px auto 0 auto; 
    overflow-x: hidden;
    box-sizing: border-box;
}

.detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.detail-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-sprite-large {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background-color: transparent;
    border-radius: 12px;
}

.detail-info {
    flex: 1;
}

.detail-name {
    color: #fff;
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    text-align: left;
    line-height: 1.2;
    padding-left: 0;
}

.detail-types {
    margin-bottom: 20px;
    text-align: left;
    margin-left: 0;
}

.type-normal { background-color: #A8A878; }
.type-fire { background-color: #F08030; }
.type-water { background-color: #6890F0; }
.type-electric { background-color: #F8D030; }
.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; }
.type-stellar { 
    background: conic-gradient(from 0deg, 
        #FF0000 0deg 30deg,      /* Red */
        #FF8000 30deg 60deg,     /* Orange */
        #FFFF00 60deg 90deg,     /* Yellow */
        #80FF00 90deg 120deg,    /* Yellow-Green */
        #00FF00 120deg 150deg,   /* Green */
        #00FF80 150deg 180deg,   /* Green-Cyan */
        #00FFFF 180deg 210deg,   /* Cyan */
        #0080FF 210deg 240deg,   /* Blue */
        #0000FF 240deg 270deg,   /* Blue */
        #8000FF 270deg 300deg,   /* Indigo */
        #FF00FF 300deg 330deg,   /* Violet/Magenta */
        #FF0080 330deg 360deg    /* Red-Violet */
    );
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    text-align: left;
    margin: 0;
    padding-left: 0;
}

.detail-stats h3,
.detail-abilities h3,
.detail-moves h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 2.25rem;
    border-bottom: 2px solid white;
    padding-bottom: 5px;
}

.physical-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.radar-chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.abilities-list,
.moves-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    justify-content: stretch;
    width: 100%;
}

.detail-abilities .abilities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.ability-badge {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', -webkit-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    border: 1px solid #4a5568;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.detail-abilities .ability-badge {
    width: auto;
    min-width: 120px;
}

.move-badge {
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', -webkit-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
}

.move-generic {
    background-color: #4a5568;
    border: 1px solid #cbd5e0;
}

.moves-by-type {
    display: flex;
    flex-direction: column;
    gap: 7.5px;
}

.move-type-section {
    padding: 15px 0px 20px 0px;
    margin-bottom: 20px;
}

.move-type-header {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.move-type-section .moves-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-start;
}

.stat-label{
    font-weight: bold;
    margin-right: 0.25rem;
    font-size: 1rem;
    color: #ffffff;
}
.stat-value{
    font-size: 1rem;
    margin-right: 0.5rem;
    color: #ffffff;
}
@media (max-width: 770px) {
    .detail-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .detail-images {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .detail-sprite-large {
        margin: 0 auto;
        display: block;
    }
    
    .detail-info {
        width: 100%;
        text-align: center;
    }
    
    .physical-stats {
        justify-content: center;
    }
}

/* Search Results Styling */
.search-results-header {
    text-align: center;
    margin: 20px 0;
}

.search-results-header h2 {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

.main-title {
    color:  #F8D030;
}

/* Move Detail Page Styles */
#move-detail {
    margin: 0 auto;
    color: #ffffff;
    width: 100%;
    max-width: 100%;
}

.move-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
}

.damage-class-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Inter', -webkit-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.damage-class-badge.physical {
    background-color: #dc3545;
    color: white;
}

.damage-class-badge.special {
    background-color: #007bff;
    color: white;
}

.damage-class-badge.status {
    background-color: #6c757d;
    color: white;
}

.move-details {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.move-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.learned-by-section {
    margin-top: 30px;
}

.learned-by-section h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Pokemon Banner Styles */
.pokemon-banners {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.pokemon-banner {
    display: flex;
    align-items: center;
    background: #4a5568;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pokemon-banner:hover {
    background: #718096;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.banner-sprite {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
}

.banner-sprite-placeholder {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
    background: #718096;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #cbd5e0;
}

.banner-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clickable-move {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.clickable-move:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .pokemon-banners {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .pokemon-banner {
        padding: 6px 10px;
    }
    
    .banner-sprite {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    
    .banner-name {
        font-size: 0.85rem;
    }
    
    .move-details {
        flex-direction: column;
        gap: 10px;
    }
}

#ability-detail {
    margin: 0 auto;
    color: #ffffff;
    width: 100%;
    max-width: 100%;
}

.clickable-ability {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-ability:hover {
    background-color: #4a5568;
    border-color: #718096;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.alphabet-section {
    grid-column: 1 / -1;
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 20px 0 10px 0;
    margin-top: 20px;
    border-bottom: 2px solid #4a5568;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.alphabet-section:first-child {
    margin-top: 0;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.type-card {
    background: rgba(45, 55, 72, 0.8);
    color: white;
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #4a5568;
    transition: transform 0.2s ease;
}

.type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.type-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
    color: white;
    padding: 12px;
    border-radius: 8px;
}

.type-effectiveness {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.weakness-section, .strength-section, .immunity-section, .ineffective-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.weakness-section h3, .strength-section h3, .immunity-section h3, .ineffective-section h3 {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: left;
}

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

.types-grid .type-badge {
    font-size: 1.1rem;
    padding: 12px 20px;
    min-width: 100px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.type-card .type-badge {
    text-shadow: 
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.no-types {
    color: #a0aec0;
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .types-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .type-card {
        padding: 15px;
    }
    
    .type-name {
        font-size: 1.5rem;
    }
}

.types-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.type-detail-card {
    background: rgba(45, 55, 72, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
}

.type-detail-card .type-name {
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-align: center;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    width: auto;
    min-width: 100px;
}

.type-effectiveness-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.effectiveness-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.effectiveness-label {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 160px;
    text-align: left;
}

.effectiveness-row .type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

@media (max-width: 768px) {
    .type-detail-card {
        padding: 15px;
    }
    
    .effectiveness-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .effectiveness-label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .type-detail-card .type-name {
        font-size: 1.1rem;
        min-width: 100px;
        padding: 10px 16px;
    }
}