/* SEO Analyzer - Clean Responsive Design */
.sap-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.sap-container * {
    box-sizing: border-box;
}

/* Search Box - Clean Rectangle */
.sap-search-box {
    display: flex;
    gap: 12px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sap-url-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    background: #fafafa;
    transition: all 0.2s;
}

.sap-url-input:focus {
    border-color: #2271b1;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.sap-analyze-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.sap-analyze-btn:hover {
    background: #135e96;
}

.sap-analyze-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Loading State */
#sap-loading {
    text-align: center;
    padding: 30px 20px;
}

.sap-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: sap-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes sap-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#sap-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Results Container - Clean Rectangle */
.sap-results-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    margin-top: 24px;
}

/* Score Section - Clean Design */
.sap-score-section {
    background: #f8f9fa;
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}

.sap-score-wrapper {
    display: inline-block;
    position: relative;
    width: 140px;
    height: 140px;
}

.sap-score-canvas {
    width: 140px;
    height: 140px;
}

.sap-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 38px;
    font-weight: bold;
    color: #1a1a1a;
}

.sap-score-label {
    margin-top: 12px;
    font-size: 14px;
    color: #555;
}

.sap-score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.sap-badge-excellent {
    background: #4caf50;
    color: white;
}

.sap-badge-good {
    background: #2196f3;
    color: white;
}

.sap-badge-poor {
    background: #ff9800;
    color: white;
}

.sap-badge-bad {
    background: #f44336;
    color: white;
}

/* Stats Grid - Clean Rectangles */
.sap-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.sap-stat-card {
    background: #ffffff;
    padding: 18px 12px;
    text-align: center;
}

.sap-stat-card h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.sap-stat-value {
    font-size: 22px;
    font-weight: bold;
    color: #2271b1;
    line-height: 1.2;
}

.sap-stat-unit {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

/* Content Sections */
.sap-section {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.sap-section:last-child {
    border-bottom: none;
}

.sap-section h3 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Keywords Cloud */
.sap-keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sap-keyword {
    background: #f0f4f8;
    color: #2271b1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.sap-keyword-count {
    background: #2271b1;
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    margin-left: 8px;
}

/* Headings Display */
.sap-headings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sap-heading-item {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #2271b1;
}

.sap-heading-h1 {
    font-weight: bold;
    color: #1a1a1a;
}

/* Issues List */
.sap-issues-list, .sap-suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sap-issues-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #ffebee;
    color: #c62828;
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #c62828;
}

.sap-suggestions-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid #2e7d32;
}

/* Error Message */
#sap-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    border-left: 3px solid #c62828;
}

#sap-error p {
    margin: 0;
}

/* ======================================== */
/* RESPONSIVE DESIGN - NO OVERLAPPING       */
/* ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .sap-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sap-section {
        padding: 16px 20px;
    }
    
    .sap-url-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .sap-analyze-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 550px) {
    .sap-search-box {
        flex-direction: column;
        gap: 10px;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }
    
    .sap-url-input {
        width: 100%;
        border-radius: 8px;
        border: 1px solid #ddd;
        background: white;
    }
    
    .sap-analyze-btn {
        width: 100%;
        border-radius: 8px;
    }
    
    .sap-stats-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    .sap-stat-card {
        padding: 14px 12px;
    }
    
    .sap-stat-value {
        font-size: 20px;
    }
    
    .sap-section {
        padding: 14px 16px;
    }
    
    .sap-keywords-cloud {
        gap: 8px;
    }
    
    .sap-keyword {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .sap-score-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .sap-score-value {
        font-size: 32px;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .sap-stat-value {
        font-size: 18px;
    }
    
    .sap-section h3 {
        font-size: 14px;
    }
    
    .sap-issues-list li, .sap-suggestions-list li {
        font-size: 12px;
        padding: 8px 12px;
    }
}