/* Reset and Base Styles */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #10b981;
    --secondary-hover: #059669;
    --bg-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-fam: 'Inter', sans-serif;
    --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);

    --border-radius-md: 8px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-fam);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.bg-light { background-color: var(--card-bg); }
.hidden { display: none !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Typography Scale */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
}
.logo span {
    font-weight: 400;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border-bottom: 1px solid var(--border);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #e0e7ff;
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.analyze-form {
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background: white;
}

.input-group input {
    flex-grow: 1;
    border: 1px solid transparent;
    padding: 16px 20px;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
}

.input-group button {
    border-radius: 0;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Loader */
.loader-section {
    padding: 60px 0;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Report Section */
.report-section {
    padding: 60px 0;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.device-toggle {
    display: flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: var(--border-radius-md);
}

.toggle-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.report-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

/* Score Circle */
.score-circle {
    position: relative;
    width: 150px;
    margin: 0 auto 1rem;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80%;
    max-height: 250px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.score-assessment {
    font-weight: 600;
    font-size: 1.1rem;
}
.score-assessment.good { color: var(--success); }
.score-assessment.average { color: var(--warning); }
.score-assessment.poor { color: var(--danger); }

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    border-left: 4px solid var(--border);
}

.metric-card[data-status="good"] { border-left-color: var(--success); }
.metric-card[data-status="needs-improvement"] { border-left-color: var(--warning); }
.metric-card[data-status="poor"] { border-left-color: var(--danger); }

.metric-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Suggestions */
.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    background: #f8fafc;
}
.sug-title {
    font-weight: 500;
    color: var(--text-main);
}
.sug-savings {
    color: var(--danger);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Features Grid */
.features {
    padding: 80px 0;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.icon-blue { background: #e0e7ff; color: var(--primary); }
.icon-green { background: #d1fae5; color: var(--secondary); }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.feature-item h3 { font-size: 1.25rem; }
.feature-item p { color: var(--text-muted); }

/* SEO Content */
.seo-content {
    padding: 80px 0;
}
.content-block {
    max-width: 800px;
    margin: 0 auto;
}
.content-block h2 {
    margin-top: 2rem;
}
.content-block p, .content-block ul, .content-block ol {
    margin-bottom: 1.5rem;
}
.content-block ul, .content-block ol {
    padding-left: 2rem;
}
.content-block li {
    margin-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-section {
    padding: 80px 0;
}
.faq-accordion {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    background: var(--card-bg);
    overflow: hidden;
}
.faq-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.faq-btn svg {
    transition: transform 0.3s;
}
.faq-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}
.faq-content p {
    padding: 0 0 16px 0;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 60px 0 20px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: white; }
.site-footer .logo { color: white; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-heading {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.footer-col ul li {
    margin-bottom: 0.75rem;
}
.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    text-align: center;
    font-size: 0.875rem;
}

/* Contact form Page specific */
.page-header {
    background: var(--card-bg);
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.form-container {
    max-width: 600px;
    margin: 40px auto;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 40px auto;
}
.legal-content h2 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 992px) {
    .report-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .input-group {
        flex-direction: column;
    }
    .input-group input {
        border-bottom: 1px solid var(--border);
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}
