/* Baby Vision Simulator - Styles */

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

:root {
    --primary-color: #6b9bd1;
    --secondary-color: #f4a261;
    --text-dark: #2c3e50;
    --text-light: #5a6c7d;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --border-color: #e8ecef;
    --success-color: #4CAF50;
    --error-color: #e74c3c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* Landing Page */
.landing-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-light);
}

.content {
    flex: 1;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.intro {
    margin-bottom: 40px;
}

.lead {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.how-it-works {
    margin-bottom: 40px;
}

.how-it-works h2 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.steps {
    list-style: none;
    counter-reset: step-counter;
}

.steps li {
    counter-increment: step-counter;
    padding: 15px 0;
    padding-left: 50px;
    position: relative;
    font-size: 1.05rem;
    color: var(--text-light);
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 12px;
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cta {
    text-align: center;
    margin: 40px 0;
}

.btn {
    display: inline-block;
    padding: 16px 48px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #5a8bc2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 155, 209, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #e89451;
    transform: translateY(-2px);
}

.disclaimer {
    margin-top: 40px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
}

.disclaimer-text {
    font-size: 0.95rem;
    color: #856404;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

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

.copyright {
    margin-top: 10px;
    font-size: 0.85rem;
}

/* Simulator Page */
.simulator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.simulator-header {
    text-align: center;
    padding: 20px 0;
}

.simulator-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.simulator-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    margin-top: 20px;
}

.viewer-panel {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.controls-panel {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

#videoElement,
#uploadedImage,
#canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-group {
    margin-bottom: 30px;
}

.control-group h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.input-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-mode-toggle button {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.input-mode-toggle button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.age-slider {
    margin: 20px 0;
}

.age-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.age-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.age-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.age-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
}

.age-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.age-presets button {
    padding: 10px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.age-presets button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.age-presets button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.view-toggle {
    text-align: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 50px;
    background: var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.baby-view {
    background: var(--secondary-color);
}

.toggle-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    pointer-events: none;
}

.toggle-label.left {
    left: 20px;
    color: var(--text-dark);
}

.toggle-label.right {
    right: 20px;
    color: var(--text-light);
}

.toggle-switch.baby-view .toggle-label.left {
    color: var(--text-light);
}

.toggle-switch.baby-view .toggle-label.right {
    color: white;
}

.education-card {
    margin-top: 30px;
    padding: 20px;
    background: #e8f4f8;
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
}

.education-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.education-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #e8f4f8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .simulator-main {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        order: -1;
    }

    .age-presets {
        grid-template-columns: repeat(3, 1fr);
    }

    .content {
        padding: 30px 20px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}
