* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

/* Input Section */
.input-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.person-input {
    flex: 1;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.person-input.male {
    border-left: 5px solid #007bff;
}

.person-input.female {
    border-left: 5px solid #e83e8c;
}

.person-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.person-header i {
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 50%;
    color: white;
}

.male .person-header i {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.female .person-header i {
    background: linear-gradient(45deg, #e83e8c, #c73e6b);
}

.person-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.birth-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Heart Connector */
.heart-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.heart-connector i {
    font-size: 2rem;
    color: white;
}

/* Action Section */
.action-section {
    text-align: center;
    margin-bottom: 40px;
}

.analyze-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.analyze-btn:active {
    transform: translateY(0);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-section.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.loading-content p {
    color: #666;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    width: 0%;
    animation: progress 30s linear forwards;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-time {
    font-size: 0.9rem;
    color: #888;
}

/* Results Section */
.results-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.results-section.show {
    opacity: 1;
    transform: translateY(0);
}

.results-section.hidden {
    display: none;
}

/* Overall Score */
.overall-score {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
}

.score-circle {
    display: inline-block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-description {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.analysis-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.card-header i {
    font-size: 1.3rem;
    color: #667eea;
    padding: 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.card-content {
    color: #666;
    line-height: 1.6;
}

/* Detailed Analysis */
.detailed-analysis, .recommendations {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.detailed-analysis h3, .recommendations h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detailed-analysis h3::before {
    content: "📊";
    font-size: 1.2rem;
}

.recommendations h3::before {
    content: "💡";
    font-size: 1.2rem;
}

.analysis-content, .recommendations-content {
    color: #666;
    line-height: 1.8;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .input-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .heart-connector {
        transform: rotate(90deg);
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

/* Score Colors */
.score-excellent {
    background: linear-gradient(45deg, #28a745, #20c997) !important;
}

.score-good {
    background: linear-gradient(45deg, #17a2b8, #6f42c1) !important;
}

.score-average {
    background: linear-gradient(45deg, #ffc107, #fd7e14) !important;
}

.score-poor {
    background: linear-gradient(45deg, #dc3545, #e83e8c) !important;
} 