/* Baby Name Generator Styles */

/* Main Container */
.baby-name-generator-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #fef7ff 0%, #f3e8ff 100%);
    padding: 0;
    margin: 0;
}

.baby-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #121014;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Filter Container */
.filter-container {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.filter-group select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.filter-group select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Submit Button */
#get-names {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

#get-names:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

#get-names:active {
    transform: translateY(0);
}

/* Loading Indicator */
#loading-indicator {
    text-align: center;
    padding: 3rem;
    background: var(--white);
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    border-left: 4px solid #dc2626;
}

/* Welcome Message */
.welcome-message {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-content {
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    font-size: 4rem;
    color: #7c3aed;
    margin-bottom: 1.5rem;
    display: block;
}

.welcome-message h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.welcome-message p {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

.feature-item i {
    font-size: 1.5rem;
    color: #7c3aed;
}

.feature-item span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Results Header */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.results-header p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Names Grid */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Name Card */
.name-card {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.name-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

/* Name Header */
.name-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.name-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    flex: 1;
    min-width: 150px;
}

.name-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gender-badge,
.popularity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gender-badge.boy {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.gender-badge.girl {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.gender-badge.unisex {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.popularity-badge {
    background: var(--bg-light);
    color: var(--text-light);
}

.popularity-badge.common {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.popularity-badge.rare {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.popularity-badge.unique {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

/* Name Details */
.name-details {
    margin-bottom: 1.5rem;
}

.name-origin,
.name-meaning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.name-origin i,
.name-meaning i {
    color: #7c3aed;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.name-origin span,
.name-meaning span {
    color: var(--text-light);
}

.name-origin strong,
.name-meaning strong {
    color: var(--text-color);
}

/* Name Actions */
.name-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.favorite-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.favorite-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.favorite-btn.favorited i {
    color: white;
}

.share-btn {
    background: var(--bg-light);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.share-btn:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* More Options */
.more-options {
    text-align: center;
    margin-top: 3rem;
}

.refresh-btn,
.new-search-btn {
    margin: 0 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.new-search-btn {
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.new-search-btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

.close {
    color: #9ca3af;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: var(--text-color);
}

#modal-favorites-content h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#modal-favorites-content h2 i {
    color: #ef4444;
}

#favorites-list {
    max-height: 400px;
    overflow-y: auto;
}

.favorite-item {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.favorite-item:hover {
    background: var(--border-color);
    transform: translateX(5px);
}

.favorite-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.125rem;
}

.remove-favorite {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-favorite:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* SEO Content */
.seo-content {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-top: 4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.seo-content h2 {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.seo-content h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.seo-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.seo-content ul,
.seo-content ol {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content strong {
    color: var(--text-color);
    font-weight: 600;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

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

    .tool-header h1 {
        font-size: 2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .filter-container {
        padding: 1.5rem;
    }

    .controls {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .names-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .name-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .name-title {
        font-size: 1.25rem;
    }

    .name-actions {
        flex-direction: column;
    }

    .action-btn {
        min-width: auto;
    }

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

    .refresh-btn,
    .new-search-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .seo-content {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-item {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .baby-container {
        padding: 0.75rem;
    }

    .tool-header h1 {
        font-size: 1.75rem;
    }

    .filter-container {
        padding: 1rem;
        border-radius: 15px;
    }

    .name-card {
        padding: 1rem;
        border-radius: 15px;
    }

    .name-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .gender-badge,
    .popularity-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .modal-content {
        margin: 5% auto;
        padding: 1rem;
        border-radius: 15px;
    }

    .close {
        font-size: 1.5rem;
        top: 0.75rem;
        right: 1rem;
    }
}

/* Print Styles */
@media print {
    .baby-name-generator-tool {
        background: white;
    }

    .filter-container,
    .more-options,
    .name-actions,
    .modal {
        display: none;
    }

    .name-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
        break-inside: avoid;
        margin-bottom: 1rem;
    }

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .baby-name-generator-tool {
        background: white;
    }

    .name-card {
        border: 2px solid #000;
    }

    .gender-badge,
    .popularity-badge {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .name-card,
    .action-btn,
    .refresh-btn,
    .new-search-btn,
    .feature-item {
        animation: none;
        transition: none;
    }

    .name-card:hover,
    .action-btn:hover,
    .refresh-btn:hover,
    .new-search-btn:hover,
    .feature-item:hover {
        transform: none;
    }

    .spinner {
        animation: none;
    }
}
