/* ADHD Focus Timer - Styles */
/* ADHD-friendly design: Clear hierarchy, good contrast, generous spacing */

:root {
    --primary-blue: #3b82f6;
    --primary-dark: #1e40af;
    --accent-orange: #f97316;
    --success-green: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-gray: #e5e7eb;
    --focus-ring: #93c5fd;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px; /* Larger base size for ADHD readability */
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
    color: var(--text-dark);
}

h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
}

/* Header & Navigation */
header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border-gray);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
    font-size: 1rem;
}

.nav-menu a:hover {
    color: var(--primary-blue);
}

/* Main Content Container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-blue);
    background: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Benefits Section */
.benefits {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.benefits h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.benefit-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Timer Section */
.timer-section {
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timer-section h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.timer-section > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.timer-container {
    max-width: 600px;
    margin: 0 auto;
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 3rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
}

.time {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.1em;
}

.timer-label {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-top: 1rem;
    font-weight: 500;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.timer-btn:focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.timer-btn.start {
    background: var(--success-green);
    color: white;
}

.timer-btn.start:hover:not(:disabled) {
    background: #059669;
}

.timer-btn.pause {
    background: var(--accent-orange);
    color: white;
}

.timer-btn.pause:hover:not(:disabled) {
    background: #ea580c;
}

.timer-btn.reset {
    background: var(--border-gray);
    color: var(--text-dark);
}

.timer-btn.reset:hover:not(:disabled) {
    background: #d1d5db;
}

.timer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Session Info */
.session-info {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.session-info p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.session-info span {
    font-weight: 700;
    color: var(--primary-blue);
}

/* Timer Settings */
.timer-settings {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px dashed var(--border-gray);
}

.timer-settings h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.timer-settings label {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    font-weight: 500;
}

.timer-settings input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    margin: 0 0.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    text-align: center;
}

.timer-settings input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.timer-settings input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    cursor: pointer;
    vertical-align: middle;
}

/* How To Use Section */
.how-to-use {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.how-to-use h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.steps {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    counter-reset: step-counter;
    list-style: none;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.steps li {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-blue);
    background: var(--bg-light);
    border-radius: 8px;
    counter-increment: step-counter;
    position: relative;
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: -2rem;
    top: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.steps li:last-child {
    margin-bottom: 0;
}

.steps strong {
    color: var(--primary-blue);
    font-size: 1.125rem;
}

.how-to-use > p {
    text-align: center;
    font-size: 1rem;
}

.how-to-use a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.how-to-use a:hover {
    border-bottom-color: var(--primary-blue);
}

/* Tips Section */
.tips {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.tips h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.tip-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tip {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--accent-orange);
}

.tip h3 {
    color: var(--accent-orange);
    margin-bottom: 1rem;
}

.tips > p {
    text-align: center;
    font-size: 1rem;
}

.tips a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.tips a:hover {
    border-bottom-color: var(--primary-blue);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-section .cta-button {
    background: white;
    color: var(--success-green);
}

/* Medical Disclaimer */
.disclaimer {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 2rem;
    margin-bottom: 3rem;
    border-radius: 8px;
}

.disclaimer h3 {
    color: #dc2626;
    margin-top: 0;
    margin-bottom: 1rem;
}

.disclaimer p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.disclaimer p:last-child {
    margin-bottom: 0;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

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

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

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

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

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

footer a {
    color: var(--focus-ring);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .time {
        font-size: 3.5rem;
    }

    .timer-controls {
        flex-direction: column;
    }

    .timer-btn {
        width: 100%;
    }

    .steps li::before {
        position: static;
        display: inline-block;
        margin-right: 1rem;
        margin-bottom: 0.5rem;
    }

    .benefit-grid,
    .tip-list {
        grid-template-columns: 1fr;
    }

    main {
        padding: 1rem;
    }
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .timer-controls,
    .cta-button {
        display: none;
    }

    body {
        background: white;
    }

    .timer-section,
    .benefit-card,
    .tip {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
