/* admin.css - 后台样式 */
#adminApp {
    display: flex;
    min-height: 100vh;
    gap: 0;
    background: linear-gradient(145deg, #0f1923, #1a2a38);
    border-radius: 24px;
    overflow: hidden;
}

/* ===== 侧边栏 ===== */
.admin-sidebar-new {
    width: 200px;
    flex-shrink: 0;
    background: rgba(10, 18, 26, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 215, 150, 0.06);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}
.sidebar-header {
    padding: 0 16px 14px;
    border-bottom: 1px solid rgba(255, 215, 150, 0.06);
}
.sidebar-header h2 {
    color: #f3e4c2;
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-header h2 i {
    color: #e6b84c;
}
.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-item {
    padding: 10px 14px;
    border-radius: 10px;
    color: #8fa5b5;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #c9d4de;
}
.nav-item.active {
    background: rgba(230, 184, 76, 0.12);
    color: #e6b84c;
}
.nav-item i {
    width: 18px;
    text-align: center;
}
.sidebar-footer {
    padding: 12px 16px 0;
    border-top: 1px solid rgba(255, 215, 150, 0.06);
}
.btn-back-front {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #8fa5b5;
    padding: 8px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.2s;
}
.btn-back-front:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c9d4de;
}

/* ===== 主内容 ===== */
.admin-main-new {
    flex: 1;
    padding: 20px 28px;
    overflow-y: auto;
    max-height: 100vh;
}
.page-content {
    display: none;
}
.page-content.active {
    display: block;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.page-header h2 {
    color: #f3e4c2;
    font-weight: 500;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header h2 i {
    color: #e6b84c;
}

/* ===== 数据看板 ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 215, 150, 0.06);
}
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(230, 184, 76, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e6b84c;
    font-size: 1.3rem;
}
.stat-card h3 {
    color: #8fa5b5;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.stat-card p {
    color: #f3e4c2;
    font-size: 1.5rem;
    font-weight: 600;
}
.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.chart-box {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 215, 150, 0.06);
}
.chart-box canvas {
    max-height: 220px;
}
.dashboard-recent h3 {
    color: #bdaa85;
    font-weight: 400;
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.dashboard-recent .recent-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: #c9d4de;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* ===== 按钮 ===== */
.btn-add-wheel-new {
    background: linear-gradient(145deg, #e6b84c, #d49e3a);
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    color: #1a2a36;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
    box-shadow: 0 3px 0 #a07d2a;
    font-size: 0.9rem;
}
.btn-add-wheel-new:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #a07d2a;
}
.btn-clear-records,
.btn-clear-users {
    background: rgba(255, 80, 80, 0.12);
    color: #e06a6a;
    border: 1px solid rgba(255, 80, 80, 0.2);
    padding: 6px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}
.btn-clear-records:hover,
.btn-clear-users:hover {
    background: rgba(255, 80, 80, 0.2);
}
.btn-save-setting {
    background: rgba(100, 180, 255, 0.12);
    color: #7ab7f0;
    border: 1px solid rgba(100, 180, 255, 0.15);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}
.btn-save-setting:hover {
    background: rgba(100, 180, 255, 0.2);
}

/* ===== 转盘列表 ===== */
.wheel-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wheel-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 215, 150, 0.06);
    transition: 0.2s;
    flex-wrap: wrap;
    gap: 8px;
}
.wheel-list-item:hover {
    background: rgba(255, 255, 255, 0.07);
}
.wheel-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wheel-item-name {
    color: #f3e4c2;
    font-weight: 500;
    font-size: 1rem;
}
.wheel-item-meta {
    color: #8fa5b5;
    font-size: 0.75rem;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.wheel-item-actions {
    display: flex;
    gap: 6px;
}
.wheel-item-actions button {
    padding: 4px 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.15s;
}
.btn-edit-wheel {
    background: rgba(100, 180, 255, 0.12);
    color: #7ab7f0;
    border: 1px solid rgba(100, 180, 255, 0.15);
}
.btn-edit-wheel:hover {
    background: rgba(100, 180, 255, 0.2);
}
.btn-del-wheel {
    background: rgba(255, 80, 80, 0.1);
    color: #e06a6a;
    border: 1px solid rgba(255, 80, 80, 0.15);
}
.btn-del-wheel:hover {
    background: rgba(255, 80, 80, 0.2);
}

/* ===== 编辑器 ===== */
.wheel-editor {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 150, 0.08);
    overflow: hidden;
}
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 215, 150, 0.06);
}
.editor-header h3 {
    color: #f3e4c2;
    font-weight: 400;
    font-size: 1rem;
}
.btn-close-editor {
    background: transparent;
    border: none;
    color: #8fa5b5;
    font-size: 1.1rem;
    cursor: pointer;
}
.editor-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.editor-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.editor-group label {
    color: #bdaa85;
    font-size: 0.8rem;
    font-weight: 500;
}
.editor-group input,
.editor-group select {
    padding: 6px 12px;
    border-radius: 30px;
    border: none;
    background: #11212e;
    color: #f0e6d6;
    outline: 1px solid #3d5a6f;
    transition: 0.15s;
    font-size: 0.85rem;
}
.editor-group input:focus,
.editor-group select:focus {
    outline: 2px solid #e6b84c;
}
.link-display-inline {
    display: flex;
    gap: 6px;
}
.link-display-inline input {
    flex: 1;
}
.btn-copy-small {
    background: rgba(100, 180, 255, 0.12);
    color: #7ab7f0;
    border: 1px solid rgba(100, 180, 255, 0.15);
    padding: 4px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}
.limit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.limit-row span {
    color: #8fa5b5;
    font-size: 0.8rem;
}
.limit-row input {
    width: 70px;
    padding: 4px 8px;
    border-radius: 30px;
    border: none;
    background: #11212e;
    color: #f0e6d6;
    outline: 1px solid #3d5a6f;
    text-align: center;
    font-size: 0.85rem;
}
.edit-prize-list {
    max-height: 140px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
}
.edit-prize-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #c9d4de;
    font-size: 0.85rem;
}
.edit-prize-item:last-child {
    border-bottom: none;
}
.edit-prize-del {
    background: transparent;
    border: none;
    color: #b06a6a;
    cursor: pointer;
    font-size: 0.8rem;
}
.add-prize-inline {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.add-prize-inline input {
    flex: 1;
    min-width: 60px;
    padding: 4px 10px;
    border-radius: 30px;
    border: none;
    background: #11212e;
    color: #f0e6d6;
    outline: 1px solid #3d5a6f;
    font-size: 0.8rem;
}
.add-prize-inline input:focus {
    outline: 2px solid #e6b84c;
}
.btn-add-small {
    background: rgba(100, 180, 255, 0.12);
    color: #7ab7f0;
    border: 1px solid rgba(100, 180, 255, 0.15);
    padding: 4px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
}
.editor-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.btn-save-editor {
    background: linear-gradient(145deg, #e6b84c, #d49e3a);
    border: none;
    padding: 8px 24px;
    border-radius: 30px;
    color: #1a2a36;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}
.btn-delete-editor {
    background: rgba(255, 80, 80, 0.12);
    color: #e06a6a;
    border: 1px solid rgba(255, 80, 80, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

/* ===== 记录列表 ===== */
.records-list,
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.record-item,
.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #e6b84c;
    color: #c9d4de;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 6px;
}
.log-item {
    border-left-color: #7ab7f0;
}
.record-item .record-name {
    color: #f3e4c2;
    font-weight: 500;
}
.record-item .record-prize {
    color: #e6b84c;
    font-weight: 500;
}
.record-item .record-time,
.log-item .log-time {
    color: #6a7f8f;
    font-size: 0.75rem;
}
.record-item .record-user {
    color: #8fa5b5;
    font-size: 0.8rem;
}
.record-del {
    background: transparent;
    border: none;
    color: #b06a6a;
    cursor: pointer;
}

/* ===== 用户管理 ===== */
.user-list-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    color: #c9d4de;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
}
.user-item .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-item .user-name {
    color: #f3e4c2;
    font-weight: 500;
}
.user-item .user-id {
    font-size: 0.8rem;
    color: #8fa5b5;
}
.user-item .user-draw-count {
    font-size: 0.8rem;
    color: #e6b84c;
}
.user-item-actions {
    display: flex;
    gap: 4px;
}
.user-item-actions button {
    padding: 3px 12px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    transition: 0.15s;
}
.btn-user-reset {
    background: rgba(100, 180, 255, 0.1);
    color: #7ab7f0;
    border: 1px solid rgba(100, 180, 255, 0.12);
}
.btn-user-reset:hover {
    background: rgba(100, 180, 255, 0.2);
}
.btn-user-del {
    background: rgba(255, 80, 80, 0.1);
    color: #e06a6a;
    border: 1px solid rgba(255, 80, 80, 0.12);
}
.btn-user-del:hover {
    background: rgba(255, 80, 80, 0.2);
}

/* ===== 系统设置 ===== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.setting-group {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 215, 150, 0.06);
}
.setting-group h3 {
    color: #bdaa85;
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 12px;
}
.setting-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.setting-row label {
    color: #8fa5b5;
    font-size: 0.8rem;
}
.setting-row input,
.setting-row textarea {
    padding: 6px 12px;
    border-radius: 10px;
    border: none;
    background: #11212e;
    color: #f0e6d6;
    outline: 1px solid #3d5a6f;
    transition: 0.15s;
    font-size: 0.85rem;
    font-family: inherit;
}
.setting-row input:focus,
.setting-row textarea:focus {
    outline: 2px solid #e6b84c;
}
.setting-row textarea {
    resize: vertical;
    min-height: 60px;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #b8975a;
    border-radius: 10px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    #adminApp {
        flex-direction: column;
        border-radius: 16px;
    }
    .admin-sidebar-new {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 215, 150, 0.06);
    }
    .sidebar-header {
        padding: 0 10px 0 0;
        border-bottom: none;
    }
    .sidebar-nav {
        flex-direction: row;
        padding: 0 8px;
        flex: 1;
        gap: 2px;
        overflow-x: auto;
    }
    .nav-item {
        padding: 6px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .sidebar-footer {
        padding: 0 0 0 8px;
        border-top: none;
    }
    .admin-main-new {
        padding: 14px;
        max-height: none;
    }
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    .editor-body {
        padding: 12px;
    }
    .limit-row {
        flex-wrap: wrap;
    }
}