/* Pokemon Randomizer Styles */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Pokemon Color Palette */
    --primary-blue: #3b82f6;
    --pokemon-red: #ff4444;
    --pokemon-yellow: #ffcb05;
    --pokemon-blue: #2563eb;
    --electric-yellow: #f1c40f;
    --grass-green: #22c55e;
    --fire-red: #ef4444;
    --water-blue: #3b82f6;
    
    /* UI Colors */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #0f172a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--pokemon-blue) 0%, var(--primary-blue) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--pokemon-red) 0%, var(--fire-red) 100%);
    --gradient-pokeball: linear-gradient(45deg, #ff4444 50%, #ffffff 50%);
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--bg-secondary);
    border-bottom: 3px solid var(--pokemon-yellow);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: var(--pokemon-yellow);
    text-shadow: 2px 2px 0px var(--pokemon-red);
}

.pokeball-icon {
    width: 40px;
    height: 40px;
    animation: spin 4s linear infinite;
}

/* Pokeball emoji fallback */
.pokeball-fallback {
    width: 40px;
    height: 40px;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    animation: spin 4s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    left: 0;
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, var(--pokemon-yellow) 0%, transparent 70%);
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 20px;
    color: var(--pokemon-yellow);
    text-shadow: 3px 3px 0px var(--pokemon-red);
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
    max-width: 500px;
}

.cta-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.hero-pokeball {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pokeball-animation {
    width: 200px;
    height: 200px;
    background: var(--gradient-pokeball);
    border-radius: 50%;
    border: 6px solid #333;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.pokeball-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    background: #333;
    transform: translateY(-50%);
}

.pokeball-animation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: #fff;
    border: 4px solid #333;
    border-radius: 50%;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Styles */
.randomizer-section,
.team-builder-section,
.about-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: var(--pokemon-yellow);
    margin-bottom: 15px;
    text-shadow: 2px 2px 0px var(--pokemon-red);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Tab System */
.randomizer-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--pokemon-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Randomizer Controls */
.randomizer-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: var(--pokemon-yellow);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.control-input:focus {
    outline: none;
    border-color: var(--pokemon-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: var(--gradient-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-description {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 5px;
    display: block;
    line-height: 1.3;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.search-container:focus-within {
    border-color: var(--pokemon-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn, .clear-search-btn {
    background: var(--gradient-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.clear-search-btn {
    background: var(--gradient-secondary);
    margin-left: 5px;
}

.search-btn:hover, .clear-search-btn:hover {
    transform: scale(1.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.search-suggestion {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-suggestion:hover {
    background: var(--bg-secondary);
}

.search-suggestion:last-child {
    border-bottom: none;
}

.suggestion-emoji {
    font-size: 1.2rem;
}

.suggestion-text {
    flex: 1;
}

.suggestion-id {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Button Base Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
    min-height: 48px;
    font-family: 'Nunito', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: linear-gradient(45deg, var(--pokemon-blue), #2563eb);
    color: white;
    border: 2px solid var(--pokemon-blue);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2563eb, var(--pokemon-blue));
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--pokemon-yellow);
}

/* Randomizer Buttons */
.randomizer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.randomizer-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 200px;
}

.randomizer-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.randomizer-btn.secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.randomizer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.randomizer-btn.secondary:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    margin-right: 8px;
    font-size: 1rem;
}

/* Result Header */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.result-header h3 {
    color: var(--pokemon-yellow);
    margin: 0;
    font-size: 1.1rem;
    font-family: 'Press Start 2P', cursive;
    text-shadow: 1px 1px 0px var(--pokemon-red);
}

.result-actions {
    display: flex;
    gap: 10px;
}

.result-action-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.result-action-btn .btn-icon {
    margin-right: 0;
    font-size: 0.9rem;
}

/* Result Container */
.result-container {
    min-height: 400px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 30px;
    position: relative;
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-secondary);
    text-align: center;
}

.pokeball-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gradient-pokeball);
    border-radius: 50%;
    border: 4px solid var(--border-color);
    margin-bottom: 20px;
    opacity: 0.5;
    position: relative;
}

.pokeball-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
}

/* Pokemon Grid Styles */
.pokemon-grid {
    display: grid;
    gap: 20px;
}

.pokemon-grid-single {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

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

.pokemon-grid-triple {
    grid-template-columns: repeat(3, 1fr);
}

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

.pokemon-grid-standard {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.pokemon-grid-large {
    grid-template-columns: repeat(3, 1fr);
}

.pokemon-grid-xlarge {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive grid adjustments */
@media (max-width: 1200px) {
    .pokemon-grid-xlarge {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .pokemon-grid-large,
    .pokemon-grid-xlarge {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pokemon-grid-triple,
    .pokemon-grid-quad {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pokemon-grid-double,
    .pokemon-grid-triple,
    .pokemon-grid-quad,
    .pokemon-grid-large,
    .pokemon-grid-xlarge {
        grid-template-columns: 1fr;
    }
}

.pokemon-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pokemon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--pokemon-yellow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.pokemon-card:hover::before {
    opacity: 0.05;
}

.pokemon-card:hover {
    transform: translateY(-5px);
    border-color: var(--pokemon-yellow);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.pokemon-card > * {
    position: relative;
    z-index: 1;
}

.pokemon-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 3px solid var(--border-color);
}

.pokemon-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pokemon-yellow);
    margin-bottom: 10px;
    text-transform: capitalize;
}

.pokemon-id {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.pokemon-types {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.type-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Type Colors */
.type-normal { background: #a8a878; color: #000; }
.type-fire { background: #f08030; color: #fff; }
.type-water { background: #6890f0; color: #fff; }
.type-electric { background: #f8d030; color: #000; }
.type-grass { background: #78c850; color: #000; }
.type-ice { background: #98d8d8; color: #000; }
.type-fighting { background: #c03028; color: #fff; }
.type-poison { background: #a040a0; color: #fff; }
.type-ground { background: #e0c068; color: #000; }
.type-flying { background: #a890f0; color: #000; }
.type-psychic { background: #f85888; color: #fff; }
.type-bug { background: #a8b820; color: #000; }
.type-rock { background: #b8a038; color: #000; }
.type-ghost { background: #705898; color: #fff; }
.type-dragon { background: #7038f8; color: #fff; }
.type-dark { background: #705848; color: #fff; }
.type-steel { background: #b8b8d0; color: #000; }
.type-fairy { background: #ee99ac; color: #000; }

/* Team Builder Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.team-slot {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-slot.empty {
    border-style: dashed;
}

.team-slot.filled {
    border-style: solid;
    border-color: var(--pokemon-yellow);
}

.team-slot:hover {
    border-color: var(--pokemon-blue);
    transform: scale(1.02);
}

.slot-content {
    text-align: center;
    color: var(--text-secondary);
}

.plus-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--border-color);
}

.team-slot:hover .plus-icon {
    color: var(--pokemon-blue);
}

/* Team Skeleton Loading Styles */
.team-slot.skeleton-loading {
    border-style: solid;
    border-color: var(--pokemon-yellow);
    background: var(--bg-card);
    overflow: hidden;
    position: relative;
}

.team-slot.skeleton-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 203, 5, 0.2) 50%,
        transparent 100%
    );
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skeleton-pokemon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 15px;
    gap: 8px;
}

.skeleton-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(
        45deg,
        var(--border-color) 25%,
        var(--bg-secondary) 50%,
        var(--border-color) 75%
    );
    background-size: 20px 20px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-name {
    width: 80%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(
        45deg,
        var(--border-color) 25%,
        var(--bg-secondary) 50%,
        var(--border-color) 75%
    );
    background-size: 20px 20px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-types {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.skeleton-type {
    width: 20px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(
        45deg,
        var(--border-color) 25%,
        var(--bg-secondary) 50%,
        var(--border-color) 75%
    );
    background-size: 20px 20px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-type:first-child {
    animation-delay: 0.4s;
}

.skeleton-type:last-child {
    animation-delay: 0.6s;
}

@keyframes skeletonPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Skeleton shimmer effect enhancement */
.skeleton-pokemon-card > * {
    position: relative;
    overflow: hidden;
}

.skeleton-pokemon-card > *::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: skeletonElementShimmer 2s ease-in-out infinite;
}

.skeleton-image::before {
    animation-delay: 0s;
}

.skeleton-name::before {
    animation-delay: 0.3s;
}

.skeleton-type::before {
    animation-delay: 0.6s;
}

@keyframes skeletonElementShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.team-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.team-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.team-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.team-btn.danger {
    background: var(--gradient-secondary);
    color: white;
}

.team-btn:hover {
    transform: translateY(-2px);
}

.team-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btnSpin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes btnSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.about-text h3 {
    color: var(--pokemon-yellow);
    margin: 30px 0 15px 0;
    font-size: 1.3rem;
}

.about-text h3:first-of-type {
    margin-top: 20px;
}

.about-text ul,
.about-text ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-text li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 3px solid var(--pokemon-yellow);
    padding: 40px 0;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--pokemon-yellow);
}

.footer-keywords {
    margin-top: 10px;
    opacity: 0.7;
}

.footer-keywords small {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Legal Pages Styles */
.legal-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-header {
    text-align: center;
    margin-bottom: 40px;
}

.legal-header h1 {
    color: var(--pokemon-blue);
    margin-bottom: 10px;
}

.last-updated {
    color: var(--text-secondary);
    font-style: italic;
}

.legal-content {
    line-height: 1.6;
}

.section-block {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.section-block h2 {
    color: var(--pokemon-blue);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--pokemon-yellow);
    padding-bottom: 5px;
}

.section-block h3 {
    color: var(--text-primary);
    margin: 20px 0 10px 0;
}

.section-block ul {
    margin: 10px 0;
    padding-left: 20px;
}

.section-block li {
    margin-bottom: 8px;
}

.disclaimer {
    background: linear-gradient(45deg, #fff3cd, #fef7e0);
    border: 2px solid var(--pokemon-yellow);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: center;
    font-weight: 600;
}

/* Contact Page Styles */
.contact-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-header h1 {
    color: var(--pokemon-blue);
    margin-bottom: 10px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--pokemon-blue);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    color: var(--pokemon-blue);
    margin-bottom: 10px;
}

.contact-actions {
    margin-top: 20px;
}

.faq-section, .response-notice, .community-guidelines, .additional-resources {
    margin-top: 40px;
    padding: 25px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.faq-item {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.faq-item h3 {
    color: var(--pokemon-blue);
    margin-bottom: 10px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.resource-link {
    display: block;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.resource-link:hover {
    background: var(--pokemon-blue);
    color: white;
    transform: translateY(-2px);
}

.resource-link strong {
    display: block;
    margin-bottom: 5px;
    color: var(--pokemon-blue);
}

.resource-link:hover strong {
    color: white;
}

.resource-link span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.resource-link:hover span {
    color: rgba(255, 255, 255, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .nav {
        gap: 20px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .pokeball-animation {
        width: 150px;
        height: 150px;
        margin-top: 30px;
    }

    .randomizer-controls {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .randomizer-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .randomizer-btn {
        width: 100%;
        max-width: 280px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 20px;
    }
    
    .result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .result-action-btn {
        width: 100%;
        justify-content: center;
    }

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

    .team-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .pokemon-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--pokemon-yellow);
    animation: spin 1s ease-in-out infinite;
}

/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-secondary);
    padding: 40px;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--pokemon-yellow);
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

.loading-state p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pokemon-yellow);
    margin: 0;
    margin-top: 20px;
    text-align: center;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

/* Error State Styles */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-state h3 {
    color: var(--pokemon-red);
    margin-bottom: 10px;
}

.retry-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Real Pokemon Image Styles */
.pokemon-real-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.team-pokemon-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Pokemon Stats Preview */
.pokemon-stats-preview {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pokemon-stats-preview span {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Pokemon Description */
.pokemon-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 10px 0;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-style: italic;
}

/* Enhanced Pokemon Cards */
.pokemon-card {
    min-height: 400px;
    cursor: pointer;
}

.pokemon-card .pokemon-image {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 18px 18px 0 0;
}

.modal-header h2 {
    color: var(--pokemon-yellow);
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin: 0;
    text-shadow: 2px 2px 0px var(--pokemon-red);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--pokemon-red);
    background: var(--bg-card);
}

.modal-body {
    padding: 30px;
}

.pokemon-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.pokemon-detail-image {
    text-align: center;
}

.pokemon-detail-image img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.pokemon-detail-info h3 {
    color: var(--pokemon-yellow);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.pokemon-detail-info p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.pokemon-detail-info strong {
    color: var(--text-primary);
}

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

.stat-group {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.stat-group h4 {
    color: var(--pokemon-yellow);
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: capitalize;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-progress {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.abilities-list, .types-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ability-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.ability-badge.hidden {
    background: var(--gradient-primary);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .pokemon-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pokemon-stats {
        grid-template-columns: 1fr;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.hidden { display: none; }
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pokemon Meta Info */
.pokemon-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
}

/* Evolution Stage Badges */
.evolution-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evolution-basic {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
}

.evolution-evolved {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
}

.evolution-final {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.evolution-single {
    background: linear-gradient(45deg, #64748b, #475569);
    color: white;
}

/* Rarity Badges */
.rarity-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-common {
    background: linear-gradient(45deg, #94a3b8, #64748b);
    color: white;
}

.rarity-uncommon {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
}

.rarity-rare {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
}

.rarity-ultra-rare {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
}

.rarity-legendary {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
}

/* Habitat and Additional Info Badges */
.habitat-badge, .egg-group-badge, .color-badge, .shape-badge, .size-badge, .weight-badge {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: capitalize;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    margin: 2px;
}

/* Specific habitat colors */
.habitat-cave { background: #6b7280; color: white; }
.habitat-forest { background: #059669; color: white; }
.habitat-grassland { background: #84cc16; color: white; }
.habitat-mountain { background: #78716c; color: white; }
.habitat-sea { background: #0ea5e9; color: white; }
.habitat-urban { background: #64748b; color: white; }

/* Size category colors */
.size-tiny { background: #fbbf24; color: white; }
.size-small { background: #a3a3a3; color: white; }
.size-medium { background: #3b82f6; color: white; }
.size-large { background: #7c3aed; color: white; }
.size-huge { background: #dc2626; color: white; }

/* Weight category colors */
.weight-light { background: #fbbf24; color: white; }
.weight-normal { background: #10b981; color: white; }
.weight-heavy { background: #8b5cf6; color: white; }
.weight-massive { background: #dc2626; color: white; }

/* Team Analysis */
.team-analysis {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.team-analysis h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

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

.analysis-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.analysis-item h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--pokemon-yellow);
    padding-bottom: 8px;
}

.empty-analysis {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

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

.coverage-type {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
}

.weakness-type, .strength-type {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px;
    display: inline-block;
}

.weakness-type {
    background: #ef4444;
    color: white;
}

.strength-type {
    background: #10b981;
    color: white;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pokemon-blue);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
