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

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

.users-cards-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.users-cards-container::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: #e0e0e0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/wallpaper');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.3;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b0b0b0;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-align: center;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4fd1c7;
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* 数量控制器样式 */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-controls input {
    border: none;
    background: transparent;
    text-align: center;
    flex: 1;
    padding: 12px 15px;
    margin: 0;
    border-radius: 0;
}

.quantity-controls input:focus {
    border: none;
    box-shadow: none;
    background: transparent;
}

.quantity-btn {
    background: rgba(79, 209, 199, 0.8);
    color: #ffffff;
    border: none;
    padding: 12px 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: rgba(79, 209, 199, 1);
    transform: scale(1.05);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4fd1c7 0%, #3b82a0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform 0.25s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #e55353 100%);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4fd1c7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-glass:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 统计卡片中的按钮样式 */
.stat-card .stat-details .btn {
    margin: 4px;
    padding: 6px 12px;
    font-size: 12px;
    min-width: 80px;
}

/* 管理界面 */
.tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    gap: 4px;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    flex: 1;
    text-align: center;
    letter-spacing: 0.5px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tab-button.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%) !important;
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.4) !important;
    transform: translateY(-1px) !important;
}

.tab-button:focus {
    outline: none;
}

.tab-button:active:not(.active) {
    transform: translateY(0);
}

.tab-icon {
    font-size: 16px;
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.tab-text {
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.tab-button.active .tab-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .tab-text {
        display: none;
    }

    .tab-icon {
        margin-right: 0;
        font-size: 20px;
    }

    .tab-button {
        padding: 14px 20px;
        min-width: 60px;
        font-size: 12px;
        border-radius: 14px;
        flex: 1;
        max-width: none;
    }

    .tabs {
        margin-bottom: 20px;
        padding: 5px;
        border-radius: 18px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* 手机端专用优化 */
@media (max-width: 480px) {
    .tab-button {
        padding: 12px 18px;
        min-width: 55px;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
    }

    .tab-icon {
        font-size: 18px;
    }

    .tabs {
        padding: 4px;
        margin-bottom: 15px;
        border-radius: 16px;
    }

    .tab-button.active {
        transform: translateY(-1px) !important;
        box-shadow: 0 3px 12px rgba(26, 54, 93, 0.4) !important;
    }

    .tab-button:active:not(.active) {
        transform: translateY(0) scale(0.95) !important;
        background: rgba(255, 255, 255, 0.08) !important;
        transition: all 0.1s ease !important;
    }

    .btn {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation;

        min-height: 44px;
    }

    .user-card, .stat-card {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation;
    }

    input, textarea, select {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: manipulation;
        min-height: 44px;
    }
}

/* 超小屏幕专用优化 */
@media (max-width: 375px) {
    .tabs {
        padding: 3px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    .tab-button {
        padding: 10px 15px;
        min-width: 50px;
        border-radius: 10px;
    }

    .tab-icon {
        font-size: 16px;
    }

    .tab-button.active {
        box-shadow: 0 2px 8px rgba(26, 54, 93, 0.35) !important;
    }
}

.tab-content {
    display: none;
}

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

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

th {
    background: rgba(248, 249, 250, 0.6) !important;
    font-weight: 600;
    color: #333;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

tr:hover {
    background: rgba(248, 249, 250, 0.6);
    backdrop-filter: blur(5px);
}

/* 卡密兑换页面 */
.redeem-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.redeem-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.redeem-box h2 {
    margin-bottom: 30px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.code-input {
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}

.result-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1;
        min-width: 120px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px 8px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group input {
        padding: 12px 15px;
        font-size: 16px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
    }

    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
        width: auto;
        min-width: 100px;
    }
}

/* 小屏手机端进一步优化 */
@media (max-width: 480px) {
    .form-group {
        margin-bottom: 15px;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 15px;
    }

    .btn-secondary {
        padding: 8px 15px;
        font-size: 13px;
        min-width: 80px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.search-box {
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #4fd1c7;
    box-shadow: 0 0 0 3px rgba(79, 209, 199, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.search-box input::placeholder {
    color: #888;
}

/* 卡密筛选按钮 */
.card-filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-filter {
    padding: 8px 16px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    white-space: nowrap;
    min-width: auto !important;
    height: auto !important;
}

.btn-filter:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

.resolution-btn,
.renew-input {
    border-radius: 10px !important;
}

.btn-filter.active {
    background: linear-gradient(135deg, #4fd1c7, #36b3a8) !important;
    color: #ffffff !important;
    border-color: #4fd1c7 !important;
    box-shadow: 0 2px 8px rgba(79, 209, 199, 0.3);
}

.btn-filter.active:hover {
    background: linear-gradient(135deg, #5dd9cf, #3ec4b8) !important;
    transform: translateY(-2px);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.status-active {
    background: rgba(212, 237, 218, 0.8);
    color: #155724;
}

.status-inactive {
    background: rgba(248, 215, 218, 0.8);
    color: #721c24;
}

.status-used {
    background: rgba(255, 243, 205, 0.8);
    color: #856404;
}

.status-unused {
    background: rgba(209, 236, 241, 0.8);
    color: #0c5460;
}

.status-banned {
    background: rgba(248, 215, 218, 0.8);
    color: #721c24;
}

/* 玻璃效果 */
.admin-container,
table {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

table th {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

table tr:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* 移动端触摸反馈优化 */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    outline: none !important;
}

/* 允许特定元素选择文本 */
input, textarea, .selectable {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* 全局触摸优化 */
button, a, [onclick], [role="button"], .clickable {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    touch-action: manipulation;
    cursor: pointer;
}

/* 暗夜模式强化样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 209, 199, 0.5) rgba(255, 255, 255, 0.1);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4fd1c7 0%, #3b82a0 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5ae2d8 0%, #4a93b1 100%);
}

/* 选中文本样式 */
::selection {
    background: rgba(79, 209, 199, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(79, 209, 199, 0.3);
    color: #ffffff;
}

/* 护眼增强 - 已合并到 body::before 壁纸配置中 */

/* 仪表盘样式 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    margin: 0;
}

.user-info-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.user-avatar {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 209, 199, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(79, 209, 199, 0.3);
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.user-details h3 {
    color: #ffffff;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid rgba(79, 209, 199, 0.5);
    border-radius: 15px;
    padding: 10px 20px;
    text-align: center;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
}

.user-details p {
    color: #b0b0b0;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.user-role {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-role.admin {
    background: rgba(79, 209, 199, 0.2);
    color: #4fd1c7;
    border: 1px solid rgba(79, 209, 199, 0.3);
    transition: all 0.3s ease;
}

.user-role.admin:hover {
    background: rgba(79, 209, 199, 0.3);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(79, 209, 199, 0.3);
}

.user-role.user {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* 创建管理员提示卡片样式 */
#admin-setup-card {
    margin-bottom: 40px !important;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 209, 199, 0.15);
    border-radius: 15px;
    border: 2px solid rgba(79, 209, 199, 0.25);
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.stat-content {
    flex: 1;
    text-align: center;
    width: 100%;
}

.stat-content h3 {
    color: #ffffff;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #4fd1c7;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(79, 209, 199, 0.3);
}

.stat-number.warning {
    color: #ff6b6b;
    text-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.stat-details {
    display: none;
}

/* 设置页面stat-details */
.settings-page .stat-details {
    display: block !important;
}

/* 设置页面输入框和按钮 */
.settings-page .form-group {
    display: block !important;
}

.settings-page input {
    display: block !important;
}

.settings-page button {
    display: inline-block !important;
}

/* 推广计划卡片样式 */
.invite-card {
    cursor: pointer;
}

/* 卡片图标悬停动画 */
.stat-card:hover .stat-icon {
    transform: rotate(15deg) scale(1.2);
}

.stat-card:active .stat-icon {
    transform: rotate(10deg) scale(1.1);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.modal-dialog {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 0 rgba(255, 255, 255, 0.2) inset;
    position: relative;
    overflow: hidden;
    margin: auto;
}

/* 模态框装饰效果 */
.modal-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

.modal-overlay.show .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 0;
    border: none;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    font-size: 52px;
    margin: 0;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
    text-align: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-align: center;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: absolute;
    right: -8px;
    top: -8px;
    border-radius: 50%;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 0;
    margin-bottom: 28px;
    text-align: left;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
}

.modal-body input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* 隐藏number类型输入框的上下箭头 */
.modal-body input[type="number"]::-webkit-outer-spin-button,
.modal-body input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-body input[type="number"] {
    -moz-appearance: textfield;
}

.modal-body input:focus {
    border-color: rgba(64, 158, 255, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 4px rgba(64, 158, 255, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

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

.modal-body small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    margin-top: 6px;
    font-style: italic;
}

/* 切换按钮组样式 */
.toggle-buttons {
    display: flex;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.toggle-btn:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #f56c6c 0%, #e74c3c 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(245, 108, 108, 0.3);
}

.toggle-btn.active:first-child {
    background: linear-gradient(135deg, #909399 0%, #6c757d 100%);
}

.toggle-btn.active:last-child {
    background: linear-gradient(135deg, #67c23a 0%, #5dade2 100%);
}

.modal-footer {
    padding: 0;
    border: none;
    display: flex;
    gap: 0;
    justify-content: center;
}

.modal-footer .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.modal-footer .btn-secondary {
    margin-right: 10px;
}

.modal-footer .btn-primary {
    display: none;
}

.stat-item {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.stat-item span {
    color: #e0e0e0;
    font-weight: 600;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.system-info {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.system-info h3 {
    color: #ffffff;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 8px;
}

.info-label {
    color: #b0b0b0;
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value {
    color: #e0e0e0;
    font-weight: 600;
}

.status-online {
    color: #51cf66 !important;
    text-shadow: 0 1px 3px rgba(81, 207, 102, 0.3);
}

/* 中等屏幕：平板横屏 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }
}

/* 小屏幕：平板竖屏和手机 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin-bottom: 20px;
        padding: 15px;
    }

    .dashboard-header h1 {
        font-size: 0;
        margin-bottom: 0;
        line-height: 1;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .dashboard-header h1::first-letter {
        font-size: 3rem;
    }

    .user-info-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
        gap: 15px;
        padding: 20px;
        min-height: auto;
    }

    .stat-icon {
        font-size: 2rem;
        flex-shrink: 0;
    }

    .stat-content {
        flex: 1;
    }

    .stat-content h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .stat-details {
        font-size: 0.8rem;
    }

    .dashboard-actions {
        flex-direction: column;
        align-items: center;
    }

    .dashboard-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* 表格行悬停效果 */
tr {
    transition: background 0.3s ease !important;
}

tr:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(5px) !important;
}

/* 按钮组柔和悬停效果 */
.btn-group .btn {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                z-index 0.1s ease;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
    z-index: 2;
}

/* 移动端模态框优化 */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        padding: 24px;
        border-radius: 16px;

        -webkit-overflow-scrolling: touch;
        transform: scale(0.9);
    }

    .modal-overlay.show .modal-dialog {
        transform: scale(1) !important;
    }
}

/* 输入框焦点效果 */
.search-box input:focus {
    box-shadow: 0 0 0 2px rgba(79, 209, 199, 0.3) !important;
}

.form-group input, .search-box input {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-group input:focus, .search-box input:focus {

    transform: scale(1.005);
    box-shadow:
        0 0 0 2px rgba(79, 209, 199, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 底部导航栏 */
.bottom-navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 12px 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 导航栏自动隐藏状态 */
.bottom-navigation.auto-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

/* 导航栏显示状态 */
.bottom-navigation.auto-show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.bottom-navigation:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4fd1c7 0%, #26a69a 100%);
    color: white;
    text-decoration: none;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.25s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(79, 209, 199, 0.3);
}

.nav-button:hover {
    transform: translateY(-2px);
}

.nav-button.active {
    background: linear-gradient(135deg, #26a69a 0%, #1a7a6e 100%);
    box-shadow: 0 2px 10px rgba(38, 166, 154, 0.4);
}

.nav-button .nav-icon {
    font-size: 1.1rem;
}

.nav-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}

.nav-text {
    font-weight: 500;
}

/* 登录页面隐藏底部导航 */
.login-page .bottom-navigation {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .bottom-navigation {
        bottom: 15px;
        padding: 10px 15px;
        gap: 12px;
    }

    .nav-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .nav-button .nav-text {
        display: none;
    }

    .nav-button .nav-icon {
        font-size: 1.2rem;
    }
}

/* 卡密兑换成功对话框样式 */
.redeem-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.redeem-success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.redeem-success-dialog {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.redeem-success-overlay.show .redeem-success-dialog {
    transform: scale(1) translateY(0);
}

.redeem-success-icon {
    font-size: 56px;
    color: #4CAF50;
    margin-bottom: 16px;
    display: block;
}

.redeem-success-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.redeem-success-message {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.redeem-warning {
    font-size: 13px;
    color: #ffc107;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.emby-sync-success {
    font-size: 13px;
    color: #4CAF50;
    margin: 8px 0;
    padding: 6px 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.emby-sync-failed {
    font-size: 13px;
    color: #ff9800;
    margin: 8px 0;
    padding: 6px 10px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.redeem-success-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.redeem-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    border: 1px solid;
    min-width: 100px;
}

.redeem-btn-copy {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    color: #4CAF50;
}

.redeem-btn-copy:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .redeem-success-dialog {
        padding: 24px;
        margin: 20px;
    }

    .redeem-success-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }

    .redeem-success-title {
        font-size: 20px;
    }

    .redeem-success-message {
        font-size: 14px;
    }

    .redeem-warning {
        font-size: 12px;
    }

    .redeem-btn {
        width: 100%;
        padding: 14px 24px;
    }
}

/* 系统设置页面样式 */
.settings-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}

.settings-section h3 {
    color: #4fd1c7;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* 用户卡片样式 */
.users-cards-container {
    margin-top: 20px;
}

.users-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* 限制区域分组 */
.limit-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.limit-section .section-title {
    font-size: 18px;
    color: #2196F3;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2196F3;
    grid-column: 1 / -1;
}

/* 空状态时的特殊样式 */
.users-cards-grid.empty-state,
.users-cards-grid:has(> p:only-child),
.users-cards-grid:has(> div.stat-item:only-child),
.users-cards-grid:has(> div.empty-state:only-child),
.users-cards-grid:has(> div.loading-placeholder:only-child) {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 200px !important;
    grid-template-columns: none !important;
}

.users-cards-grid > p:only-child,
.users-cards-grid > div.stat-item:only-child,
.users-cards-grid > div.empty-state {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin: 0;
}

.user-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.user-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.user-card .user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4fd1c7 0%, #3b82a0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.user-info {
    flex-grow: 1;
    text-align: left;
}

.user-info h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.user-id {
    color: #b0b0b0;
    font-size: 12px;
    text-align: left;
}

.user-status {
    flex-shrink: 0;
}

/* 确保用户卡片中的用户名左对齐 */
.user-card .user-info,
.user-card .user-info h3,
.user-card .user-id {
    text-align: left !important;
}

.user-card-body {
    margin-bottom: 20px;
}

.user-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-detail:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #b0b0b0;
    font-size: 14px;
}

.detail-value {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.admin-yes {
    color: #51cf66 !important;
}

.admin-no {
    color: #ff6b6b !important;
}

.user-card-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
}

.user-card-actions .btn {
    width: auto;
    min-width: 70px;
}

/* 用户管理和卡密管理区域 */
#users-tab .stat-card,
#cardcodes-tab .stat-card {
    transition: none;
}

/* 正在播放选项卡 */
#nowplaying-tab .stat-card:hover {
    transform: none;
}

/* 正在播放卡片海报样式 */
.playing-card .user-card-poster {
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.playing-card .user-card-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #1a1a1a, #2a2a2a, #1a1a1a, #2a2a2a);
    background-size: 400% 400%;
    animation: posterLoading 2s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.playing-card .user-card-poster.loaded::before {
    opacity: 0;
}

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

.playing-card .poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    position: relative;
    z-index: 2;
}

.playing-card .poster-image.loaded {
    opacity: 1;
    transform: scale(1.05);
}

/* 有海报时调整卡片布局 */
.playing-card .user-card-header {
    margin-top: 8px;
    margin-bottom: 0;
    min-height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* 标题文字溢出处理 */
.playing-card .user-card-name {
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.playing-card .user-card-details {
    padding-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* 固定每个信息行的高度 */
.playing-card .user-card-info {
    height: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
}

/* 信息文字溢出处理 */
.playing-card .user-card-info .value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* 播放卡片样式 */
.playing-card .user-card-status.playing {
    background: rgba(76, 175, 80, 0.2);
    color: #4fd1c7;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.playing-card .user-card-status.paused {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.playing-card .user-card-status.online {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.playing-card .playing-progress {
    font-weight: 600;
    color: #4fd1c7;
}

/* 移动端卡片优化 */
@media (max-width: 768px) {
    #admin-setup-card {
        margin: 0 15px 35px 15px !important;
    }

    .users-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        justify-items: center;
        max-width: 100%;
    }

    .user-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .users-cards-container {
        margin-top: 15px;
        text-align: center;
    }

    .toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .search-box {
        max-width: 100%;
        order: 1;
    }

    .card-filter-buttons {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .btn-filter {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-width: auto !important;
    }

    .toolbar .btn {
        order: 3;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 0;
        margin-bottom: 0;
        line-height: 1;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .dashboard-header h1::first-letter {
        font-size: 2.5rem;
    }

    #admin-setup-card {
        margin: 0 10px 30px 10px !important;
    }

    .stats-grid {
        padding: 0 10px;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 10px;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .toolbar {
        padding: 10px;
        gap: 10px;
    }

    .card-filter-buttons {
        gap: 6px;
    }

    .btn-filter {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    .users-cards-grid {
        padding: 10px;
        gap: 10px;
    }

    .user-card {
        padding: 15px;
    }

    .user-card-header h3 {
        font-size: 1rem;
    }

    .detail-label, .detail-value {
        font-size: 0.8rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;

        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-card-actions {
        gap: 8px;
        margin-top: 10px;
    }

    .user-card-actions .btn {
        flex: 1;
        min-height: 40px;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: 400px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-group input,
    .form-group select {
        padding: 12px 15px;

        font-size: 16px;
        min-height: 44px;
    }

    .user-info h3 {
        font-size: 16px;
    }

    .user-detail {
        font-size: 14px;
    }

    .user-card-actions .btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* 进度条样式 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    height: 20px;
    flex-shrink: 0;
}

/* 卡密类型选择卡片样式 */
.card-type-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 单个元素时居中显示 */
.card-type-selection:has(.card-type-option:only-child) {
    grid-template-columns: 1fr;
    max-width: 200px;
}

/* 两个元素时使用2列 */
.card-type-selection:has(.card-type-option:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
}

.card-type-option {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-type-option:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 209, 199, 0.6);
}

.card-type-option.selected,
.card-type-option.active {
    border-color: #4fd1c7;
    background: rgba(79, 209, 199, 0.15);
    box-shadow: 0 0 20px rgba(79, 209, 199, 0.3);
}

.card-type-option.selected::before,
.card-type-option.active::before {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #4fd1c7;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.card-type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.card-type-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.card-type-price {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    margin-top: 6px;
}

.card-type-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* 移动端卡密类型选择适配 */
@media (max-width: 768px) {
    .card-type-selection {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
    }

    .card-type-option {
        padding: 20px 12px;
        min-height: 100px;
    }

    .card-type-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .card-type-title {
        font-size: 15px;
    }

    .card-type-price {
        font-size: 13px;
    }

    .card-type-subtitle {
        font-size: 11px;
    }
}

/* 卡密代码样式 */
.card-code {
    background: rgba(79, 209, 199, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(79, 209, 199, 0.3);
    color: #4fd1c7;
    font-weight: 600;
    font-size: 12px;
    user-select: all;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-code:hover {
    background: rgba(79, 209, 199, 0.2);
    border-color: rgba(79, 209, 199, 0.5);
    transform: scale(1.02);
}

/* 状态标签优化 */

/* 确认对话框样式 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10101;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 0 rgba(255, 255, 255, 0.2) inset;
    position: relative;
    overflow: hidden;
}

.confirm-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.confirm-overlay.show .confirm-dialog {
    transform: scale(1);
}

.confirm-dialog .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.confirm-icon {
    font-size: 52px;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: iconPulse 2s ease-in-out infinite;
}

.confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.confirm-message {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 28px;
    font-weight: 400;
}

/* 续期弹窗专用样式 */
.renew-input-group {
    margin-bottom: 32px;
    position: relative;
}

.renew-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-align: center;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.renew-input:focus {
    border-color: rgba(64, 158, 255, 0.6);
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 0 0 4px rgba(64, 158, 255, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.confirm-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.confirm-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    min-width: 110px;
    justify-content: center;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-renew {
    background: linear-gradient(135deg, #409eff 0%, #67c23a 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.btn-renew:hover {
    background: linear-gradient(135deg, #5dade2 0%, #7ed321 100%);
    transform: translateY(-2px);
}

.btn-renew:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.btn-icon {
    font-size: 14px;
}

.btn-text {
    font-size: 14px;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    border: 1px solid;
    min-width: 80px;
}

.confirm-btn-primary {
    background: rgba(255, 99, 71, 0.2);
    border-color: rgba(255, 99, 71, 0.4);
    color: #ff6347;
}

.confirm-btn-primary:hover {
    background: rgba(255, 99, 71, 0.3);
    transform: translateY(-1px);
}

.confirm-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.confirm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .confirm-dialog {
        padding: 24px;
        margin: 20px;
    }

    .confirm-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .confirm-title {
        font-size: 18px;
    }

    .confirm-message {
        font-size: 13px;
    }

    .confirm-buttons {
        flex-direction: row;
        gap: 12px;
    }

    .confirm-buttons .btn {
        flex: 1;
        min-width: 90px;
        padding: 12px 16px;
        font-size: 15px;
    }

    .confirm-btn {
        width: 100%;
    }
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4fd1c7 0%, #26a69a 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(79, 209, 199, 0.3);
}

.progress-text {
    font-size: 12px;
    color: #b0b0b0;
    font-weight: 500;
    min-width: 35px;
    text-align: right;
}

/* 播放卡片内容居中显示 */
.playing-card.user-card .user-card-header {
    display: block !important;
    text-align: center !important;
    align-items: unset !important;
}

.playing-card.user-card .user-card-info,
.playing-card.user-card .user-card-details {
    text-align: center !important;
}

.playing-card.user-card .user-card-name {
    text-align: center !important;
}

.playing-card.user-card .user-card-info .label {
    display: none !important;
}

.playing-card.user-card .user-card-info .value {
    display: block !important;
    text-align: center !important;
}

.playing-card.user-card .user-card-info .value {
    margin-top: 2px;
}

/* 确保进度条容器也居中 */
.playing-card.user-card .progress-container {
    justify-content: center !important;
    margin: 0 auto !important;
}

/* 复选框样式优化 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(64, 158, 255, 0.3);
}

.checkbox-wrapper input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:hover {
    border-color: rgba(64, 158, 255, 0.5);
    background: rgba(64, 158, 255, 0.1);
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #409eff, #67c23a);
    border-color: #409eff;
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-wrapper label {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    user-select: none;
    transition: color 0.3s ease;
}

.checkbox-wrapper:hover label {
    color: #ffffff;
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
    color: #67c23a;
}

/* 被软件限制的用户卡片样式 */
.banned-user-card {
    background: rgba(255, 107, 107, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 107, 0.25);
}

/* 播放限制用户卡片样式 */
.play-limited-card {
    background: rgba(255, 193, 7, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 193, 7, 0.25);
}

/* 软件限制用户卡片样式 */
.software-limited-card {
    background: rgba(255, 107, 107, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 107, 0.25);
}

/* 限制信息样式 */
.limit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 12px;
}

.limit-type {
    font-weight: 600;
    color: #ffffff;
}

.limit-time, .limit-client {
    color: rgba(255, 255, 255, 0.8);
}

.limit-reason {
    margin: 8px 0;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.banned-user-card .user-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.banned-user-card .user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.banned-user-card .user-info {
    flex-grow: 1;
    text-align: left;
}

.banned-user-card .user-name {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.banned-user-card .user-status {
    margin-top: 4px;
}

.banned-user-card .user-body {
    margin-bottom: 15px;
}

.banned-user-card .ban-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
}

.banned-user-card .ban-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 0;
}

.banned-user-card .ban-detail:last-child {
    margin-bottom: 0;
}

.banned-user-card .detail-label {
    color: #b0b0b0;
    font-size: 12px;
    font-weight: 500;
}

.banned-user-card .detail-value {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.banned-user-card .user-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.banned-user-card .status-badge.banned {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banned-user-card .status-badge.active {
    background: linear-gradient(135deg, #4cd137 0%, #44bd32 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 卡密操作按钮容器 */
.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 清理卡密弹窗样式 */
.clean-info {
    text-align: center;
    padding: 20px;
}

.clean-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.clean-info p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.warning-text {
    color: #ff6b6b !important;
    font-weight: bold;
    font-size: 14px !important;
}

.clean-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
}

.clean-actions .btn {
    min-width: 100px;
    padding: 12px 20px;
}

/* 清理卡密弹窗手机端响应式样式 */
@media (max-width: 768px) {
    .clean-actions {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
        align-items: center;
        padding-top: 20px;
    }

    .clean-actions .btn {
        flex: 1;
        max-width: 140px;
        min-width: 100px;
        padding: 14px 16px;
        font-size: 15px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .clean-info {
        padding: 15px;
    }

    .clean-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .clean-info p {
        font-size: 15px;
        margin-bottom: 8px;
    }
}

/* 超小屏幕手机端优化 */
@media (max-width: 480px) {
    .clean-actions {
        gap: 8px;
    }

    .clean-actions .btn {
        flex: 1;
        max-width: 120px;
        min-width: 80px;
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }

    .clean-info {
        padding: 12px;
    }

    .clean-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .clean-info p {
        font-size: 14px;
        margin-bottom: 6px;
    }
}

/* 过期时间样式 */
.expired-text {
    color: #f56c6c !important;
    font-weight: bold !important;
}

/* 媒体库信息卡片样式 */
.media-info-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* 协议切换按钮样式 */
.media-info-card .toggle-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.media-info-card .toggle-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.media-info-card .toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.media-info-card .toggle-btn.active {
    background: linear-gradient(135deg, #409eff, #67c23a);
    color: #ffffff;
    border-color: #409eff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.3);
}

.media-info-card .card-header {
    margin-bottom: 20px;
    text-align: center;
}

.media-info-card .card-header h3 {
    color: #4fd1c7;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.media-info-card .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.media-info-card .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-info-card .info-label {
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 8px;
    font-weight: 500;
}

.media-info-card .info-value {
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}

/* 媒体库信息卡片响应式 */
@media (max-width: 768px) {
    .media-info-card .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .media-info-card .info-item {
        padding: 12px;
    }

    .media-info-card .card-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .media-info-card .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .media-info-card .info-item {
        padding: 10px;
    }
}

/* 客户端选择对话框 */
.client-selection-dialog {
    max-width: 650px !important;
    width: 92% !important;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.client-selection-dialog::-webkit-scrollbar {
    display: none;
}

.client-search-container {
    margin-bottom: 20px;
}

.client-search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.client-search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

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

.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.clients-grid::-webkit-scrollbar {
    display: none;
}

.client-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.client-card:hover {
    transform: translateY(-2px);
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.client-card:active {
    transform: translateY(0) scale(0.98);
}

.client-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.client-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    word-break: break-word;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    text-align: center;
}

.client-card.banned {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.client-card.banned:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.client-card.selected {
    border-color: rgba(76, 175, 80, 0.8);
    background: rgba(76, 175, 80, 0.15);
}

.client-card.unban-selected {
    border-color: rgba(255, 107, 107, 0.8);
    background: rgba(255, 107, 107, 0.15);
}

.client-status {
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.client-status.banned-status {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.client-status.selected-status {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.client-status.unban-selected-status {
    background: rgba(255, 107, 107, 0.9);
    color: white;
}

.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .client-selection-dialog {
        width: 95%;
        max-height: 85vh;
    }

    .clients-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .client-card {
        padding: 12px 8px;
        min-height: 90px;
    }

    .client-icon {
        font-size: 28px;
    }

    .client-name {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .clients-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* 正在播放卡片 */
.playing-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 8px;
    cursor: pointer;
    width: 100%;
    height: auto !important;
    max-width: 280px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease,
                opacity 0.5s ease !important;
}

/* 正在播放卡片海报样式 */
.playing-card .user-card-poster {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: -2px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.playing-card .user-card-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 12px;
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
    background-size: 400% 400%;
    animation: posterLoading 2s ease-in-out infinite;
}

.playing-card .user-card-poster.loaded::before {
    opacity: 0;
}

.playing-card .poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: relative;
    z-index: 2;
}

.playing-card .poster-image.loaded {
    opacity: 1;
}

/* 播放卡片头部样式 */
.playing-card .user-card-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: -2px;
    text-align: center;
}

.playing-card .user-card-info .label {
    display: none;
}

.playing-card .user-card-info .value {
    color: #ffffff;
    font-weight: 500;
    font-size: 11px;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 正在播放网格布局 */
#playing-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    padding: 10px !important;
    justify-items: center !important;
    min-height: auto !important;
}

/* 正在播放卡片尺寸 */
#playing-cards-grid .playing-card {
    width: 260px;
    height: 350px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* 移动端适配 */
@media (max-width: 1400px) {
    #playing-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    #playing-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    #playing-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #playing-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 12px !important;
    }

    #playing-cards-grid .playing-card {
        width: 100% !important;
        max-width: 300px !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 600px) {
    #playing-cards-grid {
        grid-template-columns: 1fr !important;
    }
}

#playing-cards-grid.empty-state {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    grid-template-columns: 1fr !important;
}

.progress-time {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    margin-top: 2px;
    font-weight: 500;
    width: 100%;
}

/* 消息弹窗动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 日志页面按钮 */
#mediaRequestsList button.btn-primary,
#mediaRequestsList button.btn-danger,
#issueRequestsList button.btn-primary,
#issueRequestsList button.btn-danger,
#issueRequestsList button.btn-secondary {
    min-width: 55px !important;
    padding: 2px 10px !important;
}

/* 日志页面移动端优化 */
@media (max-width: 768px) {
    .logs-page .container {
        padding-bottom: 100px !important;
    }

    .logs-page .tabs {
        gap: 8px;
    }

    .logs-page .tab-button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .logs-page .tab-icon {
        font-size: 18px;
    }

    .logs-page .stat-card {
        margin-bottom: 15px;
    }

    .logs-page .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .logs-page .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .logs-page .confirm-dialog {
        max-width: 95% !important;
        margin: 10px;
    }

    #replyHistoryList {
        max-height: 300px !important;
    }
}

/* 日志页面小屏手机优化 */
@media (max-width: 480px) {
    .logs-page .stat-card {
        padding: 12px;
    }

    .logs-page .stat-content h3 {
        font-size: 16px !important;
    }

    .logs-page .btn {
        padding: 5px 8px !important;
        font-size: 10px !important;
        min-width: auto !important;
    }

    #issueRequestsList > div > div:last-child {
        gap: 4px !important;
    }

    #mediaRequestsList > div,
    #issueRequestsList > div {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }

    #mediaRequestsList h4,
    #issueRequestsList h4 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    #mediaRequestsList p,
    #issueRequestsList p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    #mediaRequestsList img {
        width: 55px !important;
        height: 82px !important;
    }

    #mediaRequestsList > div > div:first-child {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }

    #mediaRequestsList > div > div:first-child > div {
        padding: 2px 6px !important;
    }

    #mediaRequestsList > div > div:first-child > div > span {
        font-size: 10px !important;
    }

    #mediaRequestsList h4 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    #mediaRequestsList > div > div:nth-child(3) > div > div {
        gap: 4px !important;
    }

    #mediaRequestsList > div > div:nth-child(3) > div > div > div {
        padding: 2px 6px !important;
    }

    #mediaRequestsList > div > div:nth-child(3) > div > div > div > span {
        font-size: 10px !important;
    }

    #issueRequestsList > div > div:first-child {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }

    #issueRequestsList > div > div:first-child > div {
        padding: 2px 6px !important;
    }

    #issueRequestsList > div > div:first-child > div > span {
        font-size: 10px !important;
    }

    #issueRequestsList h4 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    #issueRequestsList > div > div:last-child {
        gap: 4px !important;
        justify-content: flex-end !important;
    }

    #replyModal .confirm-dialog {
        max-height: 90vh !important;
    }

    #replyModal .confirm-dialog > div:nth-child(3) {
        flex: 1 !important;
        min-height: 0 !important;
    }

    #replyContent {
        min-height: 80px !important;
        font-size: 13px !important;
    }
}

/* 日志页面回复弹窗滚动条隐藏 */
#replyModal .confirm-dialog > div:first-of-type::-webkit-scrollbar {
    display: none;
}

/* 点播工单页面按钮 */
.request-page #issueRequestsList button.btn-secondary {
    min-width: 55px !important;
    padding: 2px 10px !important;
}

#searchResultsList::-webkit-scrollbar {
    display: none;
}

/* 点播工单页面手机端优化 */
@media (max-width: 480px) {
    .request-page .btn {
        padding: 5px 8px !important;
        font-size: 10px !important;
        min-width: auto !important;
    }

    .request-page #issueRequestsList > div {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }

    .request-page #issueRequestsList h4 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    .request-page #issueRequestsList p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
    }

    .request-page #issueRequestsList > div > div:first-child {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }

    .request-page #issueRequestsList > div > div:first-child > div {
        padding: 2px 6px !important;
    }

    .request-page #issueRequestsList > div > div:first-child > div > span {
        font-size: 10px !important;
    }

    #issueDetailModal .confirm-dialog {
        max-height: 90vh !important;
    }

    #issueDetailModal .confirm-dialog > div:nth-child(3) {
        flex: 1 !important;
        min-height: 0 !important;
    }

    #issueReplyContent {
        min-height: 80px !important;
        font-size: 13px !important;
    }
}

/* 点播工单页面工单详情弹窗滚动条隐藏 */
#issueDetailModal .confirm-dialog > div:first-of-type::-webkit-scrollbar {
    display: none;
}

.media-card {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.media-card-compact {
    margin-bottom: 15px;
}

.media-poster {
    width: 65px;
    height: 98px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.badge {
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    line-height: 1;
}

.badge-status {
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider-v-sm {
    margin: 10px 0;
}

.divider-v-md {
    margin: 12px 0;
}

.divider-v-lg {
    margin: 15px 0;
}

.divider-v-xl {
    margin: 20px 0;
}

.divider-bottom-md {
    margin-bottom: 12px;
}

.divider-bottom-lg {
    margin-bottom: 15px;
}

.divider-bottom-xl {
    margin-bottom: 20px;
}

.divider-bottom-xxl {
    margin-bottom: 25px;
}

.text-ellipsis-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.text-muted-sm {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    line-height: 1.4;
}

.text-muted-xs {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

.scroll-container {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.flex-row {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-gap-sm {
    gap: 6px;
}

.flex-gap-md {
    gap: 12px;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.flex-between {
    justify-content: space-between;
}

.flex-end {
    justify-content: flex-end;
}

.flex-1 {
    flex: 1;
}

.min-w-0 {
    min-width: 0;
}

.media-title {
    margin: 0 0 8px 0;
    color: #4a90e2;
    font-size: 15px;
    font-weight: 600;
    word-break: break-word;
}

.media-title-lg {
    font-size: 16px;
}

.media-content {
    text-align: left;
}

.selected-media-box {
    padding: 15px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    position: relative;
}

.close-btn-abs {
    padding: 6px 10px !important;
    font-size: 16px !important;
    min-width: auto !important;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    top: 12px;
    right: 12px;
}

.close-btn-abs:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.m-0 {
    margin: 0;
}

.p-2 {
    padding: 2px;
}

.label-text {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

.w-full {
    width: 100%;
}

.fs-18 {
    font-size: 18px;
}

.fs-14 {
    font-size: 14px;
}

.fs-17 {
    font-size: 17px;
}

.fs-16 {
    font-size: 16px;
}

.fs-11 {
    font-size: 11px;
}

.p-10-20 {
    padding: 10px 20px;
}

.p-20 {
    padding: 20px;
}

.p-2-10 {
    padding: 2px 10px;
}

.p-16-20 {
    padding: 16px 20px;
}

.p-12-16 {
    padding: 12px 16px;
}

.p-10-16 {
    padding: 10px 16px;
}

.p-14-20 {
    padding: 14px 20px;
}

.mt-10 {
    margin-top: 10px;
}

.min-w-55 {
    min-width: 55px;
}

.min-w-100 {
    min-width: 100px;
}

.w-auto {
    width: auto;
}

.resize-vertical {
    resize: vertical;
}

.min-h-100 {
    min-height: 100px;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.text-white {
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state-sm {
    text-align: center;
    padding: 30px;
}

.empty-state-xs {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.heading-lg {
    margin-bottom: 20px;
    font-size: 18px;
}

.modal-dialog-lg {
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-dialog-md {
    max-width: 600px;
    max-height: 75vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gap-10 {
    gap: 10px;
}

.emoji-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.input-readonly {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.divider-thin {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 15px 0;
}

.divider-thin-bottom {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.invite-code-display {
    font-size: 1.5rem;
    color: #ffd700;
    letter-spacing: 2px;
}

.invite-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.btn-container-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.result-cardcode {
    flex: 1;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.result-cardcode-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.info-text {
    margin: 8px 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.label-block {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.btn-full-width {
    width: 100%;
    margin-top: 20px;
}

.return-link {
    margin-top: 20px;
    text-align: center;
}

.return-link a {
    color: #666;
    text-decoration: none;
}

.p-8-16 {
    padding: 8px 16px;
}

.my-20 {
    margin: 20px 0;
}

.grid-gap-12 {
    display: grid;
    gap: 12px;
}

.fw-500 {
    font-weight: 500;
}

.mb-25 {
    margin-bottom: 25px;
}

.modal-search {
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.textarea-full {
    resize: vertical;
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    line-height: 1.7;
}

.btn-submit-large {
    padding: 16px 60px;
    font-size: 17px;
    width: 100%;
}

.divider-thin-mb {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.no-results {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px;
}

.confirm-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.confirm-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    min-width: 110px;
    justify-content: center;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, #409eff 0%, #67c23a 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #5dade2 0%, #7ed321 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
}

.btn-confirm:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 14px;
}

.btn-text {
    font-size: 14px;
}

/* 复制按钮样式 */
.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
}

.user-detail {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.user-detail .btn-copy {
    flex-shrink: 0;
}

/* 复制按钮样式 */
.btn-copy-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.btn-copy-action:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 用户名可点击样式 */
#current-username {
    cursor: pointer;
}
