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

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

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

label {
    font-weight: bold;
    color: #2c3e50;
    font-size: 0.9em;
}

input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 120px;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.load-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.clear-btn {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

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

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

.storage-section, .cache-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.section-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.storage-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.storage-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

.storage-slot.warm {
    border-color: #e67e22;
    background: linear-gradient(45deg, #fff3cd, #fef9e7);
    box-shadow: 0 2px 10px rgba(230, 126, 34, 0.2);
}

.storage-slot.cold {
    border-color: #3498db;
    background: linear-gradient(45deg, #d1ecf1, #e7f3ff);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slot-key {
    font-weight: bold;
    color: #2c3e50;
}

.slot-value {
    font-family: 'Courier New', monospace;
    color: #27ae60;
    font-weight: bold;
}

.slot-status {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.warm-status {
    background: #e67e22;
    color: white;
}

.cold-status {
    background: #3498db;
    color: white;
}

.cache-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 50px;
    align-content: flex-start;
}

.cache-item {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    border: 3px solid #34495e;
}

.explanation {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    font-size: 1em;
    line-height: 1.6;
}

.gas-indicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 10px;
}

.high-gas {
    background: #e74c3c;
    color: white;
}

.low-gas {
    background: #27ae60;
    color: white;
}

@media (max-width: 768px) {
    .visualization {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    input {
        width: 200px;
    }
}