* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', Garamond, 'Times New Roman', serif;
    line-height: 1.7;
    background: #ADD8E6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

/* Scientific Method Sidebar */
.scientific-method {
    padding: 25px;
    border-right: 1px solid #e0e0e0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.scientific-method h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 10px;
}

.method-step {
    margin-bottom: 20px;
}

.method-step h3 {
    color: #2c3e50;
    font-size: 1em;
    margin-bottom: 8px;
}

.method-step p {
    color: #555;
    font-size: 0.9em;
}

/* Main Visualization Area */
.visualization-area {
    padding: 30px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.controls label {
    font-weight: 600;
    color: #333;
}

.controls input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    width: 120px;
}

.controls input:focus {
    outline: none;
    border-color: #28a745;
}

.controls button {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.controls button:hover {
    background: #218838;
}

#compareBtn {
    background: #17a2b8;
}

#compareBtn:hover {
    background: #138496;
}

#compareBtn.active {
    background: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

#resetBtn {
    background: #6c757d;
}

#resetBtn:hover {
    background: #5a6268;
}

#clearAllBtn {
    background: #dc3545;
}

#clearAllBtn:hover {
    background: #c82333;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.error-message.visible {
    opacity: 1;
}

.results {
    background: rgba(212, 237, 218, 0.4);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.results h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.results p {
    color: #555;
    margin-bottom: 8px;
    font-size: 1em;
}

.results span {
    font-weight: 700;
    color: #28a745;
}

/* Canvas */
#flightCanvas {
    width: 100%;
    height: 500px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
    margin-bottom: 20px;
    display: block;
}

/* Comparison Legend */
.comparison-legend {
    padding: 12px 0;
    margin-bottom: 20px;
}

.comparison-legend h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    margin-bottom: 4px;
    font-size: 0.9em;
    color: #555;
}

.legend-color {
    width: 16px;
    height: 4px;
    border-radius: 2px;
    display: inline-block;
}

/* Explanation */
.explanation {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.explanation h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.explanation p {
    color: #555;
    margin-bottom: 10px;
}

.explanation strong {
    color: #28a745;
}

/* Cloud animations */
.cloud {
    position: fixed;
    background: white;
    border-radius: 100px;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
    width: var(--cw);
    height: var(--ch);
    top: var(--ct);
    animation: cloud-float var(--cd) infinite linear;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud::before {
    width: var(--bw);
    height: var(--bh);
    top: var(--bt);
    left: var(--bl);
}

.cloud::after {
    width: var(--aw);
    height: var(--ah);
    top: var(--at);
    right: var(--ar);
}

@keyframes cloud-float {
    from { left: var(--start); }
    to   { left: 100%; }
}

/* Responsive Design */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .scientific-method {
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    header h1 {
        font-size: 2em;
    }

    .controls {
        flex-wrap: wrap;
    }
}
