/* ============================================
GEO Analyzer - FINAL VERSION
Version 2.2 - Professional Desktop Layout + Mobile Optimized
============================================ */

.geo-container {
    max-width: 1000px;
    margin: 20px auto;
    font-family: Georgia, serif;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.geo-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 4px solid #FF4500;
}

.geo-header h3 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.geo-header p {
    color: #666;
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
}

.geo-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.geo-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: Georgia, serif;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.geo-btn.primary {
    background: #FF4500;
    color: white;
}

.geo-btn.primary:hover {
    background: #E53E00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.3);
}

.geo-btn.secondary {
    background: #FAFAFA;
    color: #333;
    border: 2px solid #E1E1E1;
}

.geo-btn.secondary:hover {
    background: #F5F5F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.geo-url-input, .geo-text-input {
    margin-bottom: 25px;
}

#url-input, #content-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #E1E1E1;
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

#url-input:focus, #content-input:focus {
    outline: none;
    border-color: #FF4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.note {
    color: #999;
    font-size: 14px;
    margin: 10px 0 0;
    text-align: center;
    font-style: italic;
}

/* ============================================
Results Container
============================================ */

.geo-results-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-top: 20px;
}

/* ============================================
5-Pillar Score Overview - PROFESSIONAL LAYOUT
============================================ */

/* DESKTOP: Column layout (Overall → Pillars → Stats) */
.geo-overview {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #E1E1E1;
}

/* Overall Score Card - Centered at TOP */
.geo-score-card {
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #FF4500, #E53E00);
    padding: 30px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.3);
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 48px;
    font-weight: bold;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
}

#score-description {
    font-weight: 600;
    font-size: 20px;
    margin: 15px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 5-Pillar Score Cards - Horizontal Row BELOW Overall Score */
.pillar-scores {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 0;
}

.pillar-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: #FAFAFA;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pillar-score {
    font-size: 36px;
    font-weight: bold;
    color: #FF4500;
    margin-bottom: 10px;
    display: block;
}

.pillar-name {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Quick Stats - Centered Row at BOTTOM */
.geo-quick-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #FAFAFA;
    border-radius: 10px;
    margin-top: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Score Color Coding */
.score-excellent { color: #27ae60; }
.score-very-good { color: #2ecc71; }
.score-good { color: #3498db; }
.score-fair { color: #f39c12; }
.score-poor { color: #e74c3c; }

/* ============================================
Analysis Sections
============================================ */

.analysis-section {
    margin-bottom: 35px;
}

.analysis-section h4 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 4px solid #FF4500;
    font-weight: 700;
    font-family: Georgia, serif;
}

.findings-list, .suggestions-list {
    display: grid;
    gap: 15px;
}

.finding-item, .suggestion-item {
    padding: 20px;
    border-radius: 8px;
    background: #FAFAFA;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
}

.finding-item:hover, .suggestion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.finding-warning {
    border-left-color: #f39c12;
    background: #fff9f0;
}

.finding-critical {
    border-left-color: #e74c3c;
    background: #fef6f6;
}

.finding-good {
    border-left-color: #27ae60;
    background: #f6fef9;
}

.finding-info {
    border-left-color: #9b59b6;
    background: #f9f6fe;
}

.suggestion-item {
    border-left-color: #f39c12;
    background: #fff9f0;
}

/* ============================================
PDF Download Button
============================================ */

.pdf-download-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #E1E1E1;
}

#download-pdf-btn {
    background: #2c3e50;
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: Georgia, serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

#download-pdf-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.pdf-note {
    color: #999;
    font-size: 14px;
    margin-top: 10px;
    font-style: italic;
}

/* ============================================
Loading Indicator - FIXED SPINNER
============================================ */

.geo-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #FF4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
    display: block;
    box-sizing: border-box;
    transform-origin: center;
}

#loading-status {
    color: #666;
    font-style: italic;
    font-size: 16px;
    font-family: Georgia, serif;
}

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

/* ============================================
Responsive Design - MOBILE OPTIMIZED
============================================ */

@media (max-width: 768px) {
    .geo-container {
        padding: 20px;
        margin: 10px;
    }
    
    .geo-header h3 {
        font-size: 26px;
    }
    
    /* Keep column layout on mobile */
    .geo-overview {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Full width score card on mobile */
    .geo-score-card {
        max-width: 100%;
        margin: 0;
    }
    
    /* Responsive pillar grid on mobile */
    .pillar-scores {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    /* Stack stats vertically on mobile */
    .geo-quick-stats {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .geo-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .geo-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .geo-results-container {
        padding: 25px;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    #score-description {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .geo-header h3 {
        font-size: 22px;
    }
    
    .geo-header p {
        font-size: 15px;
    }
    
    .pillar-card {
        padding: 15px;
    }
    
    .pillar-score {
        font-size: 28px;
    }
    
    .pillar-name {
        font-size: 11px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .analysis-section h4 {
        font-size: 19px;
    }
    
    .finding-item, .suggestion-item {
        padding: 15px;
        font-size: 14px;
    }
}