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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 640px;
    width: 100%;
    max-height: 800px;
    overflow-y: auto;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 20px;
}

.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

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

.input-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    font-size: 12px;
}

.input-group input[type="number"] {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.thermometer-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.thermometer-section.horizontal {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.thermometer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermometer-container.horizontal {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thermometer-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.thermometer-display.horizontal {
    flex-direction: column;
    height: auto;
    margin: 0;
}

.thermometer-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    font-size: 10px;
    color: #666;
    padding: 5px 0;
}

.thermometer-scale.horizontal {
    flex-direction: row-reverse;
    height: auto;
    width: 220px;
    padding: 0 5px;
}

.thermometer-wrapper {
    position: relative;
    height: 220px;
    width: 45px;
}

.thermometer-wrapper.horizontal {
    height: 45px;
    width: 220px;
}

.thermometer {
    position: relative;
    width: 30px;
    height: 220px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.thermometer.horizontal {
    width: 220px;
    height: 30px;
    border-radius: 15px;
}

.thermometer-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #ff4757, #ffa502, #ffd93d);
    transition: height 0.2s ease;
    border-radius: 0 0 15px 15px;
}

.thermometer-fill.horizontal {
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #ff4757, #ffa502, #ffd93d);
    border-radius: 15px 0 0 15px;
}

.thermometer-marker {
    position: absolute;
    left: -8px;
    width: 46px;
    height: 3px;
    background: #2c3e50;
    cursor: ns-resize;
    z-index: 10;
    border-radius: 2px;
    transition: background 0.2s;
}

.thermometer-marker.horizontal {
    top: -8px;
    left: 0;
    width: 3px;
    height: 46px;
    cursor: ew-resize;
}

.thermometer-marker:hover {
    background: #34495e;
    height: 4px;
}

.thermometer-marker.horizontal:hover {
    height: 46px;
    width: 4px;
}

.threshold-line {
    position: absolute;
    left: -8px;
    width: 46px;
    height: 2px;
    background: rgba(52, 152, 219, 0.6);
    border-top: 2px dashed #3498db;
    z-index: 5;
    pointer-events: none;
}

.threshold-line.horizontal {
    top: -8px;
    left: 0;
    width: 2px;
    height: 46px;
    border-top: none;
    border-left: 2px dashed #3498db;
}

.threshold-label {
    position: absolute;
    left: 50px;
    font-size: 9px;
    color: #3498db;
    white-space: nowrap;
    transform: translateY(-50%);
    font-weight: 500;
}

.threshold-label.horizontal {
    left: 50%;
    top: -18px;
    transform: translateX(-50%) translateY(0);
}

#wind-chill-line {
    background: rgba(52, 152, 219, 0.6);
    border-top: 2px dashed #3498db;
}

#heat-index-line {
    background: rgba(219, 52, 52, 0.6);
    border-top: 2px dashed #db3434;
}

.feels-like-display {
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.feels-like-display .label {
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
}

.feels-like-display .value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.feels-like-display .method {
    font-size: 9px;
    color: #999;
    margin-top: 3px;
    font-style: italic;
}

.environmental-section {
    margin-bottom: 12px;
}

.slider-group {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 12px;
}

.slider-value {
    color: #667eea;
    font-weight: 700;
}

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

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

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

#fetch-weather:hover {
    background: #5568d3;
}

#fetch-weather:active {
    transform: scale(0.98);
}

input[type="text"] {
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea !important;
}

#city-dropdown-btn:hover {
    background: #e0e0e0;
}

#city-dropdown-btn:active {
    background: #d0d0d0;
}

.dropdown-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.dropdown-item:hover {
    background: #f0f0ff;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.info-section {
    background: #e8f4f8;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    overflow: hidden;
}

#toggle-orientation {
    transition: background 0.3s, transform 0.1s;
}

#toggle-orientation:hover {
    background: #5568d3;
}

#toggle-orientation:active {
    transform: scale(0.95);
}

#orientation-icon {
    display: inline-block;
    transition: transform 0.3s;
}


.info-toggle-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #2980b9;
    text-align: left;
}

.info-toggle-btn:hover {
    background: rgba(52, 152, 219, 0.05);
}

.toggle-icon {
    transition: transform 0.3s;
    font-size: 10px;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.info-content {
    padding: 0 10px 10px 10px;
}

.info-content p {
    font-size: 10px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.info-content a {
    color: #3498db;
    text-decoration: none;
}

.info-content a:hover {
    text-decoration: underline;
}

/* Scrollbar styling for container */
.container::-webkit-scrollbar {
    width: 6px;
}

.container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 640px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }
    
    body {
        padding: 0;
    }
}
