:root {
    --iot-blue: #2B7CD3;
    --iot-green: #4CAF50;
    --iot-purple: #9C27B0;
    --iot-orange: #FF9800;
    --iot-pink: #E91E63;
    --iot-teal: #009688;
    --iot-light: #f5f9ff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--iot-light);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 20px;
}

.iot-scenario {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: left;
}

.iot-scenario h2 {
    color: var(--iot-purple);
    margin-top: 0;
    text-align: center;
    font-size: 2rem;
}

.iot-visualization {
    min-height: 250px;
    background: #f5f5f5;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    padding: 1rem;
    gap: 1rem;
}

.device {
    width: 90px;
    height: 90px;
    background: var(--iot-blue);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    position: relative;
}

.device.active {
    background: var(--iot-green);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.device.eco {
    background: var(--iot-orange);
}

.device.warning {
    background: var(--iot-pink);
}

.device.special {
    background: var(--iot-teal);
}

.device-label {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    text-align: center;
}

.iot-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.iot-button {
    background-color: white;
    color: var(--iot-purple);
    border: 2px solid var(--iot-purple);
    padding: 1rem;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.iot-button:hover {
    background-color: var(--iot-purple);
    color: white;
}

.iot-button.active {
    background-color: var(--iot-green);
    color: white;
    border-color: var(--iot-green);
}

.iot-button.eco {
    background-color: var(--iot-orange);
    color: white;
    border-color: var(--iot-orange);
}

.iot-button.warning {
    background-color: var(--iot-pink);
    color: white;
    border-color: var(--iot-pink);
}

.iot-button.special {
    background-color: var(--iot-teal);
    color: white;
    border-color: var(--iot-teal);
}

.scene-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scene-button {
    background-color: var(--iot-blue);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-button:hover {
    background-color: #1a68c7;
    transform: scale(1.05);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.status-indicator.active {
    background: var(--iot-green);
    box-shadow: 0 0 10px var(--iot-green);
}

.status-indicator.eco {
    background: var(--iot-orange);
    box-shadow: 0 0 10px var(--iot-orange);
}

.status-indicator.warning {
    background: var(--iot-pink);
    box-shadow: 0 0 10px var(--iot-pink);
}

.status-indicator.special {
    background: var(--iot-teal);
    box-shadow: 0 0 10px var(--iot-teal);
}

.pet-food-level {
    width: 60%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.pet-food-fill {
    height: 100%;
    background: var(--iot-teal);
    width: 80%;
    transition: width 0.5s ease;
}

.curtain-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.curtain-slider {
    width: 60%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
}

.curtain-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--iot-purple);
    cursor: pointer;
}

@media (max-width: 768px) {
    .iot-controls {
        grid-template-columns: 1fr 1fr;
    }
    
    .device {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .iot-controls {
        grid-template-columns: 1fr;
    }
    
    .device {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}