:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #f4f4f4;
    --text-color: #333;
    --card-background: white;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --primary-color: #2980b9;
    --secondary-color: #27ae60;
    --background-color: #2c3e50;
    --text-color: #ecf0f1;
    --card-background: #34495e;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    background-color: var(--primary-color);
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

#theme-toggle {
    cursor: pointer;
}

#theme-toggle i {
    font-size: 1.2rem;
}

.fa-sun {
    display: none;
}

.dark-mode .fa-sun {
    display: inline-block;
}

.dark-mode .fa-moon {
    display: none;
}

#menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

header {
    text-align: center;
    padding: 50px 20px;
    background-color: var(--primary-color);
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    outline: none;
}

.search-container button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-container button:hover {
    background-color: #27ae60;
}

main {
    flex: 1;
    padding: 20px;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pokemon-card {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: transform 0.3s;
}

.pokemon-card:hover {
    transform: translateY(-10px);
}

.pokemon-card img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.pokemon-name {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.pokemon-stats {
    margin-bottom: 15px;
}

.type-badge {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 15px;
    padding: 5px 10px;
    display: inline-block;
    margin: 5px;
    font-size: 0.9rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

footer {
    background-color: var(--primary-color);
    text-align: center;
    padding: 20px;
    color: white;
    margin-top: auto;
}

#favorites-page {
    padding: 40px 20px;
    background-color: var(--background-color);
}

#favorites-page h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
    }

    #menu-toggle {
        display: block;
    }

    .nav-links {
        flex-basis: 100%;
        display: none;
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container input,
    .search-container button {
        width: 100%;
    }

    header h1 {
        font-size: 2rem;
    }

    .pokemon-grid {
        grid-template-columns: 1fr;
    }
}

a {
    text-decoration: none;
    color: inherit;
}