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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

.section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

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

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

.control-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value-display {
    color: #667eea;
    font-size: 1.1em;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #764ba2;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.chart-container {
    margin: 20px 0;
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-container > div {
    width: 100% !important;
    max-width: 100% !important;
}

.info-box {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.condition-indicator {
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    margin: 10px 0;
}

.condition-night {
    background: #e3f2fd;
    color: #1565c0;
}

.condition-transition {
    background: #fff3e0;
    color: #e65100;
}

.condition-day {
    background: #fff9c4;
    color: #f57f17;
}

.accordion {
    margin: 20px 0;
}

.accordion-header {
    background: #f5f5f5;
    padding: 15px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #e0e0e0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 15px;
}

.accordion-content.active {
    max-height: 10000px;
    padding: 15px;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    margin-top: 40px;
}

.calculating-indicator {
    display: inline-block;
    margin-left: 15px;
    padding: 4px 8px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    color: #856404;
    vertical-align: middle;
    white-space: nowrap;
}

.calculating-indicator .spinner {
    display: inline-block;
    margin-right: 4px;
    font-size: 1em;
    animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.tab-button:hover {
    background: #e8e8e8;
    color: #333;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    width: 100%;
}

.tab-content .section {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
}

