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

.pagination {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    gap: 8px;
    padding: 10px 0;
}

.page-btn {
    padding: 6px 12px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    min-width: 36px;
    height: 32px;
}

.page-btn:hover {
    background: #34495e;
    transform: translateY(-1px);
}

.page-btn.active {
    background: #3498db;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    padding: 0;
    overflow-x: hidden;
}

.dashboard {
    display: flex;
    flex-direction: column;
    /* height: 100vh; */
    background: linear-gradient(to right, #121212 0%, #1a1a1a 100%);
}

.header {
    padding: 15px 20px;
    background: linear-gradient(to right, #000000 0%, #202020 100%);
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-size: 1.5em;
    color: #4a90e2;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(174, 172, 172);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.login-box {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    width: 300px;
}
.login-box h2 {
    margin-bottom: 20px;
    color: #333;
}
#login-password {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
}
#login-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.device-display {
    background-color: #1a1a1a;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #333;
    color: #4a90e2;
}

.current-time {
    font-family: 'Courier New', monospace;
    color: #cecece;
}

.video-container {
    padding: 15px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(calc(28% - 20px), 1fr));
    align-items: start;
    /* overflow-y: auto; */
}

.video-item {
    background: #121212;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #252525;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: #4a90e2;
}

.video-header {
    padding: 10px 15px;
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.video-title {
    font-weight: 500;
    font-size: 0.95em;
    color: #e0e0e0;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
}

.video-item {

    /* min-height: 250px;
    aspect-ratio: 16/9; */
    margin: 10px;
    display: inline-block;
    vertical-align: top;
    overflow: hidden;
    position: relative;
}

.video-wrapper {
    position: relative;
    background-color: #000;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
} */

.video-controls {
    /* padding: 8px 15px; */
    background: linear-gradient(to right, #1a1a1a 0%, #252525 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
}

.control-btn {
    background: #333;
    border: none;
    color: #e0e0e0;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #4a90e2;
    color: white;
}

/* PC端 - 每行3个 */
@media (min-width: 1024px) and (max-width: 1348px) {
    .video-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1349px) {
    .video-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 平板端 - 每行2个 */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 移动端 - 每行1个 */
@media (max-width: 767px) {
    .video-container {
        grid-template-columns: 1fr;
    }
}

/* 小屏幕单列布局 */
@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
        /* padding: 10px; */
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .status-bar {
        width: 100%;
        justify-content: space-between;
    }
}

/* 监控风格装饰元素 */
.corner-decoration {
    position: fixed;
    width: 20px;
    height: 20px;
    border-color: #4a90e2;
    border-style: solid;
    border-width: 0;
    z-index: 100;
}

.corner-top-left {
    top: 0;
    left: 0;
    border-top-width: 2px;
    border-left-width: 2px;
}

.corner-top-right {
    top: 0;
    right: 0;
    border-top-width: 2px;
    border-right-width: 2px;
}

.corner-bottom-left {
    bottom: 0;
    left: 0;
    border-bottom-width: 2px;
    border-left-width: 2px;
}

.corner-bottom-right {
    bottom: 0;
    right: 0;
    border-bottom-width: 2px;
    border-right-width: 2px;
}

/* 网格背景 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(30, 30, 30, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 30, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    opacity: 0.3;
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
}