/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #2a3a7c, #3a4a8c);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.account-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.76);
}

.account-bar a {
    color: #9fe9ff;
    text-decoration: none;
}

.account-bar a:hover { text-decoration: underline; }

.site-links { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin:-4px 0 18px; }
.site-links a { color:#d7f8ff; text-decoration:none; padding:5px 10px; border:1px solid rgba(159,233,255,.35); border-radius:999px; font-size:.82rem; background:rgba(0,0,0,.15); }
.site-links a:hover { background:rgba(110,231,255,.18); }

.stream-preset-control { display:inline-flex; align-items:center; gap:6px; color:rgba(255,255,255,.82); font-size:.86rem; }
.stream-preset-control select { color:#fff; background:#1d2b67; border:1px solid rgba(255,255,255,.25); border-radius:5px; padding:7px 8px; max-width:220px; }

.panel-title-row,
.nvr-toolbar,
.playback-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.panel-title-row { justify-content: space-between; }
.nvr-panel { margin-bottom: 25px; }
.nvr-select-group { min-width: 260px; }
.selected-channel { margin-left: auto; color: rgba(255,255,255,0.75); }
.selected-channel strong { color: #fff; }

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    max-height: 260px;
    overflow-y: auto;
    margin: 18px 0;
}

.channel-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 15px;
    min-height: 92px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    color: #fff;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    text-align: left;
    transition: all .2s ease;
}

.channel-card:hover,
.channel-card.selected {
    border-color: #6ee7ff;
    background: rgba(52,152,219,0.3);
    transform: translateY(-2px);
}

.channel-card i { color: #6ee7ff; font-size: 1.2rem; }
.channel-card span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.channel-card small { color: rgba(255,255,255,0.65); }
.playback-toolbar .input-group { min-width: 210px; }
.playback-toolbar input { max-width: 210px; }
.hint { margin-top: 14px; color: rgba(255,255,255,0.6); font-size: .88rem; }

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    color: #6ee7ff;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 状态栏 */
.status-bar {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.status-indicator.connected {
    background: #2ecc71;
    animation: pulse 2s infinite;
}

.status-indicator.streaming {
    background: #3498db;
}

.status-indicator.recording {
    background: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

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

/* 面板样式 */
.panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.panel-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: #6ee7ff;
}

.config-summary {
    cursor: pointer;
    list-style: none;
    justify-content: space-between;
    margin-bottom: 0;
}

.config-summary::-webkit-details-marker { display: none; }
.config-summary::after { content: '+'; color: #6ee7ff; font-size: 1.5rem; }
.config-panel[open] .config-summary { margin-bottom: 20px; }
.config-panel[open] .config-summary::after { content: '−'; }

/* 配置面板 */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group label i {
    color: #6ee7ff;
    width: 20px;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 视频面板 */
.video-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
}

#videoFeed {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

.recording-timer {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    display: none;
    z-index: 10;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading p {
    font-size: 1.1rem;
    color: white;
}

/* 媒体面板 */
.media-panel {
    grid-column: 1 / -1;
}

.tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 12px 25px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    color: white;
    border-bottom: 3px solid #3498db;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-header h3 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 媒体网格 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.5);
}

.empty-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* 媒体覆盖层 */
.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8), transparent);
    padding: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.media-item:hover .media-overlay {
    opacity: 1;
    pointer-events: auto;
}

.media-overlay p {
    margin: 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 媒体操作按钮组 */
.media-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.media-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.media-actions .btn-danger {
    background: #e74c3c;
}

.media-actions .btn-danger:hover {
    background: #c0392b;
}

.media-info {
    padding: 12px;
    font-size: 0.9rem;
}

.media-info h4 {
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.media-actions .btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.media-actions .btn-danger {
    background: #e74c3c;
}

.media-actions .btn-danger:hover {
    background: #c0392b;
}

/* 设置面板 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.setting-item select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: #3498db;
}

/* 按钮样式 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
    min-width: auto;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

/* 继续之前的样式 */

.btn-success:hover:not(:disabled) {
    background: linear-gradient(45deg, #27ae60, #219653);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #e67e22, #d35400);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(45deg, #d35400, #a35200);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(45deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

footer p {
    margin: 5px 0;
}

.server-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* 通知 */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

.notification.error {
    background: #e74c3c;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* 图片查看器 */
/* 媒体操作按钮组 */
.media-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.media-actions .btn {
    flex: 1;
    min-width: 80px;
}

/* 视频占位符样式 */
.video-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.video-placeholder video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.video-placeholder .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s;
}

.video-placeholder:hover .play-overlay {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-placeholder .play-overlay i {
    color: #fff;
    font-size: 24px;
    margin-left: 4px;
}

.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.image-viewer-content img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    display: block;
    margin: 0 auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* 视频查看器样式 */
.video-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.video-viewer-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-viewer-content {
    pointer-events: auto;
}

.video-viewer-content video {
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
    outline: none;
}

.video-viewer-content video:focus {
    outline: 2px solid #3498db;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.video-info span {
    color: #fff;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .panel {
        padding: 20px 15px;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .video-container {
        height: 300px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 动画 */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.panel {
    animation: slideIn 0.3s ease-out;
}

/* 录像机监控中心新版布局 */
.monitor-container,
.single-camera-page {
    max-width: 1560px;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    text-align: left;
}

.monitor-header h1 {
    justify-content: flex-start;
    margin-bottom: 8px;
}

.monitor-header .subtitle {
    margin: 0;
    max-width: 760px;
}

.monitor-header .account-bar {
    margin: 0 0 4px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.monitor-status-bar {
    margin-top: 22px;
}

.status-indicator.active {
    background: #2ecc71;
    animation: pulse 2s infinite;
}

.status-indicator.inactive {
    background: #e74c3c;
}

.monitor-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 30px;
}

.monitor-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.camera-sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    padding: 18px;
    overflow: hidden;
}

.sidebar-heading,
.media-heading,
.video-title-row,
.channel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.sidebar-heading .panel-title,
.media-heading .panel-title,
.video-title-row .panel-title {
    margin-bottom: 4px;
}

.sidebar-heading p,
.media-heading p {
    margin: 0;
    font-size: .85rem;
}

.camera-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 9px;
    background: rgba(0,0,0,.18);
}

.camera-search i {
    color: #6ee7ff;
}

.camera-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 0;
    color: #fff;
    background: transparent;
    border: 0;
    outline: 0;
}

.camera-search input::placeholder {
    color: rgba(255,255,255,.5);
}

.camera-search button {
    padding: 6px;
    color: rgba(255,255,255,.65);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.authorized-camera-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding-right: 3px;
}

.camera-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 11px;
    width: 100%;
    padding: 9px;
    color: #fff;
    text-align: left;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(0,0,0,.16);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
    font: inherit;
}

.camera-card:hover,
.camera-card.selected {
    border-color: #6ee7ff;
    background: rgba(52,152,219,.28);
    transform: translateY(-1px);
}

.camera-thumbnail {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 66px;
    overflow: hidden;
    border-radius: 7px;
    background: rgba(0,0,0,.35);
}

.camera-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-card-body .camera-recorder-name {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.58);
    font-size: .72rem;
    font-style: normal;
}

.thumbnail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: rgba(255,255,255,.45);
    font-size: .7rem;
}

.thumbnail-empty i {
    font-size: 1.2rem;
}

.camera-online {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 1px 5px;
    color: #071d16;
    border-radius: 10px;
    background: #7dffc0;
    font-size: .65rem;
}

.camera-online.offline {
    color: #fff;
    background: #7f8c8d;
}

.camera-card-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.camera-card-body strong,
.camera-card-body small,
.camera-card-body em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.camera-card-body strong {
    font-size: .95rem;
}

.camera-card-body small,
.camera-card-body em {
    color: rgba(255,255,255,.65);
    font-size: .75rem;
    font-style: normal;
}

.channel-control-panel {
    padding: 22px;
}

.eyebrow {
    margin-bottom: 3px;
    color: #6ee7ff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.channel-heading h2 {
    margin-bottom: 4px;
    font-size: 1.45rem;
}

.mode-switch {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(0,0,0,.2);
}

.mode-btn {
    padding: 9px 13px;
    color: rgba(255,255,255,.72);
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
}

.mode-btn.active {
    color: #fff;
    background: #3498db;
}

.playback-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.playback-controls.hidden,
.hidden {
    display: none !important;
}

.time-field {
    display: flex;
    min-width: 250px;
    flex-direction: column;
    gap: 6px;
}

.time-field label {
    color: rgba(255,255,255,.82);
    font-size: .85rem;
    font-weight: 600;
}

.time-field input {
    width: 250px;
    min-width: 250px;
    padding: 10px 11px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 7px;
    background: rgba(0,0,0,.2);
    font: inherit;
}

.time-field input:focus {
    outline: none;
    border-color: #6ee7ff;
    box-shadow: 0 0 0 3px rgba(52,152,219,.2);
}

.time-arrow {
    padding-bottom: 10px;
    color: rgba(255,255,255,.65);
}

.hint {
    margin-top: 14px;
}

.video-panel,
.media-panel {
    min-width: 0;
}

.video-title-row {
    align-items: center;
}

.video-title-row .panel-title {
    margin-bottom: 0;
}

.mode-badge {
    padding: 5px 10px;
    color: #baf5ff;
    border: 1px solid rgba(110,231,255,.35);
    border-radius: 999px;
    background: rgba(52,152,219,.18);
    font-size: .8rem;
    white-space: nowrap;
}

.media-heading {
    align-items: center;
}

.media-heading .btn {
    flex-shrink: 0;
}

.recording-card video {
    object-fit: cover;
    background: #000;
}

.single-camera-layout {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 30px;
}

.single-camera-form {
    display: grid;
    gap: 16px;
}

.single-camera-form .input-group input,
.single-camera-form .input-group select {
    width: 100%;
    padding: 10px 12px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 7px;
    background: rgba(0,0,0,.2);
}

.single-camera-form .form-row {
    gap: 12px;
}

.single-camera-video .video-container {
    min-height: 480px;
    height: min(62vh, 640px);
}

.settings-note p + p {
    margin-top: 14px;
}

@media (max-width: 900px) {
    .monitor-header,
    .single-camera-layout {
        grid-template-columns: 1fr;
    }

    .monitor-header {
        display: block;
        text-align: center;
    }

    .monitor-header h1 {
        justify-content: center;
    }

    .monitor-header .subtitle {
        margin: 0 auto;
    }

    .monitor-header .account-bar {
        justify-content: center;
        margin-top: 14px;
    }

    .monitor-layout {
        grid-template-columns: 1fr;
    }

    .camera-sidebar {
        position: static;
        max-height: none;
    }

    .authorized-camera-list {
        max-height: 360px;
    }

    .single-camera-video .video-container {
        min-height: 300px;
        height: 52vw;
    }
}

@media (max-width: 620px) {
    .channel-heading,
    .sidebar-heading,
    .media-heading {
        flex-direction: column;
    }

    .mode-switch {
        width: 100%;
    }

    .mode-btn {
        flex: 1;
    }

    .time-field,
    .time-field input {
        width: 100%;
        min-width: 0;
    }

    .time-arrow {
        display: none;
    }
}

.channel-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.channel-title-line h2 {
    margin-bottom: 0;
}

.channel-rename-btn {
    flex-shrink: 0;
}

.channel-rename-editor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.channel-rename-editor input {
    width: min(320px, 100%);
    min-width: 180px;
    padding: 8px 10px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 7px;
    background: rgba(0,0,0,.2);
}

.channel-rename-editor input:focus {
    outline: none;
    border-color: #6ee7ff;
    box-shadow: 0 0 0 3px rgba(52,152,219,.2);
}

.camera-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -4px 0 14px;
    color: rgba(255,255,255,.78);
    font-size: .85rem;
}

.camera-filter label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.camera-filter label i {
    color: #6ee7ff;
}

.camera-filter select {
    min-width: 0;
    flex: 1;
    padding: 8px 9px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 7px;
    background: #273878;
    font: inherit;
}

.camera-filter select:focus,
.timeline-speed-btn:focus {
    outline: none;
    border-color: #6ee7ff;
}

.playback-timeline {
    margin-top: 16px;
    padding: 15px 16px 13px;
    border: 1px solid rgba(110,231,255,.2);
    border-radius: 10px;
    background: rgba(0,0,0,.16);
}

.video-panel .controls {
    gap: 10px;
    margin-top: 0;
}

.video-panel .playback-timeline {
    margin-top: 10px;
    padding: 9px 12px 7px;
}

.video-panel .timeline-header {
    font-size: .82rem;
}

.video-panel #playbackTimeline {
    margin: 7px 0 2px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255,255,255,.9);
    font-size: .88rem;
}

.timeline-header strong i {
    margin-right: 5px;
    color: #6ee7ff;
}

#timelineTime {
    color: #baf5ff;
    font-variant-numeric: tabular-nums;
}

#playbackTimeline {
    width: 100%;
    margin: 14px 0 4px;
    accent-color: #42c7f4;
    cursor: pointer;
}

.timeline-ticks {
    position: relative;
    height: 17px;
    margin: 0 0 1px;
    color: rgba(255,255,255,.78);
    font-size: .66rem;
    font-variant-numeric: tabular-nums;
}

.timeline-tick {
    position: absolute;
    top: 0;
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    white-space: nowrap;
}

.timeline-tick i {
    display: block;
    width: 1px;
    height: 4px;
    margin-bottom: 2px;
    background: rgba(186,245,255,.55);
}

.timeline-tick-start {
    align-items: flex-start;
    transform: none;
}

.timeline-tick-end {
    align-items: flex-end;
    transform: translateX(-100%);
}

@media (max-width: 620px) {
    .camera-filter {
        align-items: flex-start;
        flex-direction: column;
    }

    .camera-filter select {
        width: 100%;
    }

    .timeline-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
