/* Base Styles */
:root {
    --primary-color: #4a6cf7;
    --primary-hover: #3a5ce4;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-muted: #6c757d;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7ff;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.tool-header {
    background: linear-gradient(135deg, #4a6cf7, #2541b2);
    color: white;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

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

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

/* Tool Container */
.tool-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Input Section */
.input-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

button {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

button:hover {
    background-color: #f1f3f9;
}

button.primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

button.primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

#textInput {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 1rem;
}

.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-label:hover {
    background-color: #f1f3f9;
}

#fileInput {
    position: absolute;
    left: -9999px;
}

/* Results Section */
.results-section {
    display: none;
    padding: 1.5rem;
}

.score-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.score-card {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9ff;
    border-radius: var(--border-radius);
    min-width: 200px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.score-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.score-details {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    background: #f8f9ff;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: bold;
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Metrics */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

.metric h4 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.metric-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Suggestions */
.suggestions-section {
    background: #f8f9ff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.suggestions-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#suggestionsList {
    list-style: none;
    padding: 0;
}

#suggestionsList li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

#suggestionsList li:last-child {
    border-bottom: none;
}

#suggestionsList li i {
    color: var(--primary-color);
    margin-top: 0.25rem;
}

/* Keyword Analysis */
.keyword-analysis {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.keyword-analysis h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: #e9ecef;
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.keyword-tag .score {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-left: 0.25rem;
}

/* SEO Section */
.seo-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.seo-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

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

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

footer p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

footer nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

footer nav a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

footer nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .score-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .score-card {
        width: 100%;
    }
    
    .metrics-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .metrics-container {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        padding: 0.75rem;
    }
    
    .feature {
        padding: 1rem 0.5rem;
    }
}
