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

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --text-color: #333;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Navigation */
.navbar {
    background-color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 5px 0;
    transition: var(--transition);
    transform-origin: center;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Items Animation */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-links.active a {
    animation: slideInFromLeft 0.3s ease forwards;
}

.nav-links.active a:nth-child(1) { animation-delay: 0.1s; }
.nav-links.active a:nth-child(2) { animation-delay: 0.2s; }
.nav-links.active a:nth-child(3) { animation-delay: 0.3s; }
.nav-links.active a:nth-child(4) { animation-delay: 0.4s; }
.nav-links.active a:nth-child(5) { animation-delay: 0.5s; }
.nav-links.active a:nth-child(6) { animation-delay: 0.6s; }
.nav-links.active a:nth-child(7) { animation-delay: 0.7s; }
.nav-links.active a:nth-child(8) { animation-delay: 0.8s; }
.nav-links.active a:nth-child(9) { animation-delay: 0.9s; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    margin-top: 60px;
}

.hero-content {
    color: white;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-container input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-container button {
    padding: 1rem 2rem;
    background-color: var(--dark-color);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-container button:hover {
    background-color: #1a1a1a;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 5%;
    background-color: var(--light-color);
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h2 {
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: var(--transition);
}

.btn:hover {
    background-color: #ff5252;
}

/* Name Categories */
.name-categories {
    padding: 4rem 5%;
    text-align: center;
}

.name-categories h2 {
    margin-bottom: 2rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-item {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.category-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Popular Names Preview Section */
.popular-names-preview {
    padding: 4rem 5%;
    text-align: center;
    background-color: var(--light-color);
}

.popular-names-preview h2 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.popular-names-preview p {
    margin-bottom: 2rem;
    color: #666;
}

.names-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 0.8rem 1.5rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.tab-button:hover {
    background-color: #f5f5f5;
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.popular-names-preview .names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.popular-names-preview .name-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    position: relative;
    text-align: left;
}

.popular-names-preview .name-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.popular-names-preview .name-card .rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.popular-names-preview .name-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.popular-names-preview .name-card .origin {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.popular-names-preview .name-card .meaning {
    margin-bottom: 1rem;
    line-height: 1.4;
}

.popular-names-preview .name-card .trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.popular-names-preview .name-card .trend.up {
    color: #4CAF50;
}

.popular-names-preview .name-card .trend.down {
    color: #f44336;
}

.view-more {
    margin-top: 2rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-links a {
        margin: 1rem 0;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--dark-color);
        text-decoration: none;
        padding: 0.8rem 1.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        width: 100%;
        text-align: center;
        border: 2px solid transparent;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary-color);
        background-color: rgba(255, 107, 107, 0.1);
        border-color: var(--primary-color);
        transform: translateY(-2px);
    }

    .hamburger {
        display: block;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

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

    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
    }

    .search-container input {
        border-radius: 5px;
        margin-bottom: 0.5rem;
    }

    .search-container button {
        border-radius: 5px;
    }
}

/* Name Generator Styles */
.generator-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.generator-section h1 {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
}

.generator-section > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.generator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.gender-selector {
    display: flex;
    gap: 0.5rem;
}

.gender-selector button {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-selector button.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.origin-filter select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
}

.generate-btn {
    background: #4f46e5;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.generate-btn:hover {
    background: #4338ca;
}

.generated-names {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.name-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.name-card:hover {
    transform: translateY(-5px);
}

.name-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.name-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.favorite-btn:hover {
    color: #e53e3e;
}

.favorite-btn .fas {
    color: #e53e3e;
}

.origin {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.meaning {
    color: #333;
    margin-bottom: 1rem;
}

.popularity {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.rank {
    color: #4f46e5;
    font-weight: bold;
}

.trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.trend.up {
    color: #10b981;
}

.trend.down {
    color: #ef4444;
}

.generator-info {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 2rem;
}

.generator-info h2 {
    color: #333;
    margin-bottom: 1rem;
}

.generator-info ol {
    color: #666;
    padding-left: 1.5rem;
}

.generator-info li {
    margin-bottom: 0.5rem;
}

.error-message {
    text-align: center;
    color: #ef4444;
    padding: 2rem;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .generator-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .gender-selector {
        justify-content: center;
    }

    .origin-filter select {
        width: 100%;
    }

    .generate-btn {
        width: 100%;
    }
} 