/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --blur-amount: 15px;
    --text-color: #fff;
    --pink: #FF6B9D;
    --purple: #7F5AF0;
}

body {
    background: url('../assets/bg.jpg') center/cover fixed no-repeat;
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
}

/* ======== 前台居中卡片 ======== */
.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.main-card-wrapper {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

/* ======== 后台专用 body ======== */
.admin-body {
    display: block;
    padding: 0;
    align-items: stretch;
}

/* ======== 毛玻璃卡片通用 ======== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    padding: 35px 30px;
    color: var(--text-color);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.main-card {
    text-align: center;
    animation: fadeInCard 0.8s ease;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo {
    font-size: 2.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 0 15px #ff6ec7;
    letter-spacing: 2px;
}

.announcement-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px 18px;
    margin: 15px 0;
    text-align: left;
    border-left: 4px solid #ffb3fd;
}

.announce-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.quote-area {
    font-size: 1.1em;
    margin: 20px 0;
    font-style: italic;
    opacity: 0.9;
    min-height: 30px;
}

.stock-alert {
    background: rgba(255, 87, 87, 0.5);
    padding: 8px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: bold;
}

.captcha-box {
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.neko-input {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-color);
    outline: none;
    font-size: 1em;
    width: 100px;
    text-align: center;
}
.neko-input::placeholder { color: rgba(255,255,255,0.6); }

.neko-btn {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    color: white;
    padding: 14px 45px;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
    margin: 20px 0;
    letter-spacing: 2px;
    display: inline-block;
}
.neko-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(255, 107, 157, 0.8);
}
.neko-btn:active { transform: scale(0.96); }
.neko-btn:disabled {
    background: #888;
    box-shadow: none;
    cursor: not-allowed;
}

.cooldown-info {
    background: rgba(0,0,0,0.4);
    padding: 10px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.95em;
}

.key-display {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: 25px 20px;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.4em;
    letter-spacing: 2px;
    margin-top: 25px;
    word-break: break-all;
    position: relative;
    animation: cardReveal 0.5s ease;
    border: 1px dashed #ffb3fd;
}
.key-display .tag {
    font-size: 0.7em;
    background: #ff6ec7;
    padding: 2px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 8px;
}
@keyframes cardReveal {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.footer-note {
    text-align: center;
    margin-top: 20px;
    opacity: 0.7;
    font-size: 0.9em;
}

/* 抽卡动画覆盖层 */
.gacha-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    animation: fadeIn 0.2s;
}
.gacha-anim-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    animation: popIn 0.3s ease;
}
.gacha-anim-box .magic-circle {
    font-size: 5em;
    animation: spin 2s linear infinite;
}
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
@keyframes popIn { from {transform:scale(0.5); opacity:0} to {transform:scale(1); opacity:1} }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ========== 后台布局 ========== */
.admin-panel {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

.sidebar {
    width: 240px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-right: 1px solid rgba(255,255,255,0.15);
    padding: 30px 20px;
    color: var(--text-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.sidebar h2 {
    font-size: 1.4em;
    margin-bottom: 25px;
    text-shadow: 0 0 10px var(--pink);
}

.sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 4px 0;
    transition: background 0.2s;
    font-size: 0.95em;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    min-width: 0;
}

.neko-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
}
.neko-table th, .neko-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    white-space: nowrap;
}
.neko-table thead th {
    background: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.table-responsive {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 12px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 10px;
    align-self: flex-end;
}

.admin-msg {
    background: rgba(0, 255, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

.btn-sm {
    padding: 6px 18px;
    font-size: 0.9em;
    border-radius: 20px;
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    cursor: pointer;
}

/* ========== 响应式 - 手机端 ========== */
@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }

    .admin-panel {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .sidebar h2 {
        font-size: 1.2em;
        margin-bottom: 0;
    }

    .sidebar .sidebar-links {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 10px;
    }

    .sidebar .sidebar-links.active {
        display: flex;
    }

    .sidebar-toggle {
        display: block;
    }

    .content {
        padding: 20px 15px;
    }

    .neko-table th, .neko-table td {
        white-space: normal;
        font-size: 0.85em;
        padding: 8px 6px;
    }

    .glass-card {
        padding: 20px;
    }

    .neko-btn {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }

    .neko-input {
        width: 100% !important;
    }

    .key-display {
        font-size: 1.1em;
        padding: 15px;
    }
}

/* ========== 历史记录弹窗 ========== */
.history-modal { ... }  /* 此处省略，保留你已有的历史记录样式 */

/* 跳转按钮特效 */
.jump-btn {
    transition: all 0.3s ease;
    display: inline-block;
}
.jump-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.7);
}
/* 分页样式 */
.pagination {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.page-link {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    font-size: 0.9em;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.page-link.active {
    background: var(--pink);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    padding: 6px 4px;
    color: rgba(255,255,255,0.6);
}