/* Color Palette Variables - WCAG 2.1 AA Compliant */
:root {
    --primary-blue: #1a21ff;
    --primary-purple: #450e8b;
    --secondary-gray: #4a5568;
    --accent-yellow: #fdd00e;
    --deep-purple: #411d96;
    --error-red: #900f0f;
    --dark-gray: #1a202c;
    --light-blue: #3799f1;
    --pure-black: #000000;
    --pure-white: #ffffff;
    
    /* WCAG AA Compliant text colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #ffffff;
    --text-muted: #718096;
    
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-accent: #edf2f7;
    
    /* Interactive states */
    --focus-color: #fdd00e;
    --hover-opacity: 0.9;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

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

/* Header */
header {
    background: var(--bg-primary);
    box-shadow: 0 2px 10px rgba(26, 32, 44, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.by-sk {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.by-sk a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 500;
}

.by-sk a:hover {
    text-decoration: underline;
    opacity: var(--hover-opacity);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--deep-purple) 100%);
    color: var(--text-light);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Scan Form */
.scan-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#urlInput {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

#urlInput:focus {
    outline: 3px solid var(--focus-color);
    background: var(--bg-primary);
}

#scanButton {
    padding: 1rem 2rem;
    background: var(--accent-yellow);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

#scanButton:hover {
    background: #e6c200;
    transform: translateY(-2px);
}

#scanButton:disabled {
    background: var(--text-muted);
    color: var(--bg-primary);
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.free-scan-note {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.features h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--bg-accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(26, 32, 44, 0.15);
    border-color: var(--light-blue);
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-purple);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Report Section */
.report-preview {
    padding: 4rem 0;
    background: var(--bg-accent);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-header h3 {
    font-size: 2rem;
    color: var(--text-primary);
}

.report-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--light-blue);
    color: var(--text-primary);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--light-blue);
    color: var(--text-light);
}

/* Report Content */
.report-summary {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(26, 32, 44, 0.1);
}

.score-display {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
}

.score-excellent { background: var(--light-blue); }
.score-good { background: var(--accent-yellow); color: var(--text-primary); }
.score-needs-work { background: var(--error-red); }

.issues-list {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 32, 44, 0.1);
}

.issue-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bg-accent);
}

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

.issue-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.issue-severity {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    flex-shrink: 0;
}

.severity-high { background: #fef2f2; color: var(--error-red); }
.severity-medium { background: #fffbeb; color: #b45309; }
.severity-low { background: #f0f9ff; color: var(--light-blue); }

.issue-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.issue-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.issue-recommendation {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--light-blue);
}

.issue-recommendation strong {
    color: var(--primary-purple);
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

footer a {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
    opacity: var(--hover-opacity);
}

.disclaimer {
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .report-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .features {
        padding: 2rem 0;
    }
    
    .report-preview {
        padding: 2rem 0;
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
a:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #000000;
        --bg-primary: #ffffff;
        --bg-secondary: #ffffff;
    }
    
    .hero {
        background: var(--pure-black);
    }
    
    .feature-card {
        border: 3px solid var(--text-primary);
    }
    
    .btn-secondary {
        border: 3px solid var(--text-primary);
    }
}

/* Error message styling */
.error-message {
    background: #fef2f2;
    color: var(--error-red);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 2px solid #fecaca;
    font-weight: 500;
}