:root {
    --primary: #4361ee;
    --success: #10b981;
    --error: #ef4444;
    --dark: #1e293b;
    --glass: rgba(255, 255, 255, 0.9);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin: 0; padding: 40px 20px;
    display: flex; flex-direction: column; align-items: center;
    color: var(--dark);
}

h1 { font-weight: 800; letter-spacing: -1px; margin-bottom: 30px; }

/* 視訊容器與掃描框 */
#container {
    position: relative;
    width: 640px; height: 480px;
    background: #000; border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden; border: 8px solid #fff;
}

/* 模擬掃描線動畫 */
#container::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary); opacity: 0.5;
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; } 100% { top: 100%; }
}

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

/* 資訊卡片 */
.controls, .list-container, #userInfo {
    background: var(--glass); backdrop-filter: blur(10px);
    padding: 30px; border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 100%; max-width: 600px; margin-top: 25px;
    box-sizing: border-box;
}

/* 輸入框與按鈕 */
input, select {
    width: 100%; padding: 12px 16px; margin: 10px 0;
    border: 2px solid #e2e8f0; border-radius: 12px;
    font-size: 16px; transition: 0.2s;
}

input:focus { border-color: var(--primary); outline: none; }

button {
    width: 100%; background: var(--primary); color: white;
    padding: 14px; border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: 0.3s; margin-top: 10px;
}

button:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* 表格優化 */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th { text-align: left; color: #64748b; font-size: 14px; padding-bottom: 10px; }
td { padding: 15px 0; border-top: 1px solid #f1f5f9; }

.delete-btn {
    background: #fee2e2; color: var(--error); width: auto; padding: 6px 12px; margin: 0;
}

/* 右下角懸浮按鈕 */
#adminBtn, #logoutBtn {
    position: fixed; right: 30px; bottom: 30px; width: auto;
    padding: 16px 28px; border-radius: 50px; z-index: 100;
}

#logoutBtn { background: var(--error); }
