/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4c1d95;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #8b5cf6;
}

/* Hero section */
.hero {
    padding: 100px 0 60px;
    background-color: #f6f0ff;
    text-align: center;
    background-image: linear-gradient(to bottom, #f6f0ff, #ffffff);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.2;
}

.underline {
    width: 340px;
    height: 10px;
    background-color: #8b5cf6;
    margin: 10px auto 25px;
    border-radius: 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: #4b5563;
}

.language-info {
    background-color: #f1eaff;
    border-left: 4px solid #8b5cf6;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto 25px;
    text-align: left;
}

.language-info p {
    margin: 5px 0;
    color: #4b5563;
}

.language-info p:first-child {
    font-weight: 500;
}

.search-box {
    display: flex;
    max-width: 800px;
    margin: 0 auto 30px;
    background-color: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

input#keywords {
    flex: 1;
    padding: 20px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
}

#generate-btn {
    background-color: #8b5cf6;
    color: white;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0 50px 50px 0;
    transition: background-color 0.3s;
}

#generate-btn:hover {
    background-color: #7c3aed;
}

.results-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: left;
}

.results-container h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.results-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.action-btn {
    background-color: #f1eaff;
    color: #6b46c1;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #ddd6fe;
}

.results-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.click-tip {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 5px;
}

.names-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* Name item styling */
.name-item {
    position: relative;
    background-color: #ffffff;
    padding: 20px 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
}

.name-item:hover {
    background-color: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.name-item h4 {
    font-size: 1.2rem;
    color: #1e293b;
    margin: 0;
    font-weight: 600;
}

.name-item p {
    color: #718096;
    font-size: 0.9rem;
}

.more-btn {
    background-color: transparent;
    color: #8b5cf6;
    font-weight: 600;
    padding: 10px 15px;
    border: 2px solid #8b5cf6;
    border-radius: 25px;
    display: block;
    margin: 0 auto;
}

.more-btn:hover {
    background-color: #8b5cf6;
    color: white;
}

.popular-searches {
    margin-top: 40px;
}

.popular-searches p {
    margin-bottom: 15px;
    color: #4b5563;
}

.search-terms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.term-btn {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 10px 20px;
    color: #4b5563;
    transition: all 0.2s;
}

.term-btn:hover {
    background-color: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

/* How it works section */
.how-it-works {
    padding: 80px 0;
    background-color: #fff;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 30px;
    background-color: #f8fafc;
    border-radius: 10px;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #8b5cf6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* About generator section */
.about-generator {
    padding: 80px 0;
    background-color: #f8fafc;
}

.about-generator h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

.about-generator h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

.about-generator p {
    margin-bottom: 15px;
    color: #4b5563;
}

/* FAQ section */
.faq {
    padding: 80px 0;
    background-color: #f8fafc;
}

.faq h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.faq-item {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1e293b;
}

.faq-item p {
    color: #4b5563;
}

/* Footer */
footer {
    background-color: #1a202c;
    color: white;
    padding: 60px 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-logo p {
    color: #a0aec0;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #a0aec0;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: #8b5cf6;
}

/* Copy to clipboard functionality */
.copied-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 29, 149, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
}

/* 改进的加载状态 */
.loading, .loading-more {
    text-align: center;
    padding: 30px 20px;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-more {
    grid-column: 1 / -1; /* 跨越所有列 */
    margin: 15px 0;
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading p, .loading-more p {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.loading .estimate-time, .loading-more .estimate-time {
    color: #8b5cf6;
    font-weight: 600;
    font-size: 1rem;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: rgba(139, 92, 246, 0.1);
    display: inline-block;
    margin-top: 5px;
}

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

/* Temporary result styling */
.temporary-result {
    opacity: 0.8;
    position: relative;
}

.temporary-result::after {
    content: "预览";
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6rem;
    background-color: rgba(139, 92, 246, 0.3);
    color: #4c1d95;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Loading item styling */
.loading-item {
    background-color: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
}

.loading-dot-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.loading-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #8b5cf6;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.loading-dot:nth-child(3) {
    animation-delay: 1s;
}

@keyframes dotPulse {
    0%, 100% { 
        transform: scale(0.7);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Utilities */
.hidden {
    display: none;
}

/* Media Queries */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .names-list {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .underline {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 15px;
    }
    
    input#keywords {
        width: 100%;
        border-radius: 15px 15px 0 0;
    }
    
    #generate-btn {
        width: 100%;
        border-radius: 0 0 15px 15px;
    }
    
    .term-btn {
        width: 100%;
    }
}

/* Get name button styling */
.get-name-btn {
    background-color: #f1eaff;
    color: #8b5cf6;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.get-name-btn:hover {
    background-color: #e4d5ff;
}

.get-name-btn svg {
    stroke: #8b5cf6;
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-container {
    background-color: white;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-container h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e293b;
}

.name-display {
    background-color: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #1e293b;
}

.copy-btn {
    width: 100%;
    background-color: #f1eaff;
    color: #8b5cf6;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0;
    transition: all 0.2s;
}

.copy-btn:hover {
    background-color: #e4d5ff;
}

.copy-btn svg {
    stroke: #8b5cf6;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
}

.close-modal-btn:hover {
    color: #1e293b;
}

/* Language selector dropdown */
.language-selector {
    position: relative;
    cursor: pointer;
}

.language-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-weight: 500;
    color: #4b5563;
    transition: background-color 0.2s;
}

.language-selector-btn::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='2' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.85;
}

.language-selector-btn::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 5px;
    border-style: solid;
    border-width: 0 2px 2px 0;
    border-color: #8b5cf6;
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.2s;
}

.language-selector:hover .language-selector-btn::after {
    transform: rotate(-135deg) translateY(0);
}

.language-selector-btn:hover {
    background-color: #f1f5f9;
}

.language-selector-btn .flag {
    font-size: 1.1rem;
    margin-right: 2px;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    min-width: 180px;
    z-index: 100;
    padding: 5px 0;
    display: none;
}

.language-selector:hover .language-dropdown {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    transition: background-color 0.2s;
}

.language-option:hover {
    background-color: #f1eaff;
}

.language-option .flag {
    font-size: 16px;
    margin-right: 8px;
}

.language-option .language-name {
    font-weight: 500;
}

.language-option .native-name {
    margin-left: 5px;
    font-size: 0.85em;
    color: #666;
} 