/* Base Styles */
:root {
    --primary-color: #FFB6C1;
    --secondary-color: #cfac9e;
    --accent-color: #cfac9e;
    --background-color: #FFF5EE;
    --text-color: #333;
    --light-text: #6d6875;
    --border-color: #e5e5e5;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 0;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-top: 0.7rem;
}

.subtitle {
    text-align: center;
    color: var(--light-text);
    font-weight: 300;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Header */
header {
    margin-bottom: 2rem;
}

/* Main Content */
.generator-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.generator-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.generator-section .name-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-names-section {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.saved-names-section h2 {
    margin-top: 0;
}

.name-display {
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -11px;
}

.generated-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--accent-color);
    animation: fadeIn 0.5s ease-in;
}

.name-placeholder {
    color: var(--light-text);
    font-style: italic;
}

.name-meaning {
    text-align: center;
    color: var(--light-text);
    font-size: 0.95rem;
    min-height: 60px;
    margin-bottom: -19px;
    padding: 0 1rem;
}

.about-southern-names h3 {
    font-family: 'Poppins', sans-serif;
    margin-top: 1rem;
}

.popular-names-list {
    padding-left: 19px;
    margin-top: 1rem;
}

.popular-names-list li:not(:last-child) {
    margin-bottom: 5px;
}

.category-selector {
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-selector label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.category-selector select {
    width: 100%;
    max-width: 300px;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.category-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    background-color: white;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary:hover {
    background-color: var(--secondary-color);
}

.btn.secondary:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Saved Names Section */
.saved-names-container {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.saved-names-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.saved-name-item {
    background-color: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.saved-name-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.saved-name-text {
    font-weight: 500;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.remove-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.empty-list-message {
    color: var(--light-text);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
}

/* Footer */
footer {
    margin-top: 2.3rem;
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
}

.footer-content {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content p {
    margin-bottom: 11px;
}

footer a {
    color: var(--accent-color);
    margin: 0 0.5rem;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--secondary-color);
}

.copyright {
    margin-top: 1rem;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .generated-name {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .name-meaning {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .generator-card, .saved-names-container {
        padding: 1.5rem;
    }
    
    .saved-names-list {
        grid-template-columns: 1fr;
    }
}