body {
    font-family: Arial, sans-serif;
    background-color: #141b2d;
    color: #ffffff;
    margin: 0;
    padding: 40px;
    min-height: 100vh;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
}
.header h1 {
    font-size: 24px;
    margin: 0;
}
.header .logo img {
    max-height: 40px;
    vertical-align: middle;
}

.back-btn {
    background: #3e4396;
    padding: 8px 18px;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
    margin-right: auto;
    margin-left: 20px;
}
.back-btn:hover {
    background: #2c316d;
}

.metrics {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}
.metric-item {
    background: #1f2a40;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}
.metric-title {
    font-size: 12px;
    color: #a3a3a3;
    text-transform: uppercase;
}
.metric-value {
    font-size: 22px;
    font-weight: bold;
    margin-top: 5px;
}
.metric-value .unit { font-size: 14px; color: #a3a3a3; }

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
}
.status-left {
    display: flex;
    gap: 20px;
}
.status-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    border: 1px solid #3e4396;
    background: transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.status-btn.active {
    background: #3e4396;
    border-color: #3e4396;
}
.call-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    border: 1px solid #3e4396;
    background: transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.call-btn.active {
    background: #3e4396;
    border-color: #3e4396;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
}

.light-controls, .device-controls {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-item {
    background: #1f2a40;
    padding: 12px 15px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    padding-left: 20px;
}
.control-item:hover {
    background: #3e4396;
    cursor: pointer;
}

.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1f2a40;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 0;
    transition: 0.2s;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
}
.switch-container .icon { font-size: 22px; margin-right: 10px; }
.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 22px;
}
.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider-toggle { background-color: #3e4396; }
input:checked + .slider-toggle:before { transform: translateX(20px); }

.photo-container {
    background-color: #1f2a40;
    background-image: url("../img/fon.png");
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    height: 300px;
}

.weather-block {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.weather-item {
    color: #a3a3a3;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== ШТОРЫ (Реальное раздвигание) ===== */
.curtain-wrapper {
    position: relative;
    width: 100px;
    height: 80px;
    min-height: 80px;
    margin: 0 auto 10px auto;
    border-radius: 8px;
    border: 2px solid #4CAF50; /* Яркая зеленая рамка */
    background: #1a2a44;
    overflow: hidden;
}
.curtain-cloth {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%; /* ЗАКРЫТОЕ СОСТОЯНИЕ ПО УМОЛЧАНИЮ */
    background: #3e4396;
    transition: width 0.3s ease;
}
.curtain-left {
    left: 0;
    border-right: 4px solid #1a2a44; /* Имитация складки */
}
.curtain-right {
    right: 0;
    border-left: 4px solid #1a2a44;
}

.slider-container {
    width: 100%;
    padding: 5px 0;
    text-align: center;
    background: transparent;
}
.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #a3a3a3;
    margin-top: 5px;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #3e4396;
    outline: none;
    transition: 0.2s;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0c27f;
    cursor: pointer;
}

@media (max-width: 800px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .status-bar {
        flex-direction: column;
        gap: 20px;
    }
    .metrics {
        flex-direction: column;
        align-items: stretch;
    }
}
