* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f5f5;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
}

/* 헤더 */
.header {
    background-color: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    padding: 15px 30px;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #333;
}

/* 메인 컨텐츠 영역 */
.main-content {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(65% - 70px);
}

/* 메인 카드 */
.main-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 35px;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: 1px solid rgba(255,255,255,0.8);
}

.main-card-content {
    display: flex;
    gap: 40px;
    align-items: center;
    flex: 1;
}

.main-card-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e3e8ef;
    color: #2c3e50;
}

.sensor-data {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 1;
}

.sensor-row {
    display: flex;
    align-items: center;
}

.sensor-emoji {
    font-size: 50px;
    margin-right: 20px;
    width: 60px;
    text-align: center;
}

.sensor-label {
    font-weight: 500;
    width: 120px;
    color: #555;
    font-size: 36px;
}

.sensor-value {
    font-weight: 700;
    color: #2c3e50;
    margin-left: auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 80px;
}

.sensor-value .radon-status {
    font-size: 60px;
    font-weight: 700;
    line-height: 1.2;
}

.sensor-value .radon-value-detail {
    font-size: 36px;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 4px;
}

/* 종합 공기 지수 */
.air-quality-index {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 60px;
    border-left: 2px solid #e3e8ef;
    min-width: 300px;
}

.air-quality-label {
    font-size: 28px;
    font-weight: 500;
    color: #666;
    margin-bottom: 15px;
}

.air-quality-value {
    font-size: 160px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 차트/동영상 영역 */
.media-area {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.8);
}

.media-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 동영상 영역 스타일 */
.video-area {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* 동영상 시작 오버레이 */
.video-start-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.video-start-overlay:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.video-start-overlay .play-icon {
    font-size: 80px;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.video-start-overlay .play-text {
    font-size: 24px;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-start-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 서브 카드 영역 */
.sub-cards {
    padding: 10px 20px 20px 20px;
    height: calc(35% - 24.5px);
    overflow: hidden;
}

.sub-cards-container {
    display: flex;
    gap: 20px;
    height: 100%;
    will-change: transform;
}

.sub-card {
    background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    padding: 30px;
    width: 300px;
    flex-shrink: 0;
    border: 1px solid #e8ecf1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.sub-card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dce1e8;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-sensor-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 34px;
}

.sub-sensor-emoji {
    font-size: 28px;
    margin-right: 15px;
    width: 35px;
    text-align: center;
}

.sub-sensor-value {
    font-weight: 700;
    color: #2c3e50;
    margin-left: auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sub-sensor-value .radon-status {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.sub-sensor-value .radon-value-detail {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 2px;
}

/* 서브카드 내부 행동 가이드 */
.sub-card-action-guide {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #dce1e8;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.sub-card-action-item {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sub-card-action-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.sub-card-action-item.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.sub-card-action-item.warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.sub-card-action-item.danger {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
}

.sub-card-action-item.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

/* 센서 값 색상 - 긍정(초록/파랑), 부정(노랑/주황) */

/* 온도 */
.sensor-value.temp-low,
.sub-sensor-value.temp-low {
    color: #42A5F5 !important; /* 밝은파랑 - 낮음 */
}

.sensor-value.temp-normal,
.sub-sensor-value.temp-normal {
    color: #66BB6A !important; /* 밝은녹색 - 정상 */
}

.sensor-value.temp-high,
.sub-sensor-value.temp-high {
    color: #FFA726 !important; /* 주황색 - 높음 */
}

/* 습도 */
.sensor-value.humidity-low,
.sub-sensor-value.humidity-low {
    color: #FFCA28 !important; /* 노란색 - 건조 */
}

.sensor-value.humidity-normal,
.sub-sensor-value.humidity-normal {
    color: #26A69A !important; /* 청록색 - 정상 */
}

.sensor-value.humidity-high,
.sub-sensor-value.humidity-high {
    color: #42A5F5 !important; /* 밝은파랑 - 습함 */
}

/* 라돈 */
.sensor-value.radon-excellent,
.sub-sensor-value.radon-excellent {
    color: #4CAF50 !important; /* 녹색 - 최상 */
}

.sensor-value.radon-good,
.sub-sensor-value.radon-good {
    color: #66BB6A !important; /* 밝은녹색 - 양호 */
}

.sensor-value.radon-moderate,
.sub-sensor-value.radon-moderate {
    color: #26A69A !important; /* 청록색 - 보통 */
}

.sensor-value.radon-poor,
.sub-sensor-value.radon-poor {
    color: #FFCA28 !important; /* 노란색 - 주의 */
}

.sensor-value.radon-unhealthy,
.sub-sensor-value.radon-unhealthy {
    color: #FFA726 !important; /* 주황색 - 관리필요 */
}

.sensor-value.radon-hazardous,
.sub-sensor-value.radon-hazardous {
    color: #FF9800 !important; /* 진한주황 - 개선필요 */
}

.sensor-value.radon-measuring,
.sub-sensor-value.radon-measuring {
    color: #9E9E9E !important; /* 회색 - 측정중 */
}
.unit-small {
    font-size: 0.5em;
}
/* 공기질 지수 색상 */
.air-quality-value.quality-excellent {
    color: #4CAF50 !important; /* 녹색 - 90+ */
}

.air-quality-value.quality-good {
    color: #2196F3 !important; /* 파란색 - 70-89 */
}

.air-quality-value.quality-moderate {
    color: #FF9800 !important; /* 주황색 - 50-69 */
}

.air-quality-value.quality-poor {
    color: #F44336 !important; /* 빨간색 - 0-49 */
}

/* 우측 하단 버튼 */
.bottom-right-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.action-button {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0.3;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.action-button.setup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-button.exit {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: #ffffff;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 24px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}