/* ----------------------------------------------
   原有样式（保持不变）
---------------------------------------------- */
/* 全局样式 */
@font-face {
    font-family: 'CustomFont';
    src: url('dd.ttf') format('truetype');
}



body {
    font-family: 'CustomFont', sans-serif;
    background-image: url('bg.png');
    background-size: cover;
    background-position: center;
    color: #333;
    margin: 0;
    padding: 0;
    display: block;
}
button {
    font-family: 'CustomFont', sans-serif !important;
}
/* ============ Index.php专项调整 ============ */
.login-container {
    /* 保持原始功能 */
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 40px;
    
    /* ▼▼▼ 修改开始 ▼▼▼ */
    width: 100%;
    max-width: 400px;
    margin: 40px 20px !important; /* ▲ 强制左右20px边距 */
    position: relative;
    left: 50%;                     /* ▲ 新增横向居中 */
    transform: translateX(-50%);    /* ▲ 新增横向居中 */
    /* ▼▼▼ 原始样式保留 ▼▼▼ */
    display: block;
    
    /* 移除旧有样式 */
    /* ▲ 原margin-left/margin-right: 20px 已取消 */
}

/* 新增：Logo 样式 */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-image {
    max-width: 100%;
    height: auto;
    width: 150px; /* 调整宽度 */
    display: block;
    margin: 0 auto;
}

.login-container h1 {
    color: #6a1b9a;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
    font-size: 16px;
}

/* 为输入框和按钮加上 box-sizing */
.login-container input[type="text"],
.login-container button {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

/* 输入框样式 */
.login-container input[type="text"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 5px;
}

/* 按钮样式 */
button {
    padding: 12px;
    font-size: 18px;
    background: linear-gradient(to right, #8e44ad, #9b59b6);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background: linear-gradient(to right, #9b59b6, #8e44ad);
}

/* ============ Register.php专有样式 ============ */
.success-container {
    background-color: rgba(154, 58, 168, 0.5);
    color: white;
    padding: 30px;
    text-align: center;
    
    /* ▼▼▼ 修改开始 ▼▼▼ */
    width: calc(100% - 60px) !important; /* ▲ 左侧30px + 右侧30px */
    max-width: none !important;         /* ▲ 解除原有宽度限制 */
    margin: 40px 30px !important;       /* ▲ 四周边距30px */
    /* ▼▼▼ 原始样式保留 ▼▼▼ */
    box-sizing: border-box;
    display: block;
    border-radius: 10px;
}
/* ▼▼▼ 新增保护样式 ▼▼▼ */
.logo-image {
    width: 250px !important;
    height: auto !important;
    max-width: none !important;
}

.qr-code {
    width: 250px !important;
    height: 250px !important;
    max-width: none !important;
}

.success-container h1 {
    font-size: 24px;
}

.success-container p {
    font-size: 18px;
    margin-top: 20px;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin-top: 20px;
}

/* 上传功能容器（表格菜单），透明度 50% */
.upload-form-container {
    width: 100%;
    max-width: 500px;
    margin: 40px auto 20px auto;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* 上传表格 */
.upload-form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px; /* 四周留30像素边距 */
}

.upload-form-table thead th.table-title {
    text-align: center;
    background-color: #6a1b9a;
    color: #fff;
    padding: 15px;
    font-size: 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.upload-form-table tbody tr td {
    padding: 15px;
    vertical-align: middle;
}

/* 进度条容器 */
#progress-container {
    width: 100%;
    background: #eee;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

#progress-bar {
    height: 20px;
    width: 0%;
    background-color: #8e44ad;
    border-radius: 5px;
    text-align: center;
    color: #fff;
    line-height: 20px;
}

/* 已上传图片列表容器，透明度 50% */
.image-list-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
}

.image-list-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #6a1b9a;
}

/* 图片列表表格 */
.image-table {
    width: 100%;
    border-collapse: collapse;
}

.image-table th,
.image-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.image-table th {
    background-color: #6a1b9a;
    color: white;
}

/* 预览图按比例缩放，不拉伸 */
.preview-img {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
    transition: transform 0.2s;
}

.preview-img:hover {
    transform: scale(1.05);
}

/* 二维码缩略图 */
.qr-thumb {
    width: 100px;
    height: auto;
    border-radius: 5px;
    transition: transform 0.2s;
}

.qr-thumb:hover {
    transform: scale(1.05);
}

/* 管理员悬浮菜单按钮 */
.admin-menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #9b59b6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    font-size: 24px;
}

/* ----------------------------------------------
   新增：顶部栏 (topbar) 样式，类似 Windows 开始菜单
---------------------------------------------- */
/* ------------------------------
   顶部栏 (topbar) 样式
------------------------------ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.5); /* 半透明 */
    display: flex;
    align-items: center;           /* 垂直居中 */
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 9999;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;           /* 确保垂直居中 */
    gap: 15px;
    height: 60px;
    white-space: nowrap;
}

.topbar-text {
    color: #fff;
    display: flex;
    align-items: center;
    line-height: 60px;
    white-space: nowrap;
}

/* “开始”菜单按钮 */
.menu-button {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    line-height: 40px;
    position: relative;
    white-space: nowrap;
}
.menu-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 下拉菜单 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 6px;
    flex-direction: column;
    gap: 10px;
    min-width: 120px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* 下拉菜单项 */
.dropdown-item {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 为页面主要内容留出顶部空间 */
.upload-form-container,
.image-list-container,
.login-container,
.success-container {
    margin-top: 80px;
}

/* ▼▼▼ 响应式调整-修改部分 ▼▼▼ */
@media (max-width: 767px) {
    /* 手机端：登录容器 */
    .login-container {
        margin: 40px 20px !important; /* ▲ 保持边距 */
        padding: 20px;
        left: 0;                    /* ▲ 撤销横向偏移 */
        transform: none;            /* ▲ 恢复常规布局 */
        width: calc(100% - 40px) !important;
        max-width: 100%;
    }
    
    /* 手机端：成功页面 */
    .success-container {
        margin: 30px 15px !important; /* ▲ 边距减半 */
        width: calc(100% - 30px) !important;
        padding: 20px;
    }
    
    /* 手机端：二维码调整 */
    .qr-code {
        width: 180px !important;   /* ▲ 仅在手机端缩小 */
        height: 180px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* 平板端：登录居中 */
    .login-container {
        left: 50%;              /* ▲ 恢复居中 */
        transform: translateX(-50%);
    }
}