/* === FRONTEND THEME OVERRIDE === */
body .seo-analyzer-wrap,
.page .seo-analyzer-wrap,
.post .seo-analyzer-wrap,
article .seo-analyzer-wrap,
main .seo-analyzer-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
    padding: 20px !important;
    background: #f8fafc !important;
}

.seo-analyzer-wrap .analyzer-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 40px 20px !important;
    border-radius: 16px !important;
    color: white !important;
    text-align: center !important;
}

.seo-analyzer-wrap .analyzer-header h1 {
    color: white !important;
    font-size: 2.5em !important;
    margin: 0 0 10px 0 !important;
}

.seo-analyzer-wrap .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

/* === END FRONTEND OVERRIDE === */


/**
 * SEO Analyzer Styles
 * Modern, responsive design with collapsible sections
 */

/* === BASE STYLES === */
.seo-analyzer-wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8fafc;
}

* {
    box-sizing: border-box;
}

/* === HEADER === */
.analyzer-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.analyzer-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    color: white;
}

.analyzer-header p {
    margin: 0;
    font-size: 1.2em;
    opacity: 0.95;
    color: white;
}

/* === FORM SECTION === */
.analyzer-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.1em;
    color: #1e293b;
}

.label-icon {
    margin-right: 8px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

#analyze-url {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

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

.btn-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner animation */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* === ERROR MESSAGE === */
.error-msg {
    margin-top: 15px;
    padding: 12px 18px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
}

/* === SCORE SECTION === */
.score-section {
    margin-bottom: 30px;
}

.score-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 40px;
    align-items: center;
}

.score-circle {
    position: relative;
    flex-shrink: 0;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 10;
}

.score-progress {
    fill: none;
    stroke: #22c55e;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.score-label {
    display: block;
    font-size: 0.9em;
    color: #64748b;
    margin-top: 5px;
}

.score-summary {
    flex: 1;
}

.score-summary h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    color: #1e293b;
}

.score-summary p {
    margin: 0 0 15px 0;
    color: #475569;
    line-height: 1.6;
}

.analyzed-url {
    padding: 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.9em;
    word-break: break-all;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5em;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 5px;
}
/* === SEO SECTIONS === */
.seo-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    padding: 20px 25px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.section-header:hover {
    background: #f8fafc;
}

.section-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    display: inline-block;
    width: 20px;
}

.section-header.active .toggle-icon {
    transform: rotate(0deg);
}

.section-icon {
    font-size: 1.2em;
}

.badge {
    background: #ef4444;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: auto;
}

.section-content {
    padding: 25px;
    border-top: 1px solid #e2e8f0;
}

/* === NO ISSUES === */
.no-issues {
    padding: 40px;
    text-align: center;
    font-size: 1.2em;
    color: #22c55e;
}

/* === ISSUE CARDS === */
.issue-card {
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.issue-card.priority-high {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.issue-card.priority-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.issue-card.priority-low {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.issue-header {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    background: white;
}

.issue-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    background: white;
    color: #64748b;
}

.issue-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #1e293b;
}

.recommendation {
    color: #475569;
    line-height: 1.6;
}

/* === TECHNICAL SEO GRID === */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tech-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.tech-item h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 1.1em;
}

.status-item {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.status-item.status-good {
    color: #22c55e;
}

.status-item.status-warning {
    color: #f59e0b;
}

.status-item.status-error {
    color: #ef4444;
}
/* === ON-PAGE SEO GRID === */
.onpage-grid {
    display: grid;
    gap: 20px;
}

.onpage-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.onpage-item h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
}

.tag-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
}

.tag-content.status-good {
    border-left: 4px solid #22c55e;
}

.tag-content.status-warning {
    border-left: 4px solid #f59e0b;
}

.tag-content.status-error {
    border-left: 4px solid #ef4444;
}

.tag-text {
    margin-bottom: 10px;
    font-size: 1em;
    color: #1e293b;
    line-height: 1.5;
}

.tag-meta {
    font-size: 0.85em;
    color: #64748b;
}

.headings-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.heading-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.heading-item.status-good {
    border-left: 4px solid #22c55e;
}

.heading-item.status-error {
    border-left: 4px solid #ef4444;
}

/* === READABILITY === */
.readability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background: #f8fafc;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.metric-card.status-good {
    background: #f0fdf4;
    border: 2px solid #22c55e;
}

.metric-card.status-warning {
    background: #fffbeb;
    border: 2px solid #f59e0b;
}

.metric-card.status-error {
    background: #fef2f2;
    border: 2px solid #ef4444;
}

.metric-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.metric-label {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 8px;
}

.readability-info {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.readability-info p {
    margin: 8px 0;
    color: #475569;
}

/* === KEYWORD TABLE === */
.keyword-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.keyword-stats .stat {
    flex: 1;
    font-size: 0.95em;
    color: #475569;
}

.keyword-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.keyword-table thead {
    background: #f1f5f9;
}

.keyword-table th,
.keyword-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.keyword-table th {
    font-weight: 600;
    color: #1e293b;
}

.keyword-table td {
    color: #475569;
}

.keyword-table tbody tr:hover {
    background: #f8fafc;
}

.phrases-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.phrases-list li {
    padding: 10px;
    background: #f8fafc;
    margin-bottom: 8px;
    border-radius: 6px;
}
/* === PAGE SPEED === */
.speed-score {
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.speed-score.status-good {
    background: #f0fdf4;
}

.speed-score.status-warning {
    background: #fffbeb;
}

.speed-score.status-error {
    background: #fef2f2;
}

.speed-value {
    font-size: 3em;
    font-weight: 700;
    color: #1e293b;
}

.speed-grade {
    font-size: 1.2em;
    color: #64748b;
    margin-top: 10px;
}

.speed-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.speed-metrics .metric {
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
}

.issues-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.issues-list li {
    padding: 12px;
    background: #f8fafc;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

/* === LINKING ANALYSIS === */
.linking-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-box {
    text-align: center;
    padding: 25px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-box .stat-label {
    font-size: 0.9em;
    color: #64748b;
    margin-top: 8px;
}

/* === KEYWORD STRATEGY === */
.strategy-section {
    margin-bottom: 25px;
}

.strategy-section h4 {
    margin: 0 0 12px 0;
    color: #1e293b;
}

.primary-keyword {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.strategy-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.strategy-section li {
    padding: 10px 15px;
    background: #f8fafc;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid #94a3b8;
}

/* === ACTION PLAN === */
.action-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-item {
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.action-item.priority-high {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.action-item.priority-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.action-item.priority-low {
    border-left-color: #22c55e;
    background: #f0fdf4;
}

.action-week {
    font-weight: 700;
    font-size: 1.1em;
    color: #667eea;
    min-width: 80px;
}

.action-content {
    flex: 1;
}

.action-priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    background: white;
    margin-bottom: 10px;
}

.action-content h4 {
    margin: 0 0 10px 0;
    color: #1e293b;
}

.action-impact {
    margin: 10px 0 0 0;
    color: #475569;
    font-size: 0.95em;
}
/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .seo-analyzer-wrap {
        padding: 10px;
    }
    
    .analyzer-header {
        padding: 30px 15px;
    }
    
    .analyzer-header h1 {
        font-size: 1.8em;
    }
    
    .analyzer-header p {
        font-size: 1em;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .score-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .tech-grid,
    .speed-metrics,
    .linking-stats {
        grid-template-columns: 1fr;
    }
    
    .readability-grid {
        grid-template-columns: 1fr;
    }
    
    .keyword-table {
        font-size: 0.9em;
    }
    
    .keyword-table th,
    .keyword-table td {
        padding: 8px;
    }
    
    .action-item {
        flex-direction: column;
    }
    
    .action-week {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .score-number {
        font-size: 2.5em;
    }
    
    .section-header h2 {
        font-size: 1.1em;
    }
    
    .keyword-stats {
        flex-direction: column;
        gap: 10px;
    }
}

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

#results-container {
    animation: fadeIn 0.5s ease;
}

.seo-section {
    animation: fadeIn 0.3s ease;
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* === PRINT STYLES === */
@media print {
    .analyzer-form {
        display: none;
    }
    
    .section-header {
        cursor: default;
    }
    
    .section-content {
        display: block !important;
    }
    
    .toggle-icon {
        display: none;
    }
}