/* Humidity Checker Styles */

* {
    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%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-align: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

main {
    padding: 40px;
}

section {
    margin-bottom: 40px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

h2 {
    color: #4facfe;
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2::before {
    content: '';
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 2px;
}

/* Chart Styles */
.chart-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    transition: 0.3s;
}

.slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

input:checked + .slider::before {
    transform: translateX(30px);
}

.unit-label {
    color: #2196F3;
    font-weight: 600;
    transition: color 0.3s ease;
}

.chart-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.humidity-chart {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 800px;
}

.humidity-chart th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.humidity-chart th:first-child {
    position: sticky;
    left: 0;
    z-index: 11;
}

.humidity-header {
    background: linear-gradient(135deg, #4facfe, #00f2fe) !important;
    position: sticky !important;
    left: 0;
    z-index: 9;
}

.chart-cell {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.chart-cell:hover {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: #4facfe;
}

/* Calculator Styles */
.calculator-container {
    display: grid;
    gap: 30px;
}

.input-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4facfe;
}

.input-group h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.input-row:last-child {
    margin-bottom: 0;
}

.input-row label {
    flex: 1;
    font-weight: 600;
    color: #555;
}

.input-row input {
    flex: 0 0 120px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-row input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.calculate-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-self: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Styles */
.results {
    margin-top: 30px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.result-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.recommendation {
    font-size: 3rem;
    font-weight: 900;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.recommendation.success {
    color: #4CAF50;
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.recommendation.warning {
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.recommendation-text {
    font-size: 1.1rem;
    opacity: 0.9;
}

.details {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4facfe;
}

.details h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.success {
    color: #4CAF50;
    font-weight: 600;
}

.detail-row.warning {
    color: #ff6b6b;
    font-weight: 600;
}

.error {
    color: #f44336;
    text-align: center;
    font-weight: 600;
    padding: 20px;
    background: #ffebee;
    border-radius: 10px;
    border-left: 4px solid #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    main {
        padding: 20px;
    }
    
    section {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .input-row input {
        flex: none;
    }
    
    .humidity-chart {
        font-size: 0.8rem;
    }
    
    .chart-cell {
        padding: 6px 4px;
    }
    
    .recommendation {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .humidity-chart {
        font-size: 0.7rem;
    }
}
