/* SEO & Social Media Analyzer - Frontend Styles */

.ssa-frontend-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ssa-frontend-header {
    text-align: center;
    margin-bottom: 30px;
}

.ssa-frontend-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.ssa-frontend-header p {
    color: #666;
    font-size: 16px;
}

.ssa-analysis-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.ssa-form-group {
    margin-bottom: 20px;
}

.ssa-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ssa-input, .ssa-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ssa-input:focus, .ssa-select:focus {
    outline: none;
    border-color: #007cba;
}

.ssa-social-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.ssa-social-input label {
    font-size: 14px;
    margin-bottom: 5px;
}

.ssa-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ssa-button:hover {
    background: #005a87;
}

.ssa-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ssa-button-secondary {
    background: #6c757d;
}

.ssa-button-secondary:hover {
    background: #545b62;
}

.ssa-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: ssa-spin 1s linear infinite;
}

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

.ssa-results {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.ssa-results-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssa-results-header h3 {
    margin: 0;
    color: #333;
}

.ssa-results-content {
    padding: 30px;
}

.ssa-overview {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
}

.ssa-score-card {
    flex-shrink: 0;
}

.ssa-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007cba, #005a87);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.ssa-score-number {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.ssa-score-label {
    font-size: 12px;
    opacity: 0.9;
}

.ssa-score-breakdown {
    flex: 1;
}

.ssa-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5e9;
}

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

.ssa-score-value {
    font-weight: 600;
    color: #007cba;
}

.ssa-analysis-sections {
    display: grid;
    gap: 20px;
}

.ssa-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
}

.ssa-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.ssa-subsection {
    margin-bottom: 20px;
}

.ssa-subsection h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.ssa-metrics {
    background: white;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e1e5e9;
}

.ssa-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ssa-metric:last-child {
    border-bottom: none;
}

.ssa-metric-label {
    font-weight: 500;
    color: #333;
}

.ssa-metric-value {
    font-weight: 600;
}

.ssa-metric-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
    color: #666;
}

.ssa-detail-label {
    font-weight: 500;
}

.ssa-detail-value {
    font-weight: 400;
}

.ssa-error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.ssa-error-message.show {
    display: block;
}

.ssa-status-good {
    color: #28a745;
}

.ssa-status-warning {
    color: #ffc107;
}

.ssa-status-error {
    color: #dc3545;
}

.ssa-recommendation-category {
    margin-bottom: 20px;
}

.ssa-recommendation-category h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

.ssa-recommendation {
    background: white;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 6px 6px 0;
}

.ssa-recommendation-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.ssa-recommendation-action {
    color: #666;
    font-size: 14px;
}

.ssa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ssa-notification-success {
    background: #28a745;
}

.ssa-notification-error {
    background: #dc3545;
}

/* Theme Variations */
.ssa-theme-dark .ssa-frontend-container {
    background: #1a1a1a;
    color: #fff;
}

.ssa-theme-dark .ssa-analysis-form,
.ssa-theme-dark .ssa-results {
    background: #2d2d2d;
    border-color: #444;
}

.ssa-theme-dark .ssa-input,
.ssa-theme-dark .ssa-select {
    background: #3d3d3d;
    border-color: #555;
    color: #fff;
}

.ssa-theme-dark .ssa-section {
    background: #2d2d2d;
}

.ssa-theme-dark .ssa-metrics {
    background: #3d3d3d;
    border-color: #555;
}

.ssa-theme-dark .ssa-frontend-header h2,
.ssa-theme-dark .ssa-section h4,
.ssa-theme-dark .ssa-subsection h5,
.ssa-theme-dark .ssa-metric-label {
    color: #fff;
}

.ssa-theme-dark .ssa-frontend-header p {
    color: #ccc;
}

.ssa-theme-dark .ssa-metric-detail,
.ssa-theme-dark .ssa-recommendation-action {
    color: #ccc;
}

.ssa-theme-minimal .ssa-analysis-form,
.ssa-theme-minimal .ssa-results {
    box-shadow: none;
    border: 1px solid #e1e5e9;
}

.ssa-theme-minimal .ssa-button {
    background: #333;
}

.ssa-theme-minimal .ssa-button:hover {
    background: #555;
}

.ssa-theme-minimal .ssa-section h4 {
    border-bottom-color: #333;
}

.ssa-theme-minimal .ssa-recommendation-category h5 {
    border-bottom-color: #333;
}

.ssa-theme-minimal .ssa-recommendation {
    border-left-color: #333;
}

.ssa-theme-minimal .ssa-score-circle {
    background: linear-gradient(135deg, #333, #555);
}

.ssa-theme-minimal .ssa-score-value {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ssa-frontend-container {
        padding: 15px;
    }
    
    .ssa-analysis-form {
        padding: 20px;
    }
    
    .ssa-overview {
        flex-direction: column;
        text-align: center;
    }
    
    .ssa-social-inputs {
        grid-template-columns: 1fr;
    }
    
    .ssa-results-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ssa-results-content {
        padding: 20px;
    }
    
    .ssa-score-circle {
        width: 100px;
        height: 100px;
    }
    
    .ssa-score-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .ssa-frontend-container {
        padding: 10px;
    }
    
    .ssa-analysis-form {
        padding: 15px;
    }
    
    .ssa-results-content {
        padding: 15px;
    }
    
    .ssa-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .ssa-score-circle {
        width: 80px;
        height: 80px;
    }
    
    .ssa-score-number {
        font-size: 24px;
    }
}
