/* ========== 后台统一主题（磨砂玻璃风格，无动态背景） ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
    color: #fff;
    min-height: 100vh;
    background: #1a1d2e;
}

/* 兼容旧标记 - 占位，不再绘制 */
.bedrock-bg {
    display: none;
}

a {
    color: inherit;
}

::selection {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ========== 通用按钮 ========== */
.btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
    display: inline-block;
    font-family: inherit;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.6);
    border-color: rgba(248, 113, 113, 0.85);
    color: #fff;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #fca5a5;
}

/* ========== 卡片 / 区块 ========== */
.section {
    margin-bottom: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}

.section-title {
    font-size: 1.35rem;
    color: #fff;
    margin-bottom: 18px;
    font-weight: 600;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 18px;
}

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: 0.2s;
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.32);
}

.form-input[type="file"] {
    padding: 8px;
}

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

/* ========== 后台主框架 ========== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}

.admin-title {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    flex-wrap: wrap;
}

.nav-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    text-align: center;
    transition: 0.2s;
    font-size: 0.95rem;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ========== 登录页 ========== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
}

.login-title {
    font-size: 1.6rem;
    color: #fff;
    text-align: center;
    margin-bottom: 28px;
    font-weight: 600;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 260px;
    max-width: 380px;
    padding: 14px 18px;
    background: rgba(20, 25, 40, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 4px solid;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: top 0.3s ease;
}

.toast.toast-success {
    border-left-color: #4ade80;
}

.toast.toast-error {
    border-left-color: #f87171;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #4ade80;
}

.toast-error .toast-icon {
    color: #f87171;
}

.toast-message {
    flex: 1;
    color: #fff;
    font-size: 0.95rem;
}

@keyframes slideIn {
    from {
        transform: translateX(420px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(420px);
        opacity: 0;
    }
}

.toast.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* ========== 响应式 ========== */
.admin-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    .admin-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-tabs::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .nav-tab {
        flex: 0 0 auto;
        min-width: auto;
        white-space: nowrap;
        padding: 10px 16px;
    }

    .toast {
        right: 12px;
        left: 12px;
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }

    .login-container {
        padding: 28px 22px;
    }

    .section {
        padding: 18px;
    }
}
