/* ========== 全局 ========== */
* { box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei UI", "PingFang SC", -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}
a { color: #10b981; text-decoration: none; transition: color 0.2s; }
a:hover { color: #059669; text-decoration: underline; }

/* ========== 用户提卡页 ========== */
.redeem-body {
    min-height: 100vh;
    background: #0f172a;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.2), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(16, 185, 129, 0.08), transparent);
    color: #e2e8f0;
    padding: 2.5rem 1rem 3rem;
    position: relative;
}
.redeem-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
    pointer-events: none;
}
.redeem-body .container {
    max-width: 540px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.redeem-body .page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.redeem-body .page-header .logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4), 0 0 0 1px rgba(16, 185, 129, 0.1);
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.redeem-body .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
.redeem-body .page-header .subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
}
.redeem-body .form-card {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.05);
    backdrop-filter: blur(10px);
}
.redeem-body input[type="text"] {
    width: 100%;
    padding: 16px 18px;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    margin-bottom: 16px;
    transition: all 0.3s;
}
.redeem-body input::placeholder { color: #64748b; }
.redeem-body input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 4px 12px rgba(16, 185, 129, 0.2);
}
.redeem-body .btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}
.redeem-body .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.redeem-body .btn-primary:hover::before {
    left: 100%;
}
.redeem-body .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}
.redeem-body .btn-primary:active {
    transform: translateY(0);
}
.redeem-body .error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    padding: 16px 20px;
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(10px);
}
.redeem-body .success-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #34d399;
    margin: 1.5rem 0 1.75rem;
    font-weight: 600;
    font-size: 1.05rem;
}
.redeem-body .success-msg::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(52, 211, 153, 0.2);
    border-radius: 50%;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.3);
}
.redeem-body .card-block {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 16px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}
.redeem-body .card-block h3 {
    margin: 0;
    padding: 18px 22px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(30, 41, 59, 0.95));
    color: #fbbf24;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}
.redeem-body .card-row {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
    transition: background 0.2s;
}
.redeem-body .card-row:last-child { border-bottom: none; }
.redeem-body .card-row:nth-child(even) { background: rgba(15, 23, 42, 0.4); }
.redeem-body .card-row:hover { background: rgba(16, 185, 129, 0.05); }
.redeem-body .card-label {
    width: 100px;
    color: #94a3b8;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 0.9rem;
}
.redeem-body .card-value {
    color: #f1f5f9;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.95rem;
    flex: 1;
}
.redeem-body .copy-btn {
    cursor: pointer;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 1rem;
}
.redeem-body .copy-btn:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    transform: scale(1.1);
}
.redeem-body .btn-copy-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.redeem-body .btn-copy-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

/* 提卡加载动画 - 匹配页面主题色 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}
.loading-overlay .loading-content {
    text-align: center;
    padding: 2rem;
}
.loading-overlay .loading-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border-radius: 50%;
    border: 3px solid #10b981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), 0 0 60px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.5), 0 0 60px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.7), 0 0 80px rgba(16, 185, 129, 0.4);
    }
}
.loading-overlay .loading-icon svg {
    width: 45px;
    height: 45px;
    color: #10b981;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
    animation: lightning 1.5s ease-in-out infinite;
}
@keyframes lightning {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}
.loading-overlay .loading-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem;
    letter-spacing: 0.5px;
}
.loading-overlay .loading-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0 0 1.5rem;
}
.loading-overlay .loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.loading-overlay .loading-dots span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: dotPulse 1.4s ease-in-out infinite both;
}
.loading-overlay .loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-overlay .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-overlay .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.3);
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
    }
}
.loading-overlay .loading-footer {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

/* ========== 管理后台 ========== */
.admin-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem 1.5rem;
}
.admin-body .admin-wrap {
    max-width: 1000px;
    margin: 0 auto;
}
.admin-body .admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}
.admin-body h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.admin-body .logout-link {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.admin-body .logout-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}
.admin-body .alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-weight: 500;
    border: 1px solid;
}
.admin-body .alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}
.admin-body .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.admin-body .section-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.3s;
}
.admin-body .section-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(16, 185, 129, 0.1);
}
.admin-body .section-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-body .section-card h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 2px;
}
.admin-body .section-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}
.admin-body .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.admin-body input[type="text"],
.admin-body input[type="number"] {
    padding: 11px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.admin-body input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.admin-body input[type="number"] { width: 120px; }
.admin-body .btn {
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-body .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.admin-body .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.admin-body .btn-secondary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}
.admin-body .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.admin-body .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.admin-body .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 7px 14px;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}
.admin-body .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}
.admin-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-body th, .admin-body td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.admin-body th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-body tr:hover {
    background: #f8fafc;
}
.admin-body code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}
.admin-body .btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    margin-left: 8px;
    border-radius: 6px;
}

/* ========== 登录页 ========== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.login-body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.login-body .login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}
.login-body h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 0 0 2rem;
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}
.login-body .login-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.login-body input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    color: #f1f5f9;
    transition: all 0.3s;
}
.login-body input::placeholder {
    color: #64748b;
}
.login-body input:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}
.login-body .login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}
.login-body .login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.login-body .login-btn:hover::before {
    left: 100%;
}
.login-body .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

/* 后台提卡详情页 */
.admin-body .fetch-result-header {
    margin-bottom: 1.5rem;
}
.admin-body .fetch-result-header h1 { margin-bottom: 0.5rem; }
.admin-body .fetch-result-header .meta { color: #64748b; font-size: 0.9rem; }
.admin-body .fetch-result-header .back-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 8px 16px;
    background: #64748b;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none !important;
}
.admin-body .fetch-result-header .back-link:hover { background: #475569; }
.admin-body .dark-card {
    background: #1e293b;
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
    border: 1px solid #334155;
}
.admin-body .dark-card h3 {
    margin: 0;
    padding: 12px 16px;
    background: #334155;
    color: #fbbf24;
    font-size: 0.95rem;
}
.admin-body .dark-card .card-row {
    display: flex;
    padding: 10px 16px;
    border-bottom: 1px solid #334155;
}
.admin-body .dark-card .card-row:nth-child(even) { background: rgba(15,23,42,0.5); }
.admin-body .dark-card .card-label { width: 90px; color: #94a3b8; flex-shrink: 0; }
.admin-body .dark-card .card-value { color: #f1f5f9; font-family: Consolas, monospace; }
