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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.status-indicator.connected {
    background: #4caf50;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.video-container {
    background: #000;
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #999;
    font-size: 16px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #0056b3;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.message-section {
    margin-bottom: 20px;
}

.message-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-item {
    aspect-ratio: 1;
    background: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-section {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}