/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 顶部导航栏样式 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 250px;
    height: 64px;
    margin-right: 10px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    margin-left: 15px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
    transition: margin-left 0.3s ease;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s, font-size 0.3s;
}

.nav-menu a:hover {
    color: #00ccff;
    text-shadow: 0 0 5px rgba(0, 204, 255, 0.5);
}

.nav-buttons {
    display: flex;
    align-items: center;
}

/* 汉堡菜单样式 */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: white;
}

/* 汉堡菜单动画效果 */
.menu-toggle .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle .bar2 {
    opacity: 0;
}

.menu-toggle .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* 小屏幕显示汉堡菜单 */
@media (max-width: 480px) {
    .menu-toggle {
        display: block;
        margin-left: 10px;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active li {
        margin: 10px 20px;
        text-align: center;
    }
}

.btn-download {
    background-color: #00ccff;
    color: black;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-right: 15px;
    transition: background-color 0.3s, padding 0.3s;
}

.btn-download:hover {
    background-color: #00aacc;
}

.btn-login {
    color: white;
    text-decoration: none;
    border: 1px solid white;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s, padding 0.3s;
}

.btn-login:hover {
    background-color: white;
    color: black;
}

body {
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-bottom: 200px; /* 底部预留200px空白 */
}

/* 背景样式 */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background-color: #000;
}

/* 视频背景样式 */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/bg.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
    display: block; /* 默认显示封面 */
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: brightness(0.7);
    z-index: 2;
}

/* 图片背景样式 */
.image-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/bg.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    display: none;
}

/* 移动设备使用图片背景 */
@media (max-width: 768px) {
    .video-container {
        display: none;
    }
    .image-background {
        display: block;
    }
}

/* 容器样式 */
.container {
    max-width: 1200px;
    width: 90%;
    position: relative;
    margin: 160px auto 200px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 20%);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    overflow: visible;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
}

/* 主要内容区域样式 */
main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 打卡区域样式 */
.打卡区域,
.统计区域 {
    background-color: rgba(255, 255, 255, 9%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: white;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffffff66;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: white;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input[type="file"] {
    margin-top: 5px;
}

/* 下拉选择框样式 */
select {
    width: auto;
    min-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5a.5.5 0 0 1-.5-.5V3.707L3.354 7.854a.5.5 0 1 1-.708-.708l4-4a.5.5 0 0 1 .708 0l4 4a.5.5 0 0 1-.708.708L8.5 3.707V10a.5.5 0 0 1-.5.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

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

/* 按钮样式 */
.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #27ae60;
    color: white;
}

.btn-primary:hover {
    background-color: #2ecc71;
}

.btn-secondary {
    background-color: #e67e22;
    color: white;
}

.btn-secondary:hover {
    background-color: #f39c12;
}

.btn-submit {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.btn-submit:hover {
    background-color: #2980b9;
}

/* 统计区域样式 */
.统计卡片 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.统计项 {
    background-color: #00000054;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.统计项 h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}

.统计项 p {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* 表格样式 */
.打卡表格 {
    overflow-x: auto;
}

/* 图片预览样式 */
.图片预览 {
    width: 100px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 4px;
}

.图片预览:hover {
    transform: scale(1.05);
}

/* 图片放大查看器 */
.图片查看器 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.图片查看器内容 {
    max-width: 90%;
    max-height: 90%;
}

.关闭按钮 {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s;
}

.关闭按钮:hover {
    color: #bbb;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0 15px;
    text-align: left;
    border-bottom: 1px solid #ffffff66;
    height: 90px;
    vertical-align: middle;
}

th {
    background-color: #00000063;
    color: white;
    font-weight: bold;
}

tr {
    background-color: #00000040;
}

tr:nth-child(even) {
    background-color: #00000063;
}

tr:hover {
    background-color: #00000080;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .统计卡片 {
        grid-template-columns: 1fr;
    }

    .buttons {
        flex-direction: column;
    }

    header h1 {
        font-size: 2rem;
    }

    /* 导航栏响应式调整 */
    .nav-container {
        padding: 0 10px;
        height: 70px;
    }

    .logo img {
        width: 180px;
        height: 48px;
    }

    .nav-menu li {
        margin-left: 15px;
    }

    .nav-menu a {
        font-size: 12px;
    }

    .btn-download, .btn-login {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    th, td {
        padding: 8px;
        font-size: 14px;
    }

    /* 小屏幕导航栏调整 */
    .nav-container {
        height: 60px;
    }

    .logo img {
        width: 150px;
        height: 40px;
    }

    .nav-menu {
        display: none;
    }

    .nav-buttons {
        margin-left: auto;
    }

    .btn-download {
        display: none;
    }

    .btn-login {
        padding: 4px 10px;
        font-size: 12px;
    }
}

/* 图片预览样式 */
.图片预览 {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
}

/* 打卡状态样式 */
.打卡状态-已打卡 {
    color: #27ae60;
    font-weight: bold;
}

.打卡状态-未打卡 {
    color: #e74c3c;
    font-weight: bold;
}

.打卡状态-请假 {
    color: #f39c12;
    font-weight: bold;
}