/* 变量定义 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c9c3;
    --accent-color: #f5f5f5;
    --text-color: #222;
    --error-color: #ff4757;
    --success-color: #2ed573;
    --background-gradient: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    --card-background: rgba(255, 255, 255, 0.8);
    --container-padding: 2vw;
    --btn-background: rgba(0, 0, 0, 0.04);
    --btn-border: rgba(0, 0, 0, 0.08);
    --btn-hover: rgba(0, 0, 0, 0.08);
    --table-background: rgba(255, 255, 255, 0.7);
    --hover-background: rgba(0, 0, 0, 0.03);
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #4a90e2;
        --secondary-color: #50c9c3;
        --accent-color: #222;
        --text-color: #fff;
        --error-color: #ff4757;
        --success-color: #2ed573;
        --background-gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
        --card-background: rgba(0, 0, 0, 0.2);
        --container-padding: 2vw;
        --btn-background: rgba(255, 255, 255, 0.1);
        --btn-border: rgba(255, 255, 255, 0.2);
        --btn-hover: rgba(255, 255, 255, 0.2);
        --table-background: rgba(0, 0, 0, 0.1);
        --hover-background: rgba(255, 255, 255, 0.05);
    }
}

/* 基础布局 */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-gradient);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
}

/* 管理界面布局 */
.management-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.management-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1vw 2vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.management-nav a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: white;
    margin-left: 1vw;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.management-nav a:hover {
    opacity: 1;
}

.content-area {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5vw;
}

.action-group {
    display: flex;
    gap: 1vw;
    align-items: center;
}

/* 按钮样式 */
.button {
    min-width: 6.25vw;
    height: 2.375vw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9375vw;
    padding: 0 0.9375vw;
    background: var(--btn-background);
    color: var(--text-color);
    border: 0.0625vw solid var(--btn-border);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--btn-hover);
}

.button.primary {
    background: var(--primary-color);
    color: white;
}

.button.secondary {
    background: var(--secondary-color);
    color: white;
}

.button.danger {
    background: var(--error-color);
    color: white;
}

/* 表格样式 */
.table-container {
    background: var(--card-background);
    border-radius: 0.5vw;
    overflow: hidden;
}

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

.data-table th, 
.data-table td {
    padding: 1vw;
    text-align: center;
    border-bottom: 0.0625vw solid rgba(0,0,0,0.1);
}

.data-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.data-table tr:hover {
    background: var(--hover-background);
}

/* 状态标签 */
.status-published {
    color: var(--success-color);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.status-draft {
    color: var(--error-color);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 表单组件 */
.form-container {
    background: var(--card-background);
    border-radius: 0.5vw;
    padding: 2vw;
    max-width: 50vw;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5vw;
}

.input-group label {
    display: block;
    margin-bottom: 0.5vw;
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.input-control {
    width: 100%;
    padding: 0.75vw;
    border: 0.0625vw solid rgba(0,0,0,0.1);
    border-radius: 0.25vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 登录页面 */
.login-container,
.register-container {
    background: rgba(255,255,255,0.13);
    box-shadow: 0 0.5vw 2vw 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(1vw);
    -webkit-backdrop-filter: blur(1vw);
    border-radius: 1.125vw;
    padding: 3vw 2.25vw 2.25vw 2.25vw;
    max-width: 25vw;
    width: 100%;
    margin: 0 1vw;
    position: relative;
    z-index: 2;
    border: 0.0625vw solid rgba(255,255,255,0.18);
    animation: fadeIn 0.8s;
}

/* 统一表单样式 */
.login-form,
.register-form {
    margin-top: 1vw;
}

/* 统一按钮组样式 */
.login-form .action-group,
.register-form .action-group {
    display: flex;
    gap: 1vw;
    margin-top: 2vw;
}

/* 统一按钮样式 */
.login-form .button,
.register-form .button {
    flex: 1;
    height: 2.75vw;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1vw;
    font-weight: 500;
    border-radius: 0.625vw;
    transition: all 0.3s ease;
}

.login-form .button.primary,
.register-form .button.primary {
    background: linear-gradient(90deg, #4a90e2 0%, #50c9c3 100%);
    border: none;
    color: #fff;
}

.login-form .button.secondary,
.register-form .button.secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 0.0625vw solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.login-form .button:hover,
.register-form .button:hover {
    transform: translateY(-0.125vw);
    box-shadow: 0 0.25vw 0.75vw rgba(0, 0, 0, 0.15);
}

.login-form .button.primary:hover,
.register-form .button.primary:hover {
    background: linear-gradient(90deg, #50c9c3 0%, #4a90e2 100%);
}

.login-form .button.secondary:hover,
.register-form .button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 统一输入框样式 */
.login-form .input-group,
.register-form .input-group {
    margin-bottom: 1.5vw;
}

.login-form .input-control,
.register-form .input-control {
    width: 100%;
    height: 2.75vw;
    padding: 0 1vw;
    border-radius: 0.625vw;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1vw;
    transition: all 0.3s ease;
}

.login-form .input-control:focus,
.register-form .input-control:focus {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0.25vw 0.75vw rgba(0, 0, 0, 0.1);
}

/* 统一标签样式 */
.login-form label,
.register-form label {
    color: #fff;
    font-size: 0.9375vw;
    margin-bottom: 0.5vw;
    display: block;
    font-weight: 500;
}

/* 统一标题样式 */
.login-container h1,
.register-container h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 2vw;
    font-size: 2vw;
    font-weight: 700;
    letter-spacing: 0.125vw;
    text-shadow: 0 0.125vw 0.5vw rgba(0,0,0,0.15);
}

/* 消息提示 */
.flash-messages {
    margin-bottom: 1.25vw;
}

.flash-error {
    background: rgba(255, 71, 87, 0.2);
    color: var(--error-color);
    padding: 0.625vw;
    border-radius: 0.625vw;
    margin-bottom: 0.625vw;
    text-align: center;
    backdrop-filter: blur(0.3125vw);
    border: 0.0625vw solid rgba(255, 71, 87, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.flash-success {
    background: rgba(46, 213, 115, 0.2);
    color: white;
    padding: 0.625vw;
    border-radius: 0.625vw;
    margin-bottom: 0.625vw;
    text-align: center;
    backdrop-filter: blur(0.3125vw);
    border: 0.0625vw solid rgba(46, 213, 115, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.flash-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 0.625vw;
    border-radius: 0.625vw;
    margin-bottom: 0.625vw;
    text-align: center;
    backdrop-filter: blur(0.3125vw);
    border: 0.0625vw solid rgba(255, 193, 7, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.875vw;
    font-weight: 500;
}

.flash-info {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    padding: 0.625vw;
    border-radius: 0.625vw;
    margin-bottom: 0.625vw;
    text-align: center;
    backdrop-filter: blur(0.3125vw);
    border: 0.0625vw solid rgba(23, 162, 184, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(1.25vw); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 登录页面样式 */
body.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(0.625vw);
    border-radius: 1.25vw;
    padding: 2.5vw;
    box-shadow: 0 0.9375vw 2.1875vw rgba(0, 0, 0, 0.2);
    border: 0.0625vw solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-0.3125vw);
}

.login-box h1 {
    color: white;
    text-align: center;
    margin-bottom: 1.875vw;
    font-size: 1.5vw;
    font-weight: 600;
    text-shadow: 0 0.125vw 0.25vw rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-box .form-group {
    margin-bottom: 1.5625vw;
}

.login-box label {
    display: block;
    color: white;
    margin-bottom: 0.5vw;
    font-size: 0.875vw;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-box .form-control {
    width: 100%;
    padding: 0.75vw 0.9375vw;
    border: none;
    border-radius: 0.625vw;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1vw;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-box .form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0.625vw rgba(255, 255, 255, 0.1);
}

.login-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.login-box .btn {
    width: 100%;
    padding: 0.75vw;
    border: none;
    border-radius: 0.625vw;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1vw;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.login-box .btn:hover {
    transform: translateY(-0.125vw);
    box-shadow: 0 0.3125vw 0.9375vw rgba(0, 0, 0, 0.3);
}

.table-area-bg {
    flex: 1 1 auto;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

body.center-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 100%);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.login-container, .form-container {
    background: rgba(255,255,255,0.13);
    box-shadow: 0 0.5vw 2vw 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(1vw);
    -webkit-backdrop-filter: blur(1vw);
    border-radius: 1.125vw;
    padding: 3vw 2.25vw 2.25vw 2.25vw;
    max-width: 25vw;
    width: 100%;
    margin: 0 1vw;
    position: relative;
    z-index: 2;
    border: 0.0625vw solid rgba(255,255,255,0.18);
    animation: fadeIn 0.8s;
}

.login-container h1, .form-container h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 2vw;
    font-size: 2vw;
    font-weight: 700;
    letter-spacing: 0.125vw;
    text-shadow: 0 0.125vw 0.5vw rgba(0,0,0,0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.input-group {
    margin-bottom: 1.375vw;
}

.input-group label {
    color: #fff;
    font-size: 0.9375vw;
    margin-bottom: 0.5vw;
    display: block;
    font-weight: 500;
    letter-spacing: 0.0625vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.input-control {
    width: 100%;
    padding: 0.875vw 1vw;
    border-radius: 0.625vw;
    border: none;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1vw;
    margin-bottom: 0.125vw;
    outline: none;
    transition: background 0.3s, box-shadow 0.3s;
    box-shadow: 0 0.125vw 0.5vw rgba(0,0,0,0.05);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.input-control:focus {
    background: rgba(255,255,255,0.35);
    box-shadow: 0 0.25vw 1vw rgba(74,144,226,0.15);
}

.input-control::placeholder {
    color: #e0e0e0;
    opacity: 1;
}

.save-button-container {
    margin-top: 1.125vw;
    display: flex;
    justify-content: center;
}

.button.primary {
    width: 100%;
    padding: 0.875vw 0;
    border: none;
    border-radius: 0.625vw;
    background: linear-gradient(90deg, #4a90e2 0%, #50c9c3 100%);
    color: #fff;
    font-size: 1.0625vw;
    font-weight: 600;
    letter-spacing: 0.125vw;
    cursor: pointer;
    margin-top: 0.625vw;
    box-shadow: 0 0.125vw 0.5vw rgba(74,144,226,0.15);
    transition: background 0.3s, transform 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.button.primary:hover {
    background: linear-gradient(90deg, #50c9c3 0%, #4a90e2 100%);
    transform: translateY(-0.125vw) scale(1.03);
}

/* 修改密码弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(255,255,255,0.13);
    box-shadow: 0 0.5vw 2vw 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(1vw);
    border-radius: 1.125vw;
    padding: 2.25vw 2vw 1.75vw 2vw;
    min-width: 21.25vw;
    max-width: 90vw;
    border: 0.0625vw solid rgba(255,255,255,0.18);
    animation: fadeIn 0.4s;
    color: #fff;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5vw;
    font-size: 1.5vw;
    font-weight: 700;
    letter-spacing: 0.125vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Switch 开关样式 for 轮播广告 */
.switch {
  position: relative;
  display: inline-block;
  width: 2.75vw;
  height: 1.5vw;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 1.5vw;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.125vw;
  width: 1.125vw;
  left: 0.1875vw;
  bottom: 0.1875vw;
  background-color: white;
  border-radius: 50%;
  transition: .4s;
}

.switch input:checked + .slider {
  background-color: #4a90e2;
}

.switch input:checked + .slider:before {
  transform: translateX(1.25vw);
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 0.375vw;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.5);
    border-radius: 0.1875vw;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.8);
}

/* 深色模式滚动条 */
@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(74, 144, 226, 0.3);
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(74, 144, 226, 0.5);
    }
}

/* 通用图片样式 */
.preview-img,
.recommend-cover img,
.carousel-bg.upload-area img,
.icon-upload img,
.image-upload img,
.video-upload img,
.upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.05);
}

/* 通用上传区域样式 */
.upload-area {
    position: relative;
    border: 0.125vw dashed var(--primary-color, #4a90e2);
    border-radius: 0.5vw;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    box-sizing: border-box;
    overflow: hidden;
}

.upload-area.dragover {
    border-color: var(--primary-color, #1976d2);
    background: var(--accent-color, #e3f2fd);
}

/* 通用占位符样式 */
.preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--main-text);
    text-align: center;
    padding: 1.25vw;
    border-radius: 0.5vw;
    background: transparent;
    z-index: 2;
}

.preview-placeholder i {
    font-size: 2vw;
    margin-bottom: 0.75vw;
    color: #999;
}

.preview-placeholder p {
    margin: 0.25vw 0;
    font-size: 0.875vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.preview-placeholder .help-text {
    color: var(--secondary-text);
    font-size: 0.75vw;
    font-family: -apple-system;
}

/* 删除图片按钮样式 */
.delete-image {
    position: absolute;
    top: 0.5vw;
    right: 0.5vw;
    z-index: 2;
    background: rgba(255,71,87,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 1.625vw;
    height: 1.625vw;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.delete-image:hover {
    background: #ff4757;
}

/* 上传区域尺寸 */
.carousel-bg.upload-area {
    height: 20vw;
}

.recommend-cover.upload-area {
    width: 20vw;
    height: 11.25vw;
}

/* 后台管理界面样式 */
main {
    flex: 1;
}

/* 导航栏样式 */
.navbar-brand i {
    color: #ffc107;
}

/* 卡片样式 */
.card {
    box-shadow: 0 0.125vw 0.25vw rgba(0, 0, 0, 0.075);
    margin-bottom: 1vw;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 表格样式 */
.table th {
    background-color: #f8f9fa;
}

/* 按钮组样式 */
.btn-group .btn {
    margin-right: 0.25vw;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 页脚样式 */
.admin-footer {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(0.5vw);
    padding: 1.5vw 0;
    border-top: 0.0625vw solid rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    border-radius: 0 0 0.75vw 0.75vw;
}

.admin-footer-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 2vw;
    box-sizing: border-box;
}

.admin-footer-text {
    color: #6c757d;
    font-size: 1vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .admin-footer {
        background: rgba(0, 0, 0, 0.2);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .admin-footer-text {
        color: #adb5bd;
    }
}

/* 确保页面布局正确，避免内容被固定页脚遮挡 */
body {
    padding-bottom: 0;
}

/* 为所有可能被遮挡的内容添加底部间距 */
.container-fluid,
.container,
.row,
.col,
.col-12 {
    margin-bottom: 0;
}

/* 认证标签样式 */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 1vw;
    margin-bottom: 1.5vw;
}

.auth-tab {
    padding: 0.5vw 2vw;
    border-radius: 1.25vw;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 0.0625vw solid var(--bs-border-color);
    transition: all 0.3s ease;
}

.auth-tab:hover {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.auth-tab.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .auth-tab {
        background-color: var(--bs-dark);
        border-color: var(--bs-border-color);
    }
    
    .auth-tab:hover {
        background-color: var(--bs-primary-bg-subtle);
    }
}

/* 统一认证容器样式 */
.auth-container {
    background: rgba(255,255,255,0.13);
    box-shadow: 0 0.5vw 2vw 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(1vw);
    -webkit-backdrop-filter: blur(1vw);
    border-radius: 1.125vw;
    padding: 3vw 2.25vw 2.25vw 2.25vw;
    max-width: 25vw;
    width: 100%;
    margin: 0 1vw;
    position: relative;
    z-index: 2;
    border: 0.0625vw solid rgba(255,255,255,0.18);
    animation: fadeIn 0.8s;
}

/* 统一表单样式 */
.auth-form {
    margin-top: 1vw;
}

/* 统一按钮组样式 */
.auth-form .action-group {
    display: flex;
    gap: 1vw;
    margin-top: 2vw;
}

/* 统一按钮样式 */
.auth-form .button {
    flex: 1;
    height: 2.75vw;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1vw;
    font-weight: 500;
    border-radius: 0.625vw;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    border: none;
}

.auth-form .button.primary {
    background: linear-gradient(90deg, #4a90e2 0%, #50c9c3 100%);
    color: #fff;
}

.auth-form .button.secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 0.0625vw solid rgba(255, 255, 255, 0.3);
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

.auth-form .button:hover {
    transform: translateY(-0.125vw);
    box-shadow: 0 0.25vw 0.75vw rgba(0, 0, 0, 0.15);
}

.auth-form .button.primary:hover {
    background: linear-gradient(90deg, #50c9c3 0%, #4a90e2 100%);
}

.auth-form .button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 统一输入框样式 */
.auth-form .input-group {
    margin-bottom: 1.5vw;
}

.auth-form .input-control {
    width: 100%;
    height: 2.75vw;
    padding: 0 1vw;
    border-radius: 0.625vw;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1vw;
    transition: all 0.3s ease;
}

.auth-form .input-control:focus {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0.25vw 0.75vw rgba(0, 0, 0, 0.1);
}

/* 统一标签样式 */
.auth-form label {
    color: #fff;
    font-size: 0.9375vw;
    margin-bottom: 0.5vw;
    display: block;
    font-weight: 500;
}

/* 统一标题样式 */
.auth-container h1 {
    color: #fff;
    text-align: center;
    margin-bottom: 2vw;
    font-size: 2vw;
    font-weight: 700;
    letter-spacing: 0.125vw;
    text-shadow: 0 0.125vw 0.5vw rgba(0,0,0,0.15);
}

/* 管理后台导航栏样式 - 使用VW单位 */
.admin-navbar {
    background: rgba(0, 0, 0, 0.2);
    padding: 1vw 2vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(0.5vw);
    -webkit-backdrop-filter: blur(0.5vw);
    border-bottom: 0.0625vw solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1001;
}

.admin-navbar-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.admin-navbar-brand {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: white;
    text-decoration: none;
    font-size: 1.25vw;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5vw;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.admin-navbar-brand:hover {
    opacity: 1;
    color: white;
    text-decoration: none;
}

.admin-navbar-brand i {
    font-size: 1.5vw;
    color: #ffc107;
}

.admin-navbar-menu {
    display: flex;
    align-items: center;
    gap: 2vw;
}

.admin-navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5vw;
    align-items: center;
}

.admin-navbar-user {
    margin-left: auto;
}

.admin-nav-item {
    position: relative;
}

.admin-nav-link {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: white;
    text-decoration: none;
    padding: 0.5vw 1vw;
    border-radius: 0.25vw;
    display: flex;
    align-items: center;
    gap: 0.5vw;
    opacity: 0.8;
    transition: all 0.3s;
    font-size: 0.875vw;
}

.admin-nav-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.admin-nav-link i {
    font-size: 1vw;
}

.admin-user-badge {
    background: #17a2b8;
    color: white;
    padding: 0.125vw 0.5vw;
    border-radius: 0.25vw;
    font-size: 0.75vw;
    margin-left: 0.5vw;
    font-weight: 500;
}

/* 下拉菜单样式 */
.admin-nav-dropdown {
    position: relative;
}

.admin-dropdown-toggle {
    cursor: pointer;
}

.admin-dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 0.5vw;
    vertical-align: middle;
    border-top: 0.25vw solid;
    border-right: 0.25vw solid transparent;
    border-left: 0.25vw solid transparent;
}

.admin-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0.5vw);
    border-radius: 0.5vw;
    box-shadow: 0 0.25vw 1vw rgba(0, 0, 0, 0.15);
    min-width: 12vw;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5vw);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5vw;
    padding: 0.5vw 0;
    list-style: none;
}

.admin-nav-dropdown:hover .admin-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 通过JavaScript控制的显示状态 */
.admin-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单激活状态 */
.admin-dropdown-toggle.active {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5vw;
    padding: 0.75vw 1vw;
    color: #333;
    text-decoration: none;
    font-size: 0.875vw;
    transition: background 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.admin-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    text-decoration: none;
}

.admin-dropdown-item i {
    font-size: 1vw;
    width: 1vw;
    text-align: center;
}

.admin-dropdown-divider {
    height: 0.0625vw;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5vw 0;
}

/* 主要内容区域 */
.admin-main {
    padding: 2vw;
    flex: 1;
    min-height: calc(100vh - 8vw);
}

/* Toastr消息提示样式 */
#toast-container {
    position: fixed !important;
    top: 1.25vw !important;
    right: 18.75vw !important;
    z-index: 9999 !important;
}

/* 成功消息样式 */
#toast-container .toast-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border-left: 4px solid #155724 !important;
}

/* 错误消息样式 */
#toast-container .toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
    color: white !important;
    border-left: 4px solid #721c24 !important;
}

/* 警告消息样式 */
#toast-container .toast-warning {
    background: linear-gradient(135deg, #ffc107, #f39c12) !important;
    color: #212529 !important;
    border-left: 4px solid #856404 !important;
}

/* 信息消息样式 */
#toast-container .toast-info {
    background: linear-gradient(135deg, #17a2b8, #3498db) !important;
    color: white !important;
    border-left: 4px solid #0c5460 !important;
}

/* 确保Toastr不被其他样式覆盖 */
.toast-top-right {
    top: 1.25vw !important;
    right: 18.75vw !important;
    left: auto !important;
}

/* 红点消息样式 */
.pending-orders-badge,
.pending-withdrawals-badge {
    position: absolute;
    top: -0.3125vw;
    right: -0.3125vw;
    font-size: 0.75vw;
    padding: 0.3125vw 0.5vw;
    border-radius: 0.375vw;
    background-color: #dc3545 !important;
    color: white !important;
    min-width: 1.125vw;
    text-align: center;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
