/* Senior Defender - Senior-Friendly Styles */

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

:root {
    --primary-color: #2563eb;
    --danger-color: #dc2626;
    --safe-color: #16a34a;
    --caution-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f0f7ff;
    --bg-white: #ffffff;
    --bg-page: #f0f7ff;
    --border-color: #e5e7eb;
    --font-size-base: 18px;
    --font-size-large: 24px;
    --font-size-xl: 32px;
    --spacing: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f0f7ff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Navigation */
.navbar {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.nav-toggle {
    display: inline-flex;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto;
    align-items: center;
    gap: 0.5rem;
}

.nav-toggle-bar {
    display: none;
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    margin: 4px 0;
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.nav-toggle-text {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1;
}

.nav-toggle-text::after {
    content: "...";
}

/* Buttons */
.btn-primary, .btn-scan {
    background-color: var(--primary-color);
    color: white !important;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover, .btn-scan:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
}

.btn-scan {
    padding: 1.2rem 3rem;
    font-size: var(--font-size-large);
    background: white;
    color: var(--primary-color) !important;
    font-weight: 700;
    white-space: nowrap;
}

.btn-scan:hover {
    background: #f0f7ff;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Home Hero */
.home-hero {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--bg-page);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 3rem;
    color: var(--text-dark);
    line-height: 1.2;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scan-box {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    animation: slideUp 0.6s ease-out;
    color: white;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scan-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.scan-input {
    flex: 1;
    padding: 1.2rem;
    font-size: var(--font-size-large);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.scan-input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.scan-input::placeholder {
    color: var(--text-light);
}

.scan-info {
    color: rgba(255, 255, 255, 0.95);
    font-size: var(--font-size-base);
    margin-top: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.scan-info .small {
    font-size: 16px;
    margin-top: 0.5rem;
}

/* Scan Result */
.scan-result {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 12px;
    font-size: var(--font-size-base);
}

.scan-result.dangerous {
    background-color: #fee2e2;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.scan-result.safe {
    background-color: #dcfce7;
    border: 2px solid var(--safe-color);
    color: #166534;
}

.scan-result.caution {
    background-color: #fef3c7;
    border: 2px solid var(--caution-color);
    color: #92400e;
}

.scan-result h3 {
    font-size: var(--font-size-large);
    margin-bottom: 1rem;
}

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

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

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: var(--font-size-large);
    margin-bottom: 0.5rem;
}

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

.footer-links {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.trust-icons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Dashboard */
.dashboard-header {
    padding: 2rem 0;
    background: #e0f2fe;
}

.welcome-message {
    font-size: var(--font-size-xl);
    margin-bottom: 0.5rem;
}

.scan-quota {
    font-size: var(--font-size-base);
    color: var(--text-light);
}

.dashboard-content {
    padding: 2rem 0;
    background-color: var(--bg-page);
    min-height: calc(100vh - 200px);
}

.scan-history {
    margin-top: 3rem;
}

.scan-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
}

.scan-history th,
.scan-history td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.scan-history th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: var(--font-size-base);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-size: var(--font-size-base);
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Additional Styles */

.auth-page {
    padding: 4rem 0;
    min-height: 60vh;
    background-color: var(--bg-page);
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-form {
    margin-top: 2rem;
}

.btn-full {
    width: 100%;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-note {
    text-align: center;
    color: var(--text-light);
    margin-top: 1rem;
    font-size: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-base);
}

.alert-error {
    background-color: #fee2e2;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 2px solid var(--safe-color);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 2px solid var(--primary-color);
}

.page-content {
    padding: 3rem 0;
    background-color: var(--bg-page);
    min-height: calc(100vh - 200px);
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
}

.content-section {
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-section h2 {
    font-size: var(--font-size-large);
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.simple-list {
    list-style: none;
    padding-left: 0;
}

.simple-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: var(--font-size-base);
}

.simple-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--safe-color);
    font-weight: bold;
}

.provider-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.provider-list li {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* About Page Cards */
main.page-content .about-card {
    background: #ffffff !important;
    padding: 2.5rem !important;
    border-radius: 16px !important;
    margin-bottom: 2rem !important;
    margin-top: 1rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #e5e7eb;
}

main.page-content .about-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

main.page-content .about-card h2 {
    font-size: 2rem !important;
    margin-bottom: 1.5rem !important;
    color: var(--primary-color) !important;
    border-bottom: 3px solid var(--primary-color) !important;
    padding-bottom: 0.75rem !important;
    font-weight: 700 !important;
}

main.page-content .about-card p {
    font-size: var(--font-size-base) !important;
    line-height: 1.8 !important;
    color: var(--text-dark) !important;
    margin-bottom: 1rem !important;
}

main.page-content .about-card .provider-intro {
    margin-bottom: 2rem !important;
    text-align: center !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-light) !important;
    font-weight: 500 !important;
}

/* Provider Grid */
main.page-content .provider-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
}

main.page-content .provider-box {
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 2rem 1.5rem !important;
    text-align: center !important;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

main.page-content .provider-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--safe-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

main.page-content .provider-box:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2) !important;
    border-color: var(--primary-color) !important;
}

main.page-content .provider-box:hover::before {
    transform: scaleX(1);
}

main.page-content .provider-icon {
    font-size: 3.5rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
    transition: transform 0.3s ease;
    line-height: 1;
}

main.page-content .provider-box:hover .provider-icon {
    transform: scale(1.15) rotate(5deg);
}

main.page-content .provider-name {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 0.75rem !important;
}

main.page-content .provider-desc {
    font-size: 15px !important;
    color: var(--text-light) !important;
    line-height: 1.6 !important;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.pricing-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.badge {
    position: absolute;
    top: -12px;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.pricing-card h2 {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price span {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: normal;
}

.plan-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: var(--font-size-base);
}

.plan-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.plan-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--safe-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.faq-section {
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.faq-item h3 {
    font-size: var(--font-size-large);
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.contact-info {
    text-align: center;
    color: var(--text-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: box-shadow 0.2s;
}

.blog-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-card h2 {
    font-size: var(--font-size-large);
    margin-bottom: 0.5rem;
}

.blog-card h2 a {
    color: var(--text-dark);
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: var(--primary-color);
}

.blog-date {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post-date {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: var(--font-size-base);
}

.blog-post-content {
    font-size: var(--font-size-base);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-cta {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 3rem;
}

/* Terms Page Styles */
.terms-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.terms-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.terms-section:last-child {
    border-bottom: none;
}

.terms-section h2 {
    font-size: var(--font-size-large);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.terms-section h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.terms-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: var(--font-size-base);
}

.terms-section ul,
.terms-section ol {
    margin: 1rem 0;
    padding-left: 2rem;
    line-height: 1.8;
}

.terms-section li {
    margin-bottom: 0.5rem;
    font-size: var(--font-size-base);
}

.terms-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-section a:hover {
    text-decoration: underline;
}

.last-updated {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 2rem;
    font-style: italic;
}

.terms-acknowledgment {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.terms-acknowledgment p {
    margin-bottom: 0.5rem;
    font-size: var(--font-size-base);
}

.result-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.result-badge.result-safe {
    background: #dcfce7;
    color: #166534;
}

.result-badge.result-caution {
    background: #fef3c7;
    color: #92400e;
}

.result-badge.result-dangerous {
    background: #fee2e2;
    color: #dc2626;
}

.providers-summary {
    margin-top: 1rem;
    font-size: 14px;
    color: var(--text-light);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Extension CTA Button Hover */
.btn-extension:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Premium Upgrade Button Hover */
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Additional animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.feature-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-toggle {
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        background: var(--bg-light);
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        background: var(--bg-white);
        padding: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        text-align: center;
        padding: 0.75rem 0;
    }
    
    .scan-form {
        flex-direction: column;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

@media (min-width: 901px) {
    .nav-toggle {
        display: none;
    }
}
