/* SEO Readability Analyzer - Main Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.language-switcher {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-switcher label {
    color: white;
    font-size: 0.9rem;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.language-switcher select:focus {
    outline: none;
    border-color: white;
}

/* Fix dropdown options color */
.language-switcher select option {
    color: #333;
    background: white;
}

/* For Firefox */
.language-switcher select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 white;
}

.content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .language-switcher {
        position: static;
        justify-content: center;
        margin-top: 1rem;
    }
}

.input-section, .results-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

.input-section h2, .results-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4b5563;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 200px;
    resize: vertical;
    font-family: monospace;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.analyze-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.reset-btn {
    background: #e5e7eb;
    color: #4b5563;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

button:active {
    transform: translateY(0);
}

/* Results styling */
.score-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.score-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.score-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.suggestions-list {
    margin-top: 2rem;
}

.suggestion-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #e5e7eb;
}

.suggestion-item.high {
    border-left-color: #ef4444;
}

.suggestion-item.medium {
    border-left-color: #f59e0b;
}

.suggestion-item.low {
    border-left-color: #10b981;
}

.suggestion-priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #d1fae5;
    color: #059669;
}

.suggestion-message {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.suggestion-action {
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
}

.detailed-results {
    margin-top: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.result-label {
    color: #4b5563;
}

.result-value {
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

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

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

.hidden {
    display: none;
}

/* Language-specific adjustments */
body[data-lang="zh"] .header h1 {
    font-size: 2.2rem;
}

body[data-lang="zh"] textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .input-section, .results-section {
        padding: 1.5rem;
    }
    
    .score-display {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .header {
        background: white !important;
        color: black;
        border-bottom: 2px solid #667eea;
    }
    
    .language-switcher,
    .button-group,
    .footer {
        display: none;
    }
    
    .score-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}