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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.day-comparison-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

main {
    padding: 30px;
}

.simulation-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.animation-panel,
.comparison-panel {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.animation-panel h3,
.comparison-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

#mainCanvas,
#comparisonCanvas {
    width: 100%;
    height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.animation-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #333;
}

.legend-color.sun {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.legend-color.earth {
    background: linear-gradient(135deg, #87CEEB 0%, #4169E1 100%);
}

.legend-color.star {
    background: #FF6B6B;
}

.legend-color.observer {
    background: #32CD32;
}

.day-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.day-type {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.day-type.sidereal {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-left: 4px solid #FF6B6B;
}

.day-type.solar {
    background: linear-gradient(135deg, #fffaf0 0%, #ffe5cc 100%);
    border-left: 4px solid #FFA500;
}

.day-type h4 {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.day-type.sidereal h4 {
    color: #FF6B6B;
}

.day-type.solar h4 {
    color: #FFA500;
}

.day-value {
    font-size: 1.8em;
    font-weight: 700;
    margin: 10px 0;
}

.day-type.sidereal .day-value {
    color: #FF6B6B;
}

.day-type.solar .day-value {
    color: #FFA500;
}

.day-angle {
    font-size: 1.2em;
    color: #666;
    margin: 5px 0;
}

.day-type p {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

.controls-panel {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.controls-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.control-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.parameter-effect {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.effect-icon {
    font-size: 1.2em;
}

.difference-panel {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.difference-panel h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.difference-explanation {
    display: grid;
    gap: 10px;
}

.difference-formula {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.formula-label {
    font-weight: 600;
    color: #667eea;
    min-width: 120px;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #333;
}

.data-display-panel {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.data-display-panel h3 {
    color: #1565C0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.data-readings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.data-reading {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.data-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.data-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #1976D2;
    margin: 8px 0;
}

.unit {
    font-size: 0.85em;
    color: #999;
}

.explanation {
    padding: 30px;
    background: #fafafa;
}

.explanation h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.explanation h3 {
    color: #5555aa;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.4em;
}

.explanation p {
    line-height: 1.8;
    color: #424242;
    margin-bottom: 15px;
    font-size: 1.05em;
}

@media (max-width: 968px) {
    .simulation-layout {
        grid-template-columns: 1fr;
    }

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

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

    .day-info {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2em;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    main {
        padding: 15px;
    }

    .explanation {
        padding: 20px;
    }

    #mainCanvas,
    #comparisonCanvas {
        height: 300px;
    }

    .data-readings {
        grid-template-columns: 1fr;
    }
}