body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 全屏容器 */
.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* 非全屏模式 */
.container:not(.fullscreen) {
    position: relative;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video, #output {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#video {
    z-index: 1;
}

#output {
    z-index: 2;
}

/* 浮动控制区 */
.floating-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-text {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.status-text p {
    color: #fff;
    margin: 0;
    font-size: 16px;
}

.control-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 8px;
}

/* 按钮样式 */
button {
    padding: 12px 18px;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    min-width: 100px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#startButton {
    background-color: #27ae60;
}

#startButton:hover {
    background-color: #2ecc71;
}

#stopButton {
    background-color: #e74c3c;
}

#stopButton:hover {
    background-color: #c0392b;
}

#cameraSwitch {
    background-color: #9b59b6;
}

#cameraSwitch:hover {
    background-color: #8e44ad;
}

#fullscreenButton {
    background-color: #f39c12;
}

#fullscreenButton:hover {
    background-color: #e67e22;
}

.debug-button {
    background-color: #3498db;
}

.debug-button:hover {
    background-color: #2980b9;
}

.debug-button.active {
    background-color: #e74c3c;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 调试面板 */
.debug-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 0 0 0 8px;
    border-left: 1px solid #555;
    border-bottom: 1px solid #555;
    color: white;
    padding: 10px;
    font-size: 14px;
    z-index: 20;
}

.debug-panel h3 {
    margin-top: 0;
    color: #3498db;
}

.debug-controls {
    margin-bottom: 15px;
}

.debug-controls label {
    display: block;
    margin-bottom: 10px;
}

.debug-controls input[type="range"] {
    width: 100%;
    vertical-align: middle;
}

.debug-info {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
    margin: 0;
    white-space: pre-wrap;
    color: #ddd;
}

/* 横屏模式检测 */
@media screen and (orientation: landscape) {
    .control-buttons {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    /* iPad Pro优化 */
    @media only screen and (min-width: 1024px) {
        button {
            font-size: 18px;
            padding: 15px 25px;
            min-width: 120px;
        }
        
        .status-text p {
            font-size: 18px;
        }
    }
}

.status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    background-color: #ecf0f1;
}

#status {
    margin: 0;
    color: #7f8c8d;
} 