/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-100);
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-gradient);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 30px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Analysis Section */
.analysis-section {
    margin-bottom: 30px;
}

.analyze-form {
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 10px;
}

.url-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.url-input:focus {
    border-color: var(--primary);
}

.analyze-btn {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.analyze-btn:hover {
    background: var(--primary-dark);
}

.analyze-btn:disabled {
    background: var(--gray-500);
    cursor: not-allowed;
}

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

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: var(--gray-700);
    font-size: 1.1rem;
}

/* Error Message */
.error-message {
    background: #fee;
    border: 1px solid var(--danger);
    color: #c33;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

/* Results */
.results {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Score Card */
.score-card {
    display: flex;
    align-items: center;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.score-circle {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-gradient);
    color: white;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-grade {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.9;
}

.score-info h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.score-description {
    color: var(--gray-700);
    margin-bottom: 10px;
}

.url-display {
    color: var(--gray-500);
    font-size: 0.9rem;
    word-break: break-all;
}

/* Grade Colors */
.score-circle.grade-a { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.score-circle.grade-b { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); }
.score-circle.grade-c { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.score-circle.grade-d { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.score-circle.grade-f { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* Result Sections */
.result-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    background: var(--gray-100);
    font-size: 1.2rem;
    font-weight: 600;
}

.section-icon {
    font-size: 1.5rem;
}

.section-score {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.section-score.high { background: #dcfce7; color: #16a34a; }
.section-score.medium { background: #fef3c7; color: #d97706; }
.section-score.low { background: #fee2e2; color: #dc2626; }

.section-content {
    padding: 0;
}

/* Check Items */
.check-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.check-item:last-child {
    border-bottom: none;
}

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

.check-icon {
    font-size: 1.2rem;
}

.check-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.check-details {
    padding-left: 32px;
    color: var(--gray-700);
}

.check-details p {
    margin-bottom: 8px;
}

.check-details p:last-child {
    margin-bottom: 0;
}

.check-details strong {
    color: var(--gray-900);
}

.recommendation {
    padding: 10px 14px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.95rem;
    margin-top: 10px;
}

.recommendation.good {
    background: #dcfce7;
    color: #166534;
}

.recommendation.warning {
    background: #fef3c7;
    color: #92400e;
}

.recommendation.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Keywords List */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--gray-200);
    border-radius: 20px;
    font-size: 0.9rem;
}

.keyword-tag span {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* Status Icons */
.status-pass { color: var(--success); }
.status-warning { color: var(--warning); }
.status-fail { color: var(--danger); }

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .score-card {
        flex-direction: column;
        text-align: center;
    }

    .input-group {
        flex-direction: column;
    }

    .section-title {
        font-size: 1rem;
    }

    .check-item {
        padding: 16px;
    }

    .check-details {
        padding-left: 0;
    }
}

/* Utility Classes */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
