/* 基础样式 - 只定义一次，避免冲突 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    min-height: 100vh;
    color: #fff;
}

h1:focus {
    outline: none;
}

/* 仪表盘容器 */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-time {
    font-size: 1.2rem;
    color: #aaa;
}

/* 房间容器 */
.rooms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* 房间卡片 */
.room-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.room-card.outdoor {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

.room-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.room-icon {
    font-size: 2rem;
}

.room-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

/* 区块样式 */
.section {
    margin-bottom: 24px;
}

.section:last-child {
    margin-bottom: 0;
}

.section h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: #00d9ff;
}

/* 传感器网格 */
.sensor-section .sensor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.sensor-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: background 0.3s ease;
}

.sensor-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sensor-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.sensor-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
}

.sensor-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #00ff88;
}

.sensor-value small {
    font-size: 0.7rem;
    color: #888;
    margin-left: 2px;
}

/* 人数统计 */
.person-count {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 12px;
}

.count-value {
    font-size: 3rem;
    font-weight: 700;
    color: #00d9ff;
}

.count-label {
    font-size: 1.2rem;
    color: #888;
}

/* 无数据显示 */
.no-data {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* 验证样式 */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLT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My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
    text-align: start;
}

/* 灯光控制网格 */
.lights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.light-item {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.light-item.light-on {
    /*    background: rgba(255, 193, 7, 0.2);*/
    border: 1px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.light-item.light-off {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.light-item:hover {
    transform: scale(1.05);
}

.light-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.light-label {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 4px;
    font-weight: 500;
}

.light-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 20px;
}

.light-on .light-status {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.light-off .light-status {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
}

/* 亮度控制样式 */
.brightness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.brightness-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.brightness-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.brightness-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.brightness-label {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 500;
}

.brightness-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.brightness-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 8px;
}

.brightness-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffc107;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.brightness-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffc107;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.3);
}

.brightness-value {
    font-size: 0.8rem;
    color: #ffc107;
    font-weight: 600;
}

/* Room页面样式 */
.room-container {
    display: grid;
    grid-template-columns: 350px 1fr 400px;
    gap: 20px;
    height: 100vh;
    background: radial-gradient(50% 50% at 50% 50%, #7D7D7D 0%, #000000 100%);
    color: #fff;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    /* padding: 20px; */
}

/* 左侧面板 */
.left-panel {
    background: transparent;
    /* border-radius: 20px; */
    /* padding: 30px; */
    overflow-y: auto;
    width: 471px;
    overflow: hidden;
    z-index: 99;
}

.left-card {
    /* Frame 58 */
    box-sizing: border-box;
    position: relative;

    /* Auto layout */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    gap: 0px;

    width: 471.13px;
    height: 682.02px;

    overflow: hidden;
}

.card {
    background: rgba(24, 20, 0, 0.45);
    backdrop-filter: blur(6px);
    border-radius: 32px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 32px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border-radius: 5px;
}

.logo-text {
    font-size: 24px;
    line-height: 1.3;
    color: #fff;
    max-width: 400px;
}

.time-weather-section {
    margin-bottom: 40px;
    width: 100%;
}

.weather-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 20px;
}

.weather-icon {
    font-size: 24px;
}

.time-display {
    font-size: 72px;
    font-weight: 200;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.date-display {
    font-size: 22px;
    margin-bottom: 20px;
}

.weather-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
}

.weather-item .icon {
    font-size: 20px;
}

.weather-item .title {
    font-size: 12px;
    font-weight: 400;
}
.weather-item .unit {
    font-size: 12px;
}

.sensor-section {
    width: 100%;
}

.sensor-section h3 {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: normal;
}

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.sensor-section .sensor-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.sensor-section .sensor-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 8px;
    font-size: 22px;
    background: none;
    padding: 0;
    text-align: left;
}

.sensor-section .sensor-item .icon {
    font-size: 20px;
}

.sensor-section .sensor-item .title {
    font-size: 12px;
    font-weight: 400;
}

.sensor-section .sensor-item .unit {
    font-size: 12px;
}

/* 中间面板 */
.center-panel {
    display: flex;
    flex-direction: column;
    position: relative;
}

.room-title {
    text-align: center;
    margin-bottom: 20px;
}

.room-title h2 {
    font-size: 28px;
    margin: 0 0 5px 0;
    font-weight: normal;
}

.room-title p {
    font-size: 16px;
    margin: 0;
    color: #888;
}

.room-model {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.room-model img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.watermark {
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Arial', sans-serif;
}

/* 右侧面板 */
.right-panel {
    background: transparent;
    border-radius: 20px;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.battery-status {
    position: absolute;
    top: 10px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0px;
    font-size: 18px;
    font-weight: 600;
}

.battery-icon {
    font-size: 24px;
}

.light-control {
    display: flex;
    gap: 20px;
    background: rgba(50, 50, 50, 0.5);
    margin-top: 40px;
    padding: 20px;
}

.light-icon {
    width: 80px;
    height: 80px;
    /*    background: linear-gradient(180deg, #B8934A 0%, #6B5328 100%);*/
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
}

.mode-btn {
    background: linear-gradient(180deg, #4F4E4E 0%, #090909 100%);
    border: 4px solid #333333;
    color: #fff;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.mode-btn:hover {
/*    background: linear-gradient(180deg, #186CC5 0%, #090909 100%);
    color: #4CA3FF;*/
}

.mode-btn.light-on {
    background: linear-gradient(180deg, #186CC5 0%, #090909 100%);
    color: #4CA3FF;
}

.tabs {
    margin-bottom: 10px;
    font-size: 14px;
    color: #FFF;
    width:100%;
    height: 30px;
    justify-content: start;
    align-items: center;
}

.tabs .tab-btn {
    background: transparent;
    border: 0;
    color: #fff;
    padding: 6px 12px;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0 5px;
}

.tabs .tab-btn.selected{
    border-bottom: solid 1px #FFF;
}

.curtain-control {
    display: flex;
    gap: 20px;
    background: rgba(50, 50, 50, 0.5);
    padding: 20px;
}

.curtain-preview {
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
}

.curtain-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex: 1;
}

.curtain-btn {
    background: rgba(70, 70, 70, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.curtain-btn:hover {
    background: rgba(90, 90, 90, 0.8);
}

.ac-control {
    background: rgba(50, 50, 50, 0.5);
    padding: 20px;
}

.temperature-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.temp-circle-svg {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temp-svg {
    margin-bottom: 10px;
}

.temp-labels {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: start;
    width: 180px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #888;
    position: absolute;
    top: 80px;
    user-select: none;
    pointer-events: none;
}
.temp-room {
    font-size: 12px;
    color: #888;
    width: 100%;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

.temp-auto {
    color: #00A8FF;
    width: 100%;
    padding: 2px 8px;
    display: flex;
    border-radius: 10px;
    justify-content: center;
    margin-top: 70px;
    font-size: 10px;
    font-weight: 600;
    user-select: none;
    pointer-events: none;
}

.temp-minmax {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-top: 60px;
}

.temp-min, .temp-max {
    user-select: none;
    pointer-events: none;
}



.room-temp-label {
    font-size: 12px;
    color: #888;
    text-align: center;
    user-select: none;
    pointer-events: none;
}

.temp-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.temp-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(from 180deg at 50% 50%, #00A8FF 0deg, #00D4FF 120deg, #0088CC 240deg, #00A8FF 360deg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    position: relative;
    margin-bottom: 15px;
}

.temp-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 50%;
    z-index: 0;
}

.temp-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1;
}

.temp-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.temp-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    z-index: 1;
}

.temp-number {
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
}

.temp-unit {
    font-size: 24px;
    color: #888;
}

.temp-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.auto-mode {
    color: #fff;
    font-weight: 600;
}

.ac-mode-buttons {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.ac-mode-btn {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    color: #333;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 0;
}

.ac-mode-btn:hover {
    /*    background: rgba(90, 90, 90, 0.8);*/
    color: #FFF;
}

.ac-mode-btn.active {
    /*    background: rgba(0, 168, 255, 0.3);
border-color: rgba(0, 168, 255, 0.5);*/
    color: #FFF;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .rooms-container {
        grid-template-columns: 1fr;
    }

    .sensor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sensor-value {
        font-size: 1.2rem;
    }

    .lights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .brightness-grid {
        grid-template-columns: 1fr;
    }

    .brightness-item {
        padding: 12px;
    }

    .room-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .left-panel,
    .right-panel {
        order: 1;
    }

    .center-panel {
        order: 0;
    }
}
/* Room 页面缩放适配 */

@media screen and (max-width: 1098px) {
    .nbeezoom { zoom: 0.57; }
}
@media screen and (min-width:1024px) {
    .nbeezoom { zoom: 0.5333; }
}
@media screen and (min-width:1280px) {
    .nbeezoom { zoom: 0.6667; }
}
@media screen and (min-width:1440px) {
    .nbeezoom { zoom: 0.75; }
}
@media screen and (min-width:1680px) {
    .nbeezoom { zoom: 0.875; }
}
@media screen and (min-width:1920px) {
    .nbeezoom { zoom: 1; }
}
@media screen and (min-width:2048px) {
    .nbeezoom { zoom: 1.0667; }
}
@media screen and (min-width:2560px) {
    .nbeezoom { zoom: 1.3333; }
}
@media screen and (min-width:3072px) {
    .nbeezoom { zoom: 1.6; }
}
@media screen and (min-width:3840px) {
    .nbeezoom { zoom: 2; }
}
@media screen and (min-width:4096px) {
    .nbeezoom { zoom: 2.1333; }
}
