/* Name Evaluator Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Main Layout */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.page-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* Evaluator Card */
.evaluator-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.input-section {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.evaluate-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.evaluate-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.evaluate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: none;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.score-card {
    background: #fff;
    color: #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
}

.score-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #666;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.score-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.analysis-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.analysis-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: inline-block;
}

.analysis-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: inline-block;
    margin-left: 8px;
}

.analysis-text {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Recommended Names Styles */
.recommended-name-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #007bff;
}

.recommended-name-item:last-child {
    margin-bottom: 0;
}

.rec-name-chinese {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.rec-name-pinyin {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 6px;
}

.rec-name-meaning {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

/* Feedback Section - REMOVED, now using single cards */

/* Suggestions Card */
.suggestions-card {
    background: #fff9e6;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #fbbf24;
    margin-bottom: 15px;
}

.suggestions-title {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 10px;
}

#suggestionsText {
    color: #78350f;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Intro Section */
.intro-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.intro-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e9ecef;
}

.intro-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

.intro-card-text {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.85rem;
}

.intro-card-text strong {
    color: #334155;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-article-item {
    display: block;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-article-item:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateX(5px);
}

.article-title {
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
    font-size: 0.9rem;
}

.no-articles {
    text-align: center;
    color: #94a3b8;
    padding: 15px;
    font-style: italic;
    font-size: 0.9rem;
}

/* Loading Animation */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 15px;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots .dot {
    width: 10px;
    height: 10px;
    background: #007bff;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-description {
        font-size: 1rem;
    }

    .evaluator-card {
        padding: 20px;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .feedback-section {
        grid-template-columns: 1fr;
    }

    .intro-section {
        grid-template-columns: 1fr;
    }

    .score-display {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .main-layout {
        padding: 15px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 20px;
    }

    .score-card {
        padding: 25px;
    }

    .score-display {
        font-size: 2.5rem;
    }
}
