/* ========================================
   WATER CYCLE LESSON PAGE - STYLES
   ======================================== */

.ll-viewport {
  --ll-panel-w: 280px;
  --ll-tab-active: #1E90FF;
  --ll-tab-active-bg: rgba(30,144,255,0.12);
}

/* ========== LAYOUT ========== */
.wc-page {
    padding: 0 1.2rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ========== HERO SECTION ========== */

.wc-hero {
    background: linear-gradient(135deg, #87CEEB 0%, #E0F6FF 100%);
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    margin-top: 1rem;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.wc-hero h1 {
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    animation: fadeInDown 0.8s ease;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-intro {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-svg {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin-top: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

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

/* ========== STAGE SELECTOR ========== */

.stages-container {
    margin: 2rem 0;
}

.cycle-hero {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    padding: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff8ff 0%, #f8fcff 100%);
    border: 1px solid #d7e9f8;
}

.cycle-controls,
.cycle-readouts,
.stage-toolbar,
.distribution-toolbar,
.distribution-links,
.example-strip,
.transpiration-notes,
.quiz-progress-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cycle-readout,
.cycle-readouts .cycle-readout,
.metric-card {
    flex: 1 1 140px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #d9eaf8;
}

.cycle-readout strong,
.metric-card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.cycle-hero-svg,
.phase-change-svg,
.distribution-chart,
.transpiration-svg {
    width: 100%;
    height: auto;
    border-radius: 14px;
    background: linear-gradient(180deg, #dff4ff 0%, #f7fcff 100%);
    border: 1px solid #cfe3f3;
}

.stage-toolbar {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stage-toolbar-note,
.distribution-tooltip {
    color: #5f6f7d;
    font-size: 0.9rem;
}

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

.stage-btn {
    padding: 1rem;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.stage-btn:hover {
    background-color: #e8e8e8;
    border-color: #1E90FF;
    transform: translateY(-2px);
}

.stage-btn.active {
    background: linear-gradient(135deg, #1E90FF 0%, #0066CC 100%);
    color: white;
    border-color: #0066CC;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

.stage-display {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #1E90FF;
}

.stage-explanation {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.stage-explanation h3 {
    color: #0066CC;
    margin-bottom: 1rem;
}

.stage-diagram {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 1.5rem 0;
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #d0e8f2;
}

.states-explorer,
.distribution-explorer,
.transpiration-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}

.phase-panel,
.molecule-card,
.distribution-panel,
.transpiration-notes,
.simulation-stage {
    background: #f9fcff;
    border: 1px solid #d7e9f8;
    border-radius: 16px;
    padding: 1rem;
}

.molecule-svg {
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e1eef8;
}

.example-chip,
.distribution-jump,
.hint-btn {
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #cfe2f1;
    background: #fff;
    color: #0f5c95;
    font-weight: 600;
}

/* ========== STATES OF WATER ========== */

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

.state-card {
    background: #fff;
    border: 2px solid #B0E0E6;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.state-card:hover {
    border-color: #1E90FF;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.15);
    transform: translateY(-4px);
}

.state-card h4 {
    color: #0066CC;
    margin-bottom: 0.5rem;
}

.state-card .temp {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 600;
}

.state-icon {
    width: 100px;
    height: 100px;
    margin: 1rem auto;
    display: block;
}

.state-card .description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* ========== SUN POWERS DIAGRAM ========== */

.sun-diagram {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
}

.sun-diagram svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== WATER DISTRIBUTION ========== */

.water-distribution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.distribution-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.distribution-item:hover {
    border-color: #1E90FF;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.15);
    transform: translateY(-4px);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.distribution-item h4 {
    color: #0066CC;
    margin-bottom: 0.5rem;
}

.distribution-item p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.distribution-item .small {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0;
}

/* ========== SIMULATION ========== */

.simulation-container {
    display: grid;
    grid-template-columns: minmax(260px, 300px) 1fr;
    gap: 2rem;
    margin: 2rem 0;
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.season-selector,
.hunt-input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #cfe2f1;
    background: #fff;
}

.simulation-metrics {
    display: grid;
    gap: 0.75rem;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sim-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1E90FF 0%, #0066CC 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(30, 144, 255, 0.3);
}

.sim-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
}

.sim-button:active {
    transform: translateY(0);
}

.sim-button.reset {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 2px 6px rgba(95, 95, 95, 0.3);
}

.sim-button.reset:hover {
    box-shadow: 0 4px 12px rgba(95, 95, 95, 0.4);
}

.simulation-svg {
    width: 100%;
    height: auto;
    min-height: 400px;
    background: linear-gradient(135deg, #E8F4F8 0%, #F5FAFE 100%);
    border-radius: 6px;
    border: 1px solid #d0e8f2;
}

.distribution-chart-slice {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.distribution-chart-slice:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* ========== VOCABULARY CARDS ========== */

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

.vocab-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vocab-card:hover {
    border-color: #1E90FF;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.15);
    transform: translateY(-4px);
}

.vocab-card h4 {
    color: #0066CC;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #1E90FF;
    padding-bottom: 0.5rem;
}

.vocab-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

/* ========== QUIZ ========== */

/* ========== SCAVENGER HUNT ========== */

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

.hunt-item {
    background: linear-gradient(135deg, #E8F4F8 0%, #F5FAFE 100%);
    border-left: 5px solid #1E90FF;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hunt-item h4 {
    color: #0066CC;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.hunt-item p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.hunt-item .hint {
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

.hunt-check-btn {
    width: 100%;
    margin-top: 0.75rem;
}

.hunt-input {
    margin-top: 0.75rem;
}

.hunt-feedback {
    min-height: 2.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.72);
}

.hunt-feedback.correct {
    border: 1px solid #b8ebcb;
    color: #1f7a43;
}

.hunt-feedback.incorrect {
    border: 1px solid #f3b0a6;
    color: #b03b2c;
}

/* ========== WONDER CARDS ========== */

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

.wonder-card {
    background: linear-gradient(135deg, #E8F4F8 0%, #F5FAFE 100%);
    border: 2px solid #1E90FF;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.wonder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(30, 144, 255, 0.2);
}

.wonder-card h4 {
    color: #0066CC;
    margin-bottom: 0.75rem;
}

.wonder-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0;
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 1200px) {
    .table-of-contents {
        position: static;
        width: 100%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-svg {
        max-width: 100%;
    }

    .cycle-hero,
    .states-explorer,
    .distribution-explorer,
    .transpiration-layout,
    .stages-buttons {
        grid-template-columns: 1fr;
    }

    .stages-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .states-grid {
        grid-template-columns: 1fr;
    }

    .water-distribution {
        grid-template-columns: repeat(2, 1fr);
    }

    .vocab-cards {
        grid-template-columns: 1fr;
    }

    .wonder-cards {
        grid-template-columns: 1fr;
    }

    .scavenger-hunt {
        grid-template-columns: 1fr;
    }

    .simulation-container {
        grid-template-columns: 1fr;
    }

    .simulation-stage {
        order: 1;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

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

    .hero-intro {
        font-size: 0.95rem;
    }

    .wc-card {
        padding: 1rem;
    }

    .stages-buttons {
        grid-template-columns: 1fr;
    }

    .stage-display {
        padding: 1rem;
    }

    .sun-diagram {
        padding: 1rem;
    }

    .water-distribution {
        grid-template-columns: 1fr;
    }

    .button-group {
        gap: 0.5rem;
    }

    .sim-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========== ACCESSIBILITY ========== */

*:focus {
    outline: 2px solid #1E90FF;
    outline-offset: 2px;
}

button:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

input:focus {
    outline: 2px solid #1E90FF;
    outline-offset: 2px;
}

/* ========== ANIMATIONS & TRANSITIONS ========== */

@keyframes water-flow {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.water-flow {
    animation: water-flow 2s ease-in-out infinite;
}

/* Smooth transitions for all interactive elements */
button,
input,
a {
    transition: all 0.3s ease;
}
