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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    padding: 40px;
}

/* Calculator Selection */
.calculator-selection {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-selection h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.calculator-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.calculator-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculator-btn:hover {
    background: #d5dbdb;
}

.calculator-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-color: #3498db;
}

/* Temperature Unit Toggle */
.unit-toggle-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

.toggle-switch label:first-child {
    font-weight: 600;
    color: #2c3e50;
}

.toggle-input {
    display: none;
}

.toggle-label {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-input:checked + .toggle-label {
    background: #3498db;
}

.toggle-switch-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-input:checked + .toggle-label .toggle-switch-slider {
    transform: translateX(30px);
}

.unit-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Calculator Sections */
.calculator-section {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.calculator-section.active {
    display: grid;
}

.input-section, .results-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.input-section h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.description {
    color: #666;
    margin-bottom: 25px;
    font-style: italic;
}

.input-section h4 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
    font-size: 1.2rem;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.input-section h4:first-of-type {
    border-top: none;
    padding-top: 0;
}

.results-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-right: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

button[type="reset"] {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

button[type="reset"]:hover {
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}


.results-display {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.result-label {
    font-weight: 600;
    color: #555;
}

.result-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 8px 15px;
    border-radius: 5px;
    min-width: 120px;
    text-align: center;
}

/* Info Section */
.info-section {
    margin-top: 40px;
    background: #e3f2fd;
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
}

.info-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-item h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.info-item p {
    color: #555;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calculator-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .calculator-btn {
        width: 100%;
        max-width: 300px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-section, .results-section {
        padding: 20px;
    }
    
    button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}
