:root {
    /* Color Palette - Premium SaaS Dark/Light integration */
    --primary: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981; /* Emerald */
    --secondary-hover: #059669;
    --accent: #F59E0B; /* Amber */
    
    --bg-main: #FAFAFB;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Styling */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.4);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Basics */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-main {
    min-height: calc(100vh - 80px - 300px);
    padding-bottom: 4rem;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo-icon {
    font-size: 1.75rem;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 4rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 60%);
    z-index: -1;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero h1 {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Analyzer Form */
.analyzer-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.analyzer-card:hover {
    transform: translateY(-25px);
    box-shadow: var(--shadow-glow);
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    background-color: #D97706;
    color: white;
}

/* Loading State */
.loading-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-container {
    width: 100%;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.loading-text {
    font-weight: 500;
    color: var(--text-muted);
}

/* Results Section */
.results-container {
    display: none;
    margin-top: 3rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.score-header {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--success) var(--score-deg, 0deg), var(--border-color) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    box-shadow: var(--shadow-md);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background: var(--bg-card);
    border-radius: 50%;
}

.score-value {
    position: relative;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-low { background: #FEE2E2; color: var(--danger); }
.status-medium { background: #FEF3C7; color: var(--warning); }
.status-high { background: #D1FAE5; color: var(--success); }

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(79, 70, 229, 0.3);
}

.result-card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-list li:last-child {
    border-bottom: none;
}

.check-icon { color: var(--success); font-weight: bold; }
.cross-icon { color: var(--danger); font-weight: bold; }

.recommendation-alert {
    background: #EFF6FF;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.suggestion-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
    color: var(--text-muted);
}

.cta-container {
    text-align: center;
    margin-top: 2rem;
}

/* Ad Placements */
.ad-slot {
    background-color: var(--bg-main);
    border: 1px dashed #D1D5DB;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    font-size: 0.875rem;
    font-weight: 500;
}

.ad-top-banner { width: 100%; max-width: 728px; height: 90px; }
.ad-in-result { width: 100%; max-width: 300px; height: 250px; }
.ad-bottom { width: 100%; max-width: 728px; height: 90px; }

/* Content Pages (About, Terms, etc.) */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 4rem 1.5rem;
    text-align: center;
    color: white;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
    background: none;
    -webkit-text-fill-color: initial;
}

.content-section {
    padding: 4rem 0;
}

.prose {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    color: var(--text-muted);
}

.prose h2, .prose h3 {
    color: var(--text-main);
    margin-top: 2rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.faq-question {
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    margin-top: 1rem;
    color: var(--text-muted);
    display: none;
}

/* Footer */
.site-footer {
    background-color: #111827;
    color: #F3F4F6;
    padding: 4rem 0 2rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: white;
    margin-bottom: 1rem;
}

.footer-widget h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-widget ul li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: #9CA3AF;
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.875rem;
}

.disclaimer-text {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    
    .form-group {
        flex-direction: column;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
