/* ============================================================================
 * assets/css/style.css
 * 灵动简约风补充样式：毛玻璃、动画、滚动条、摄像头、水印预览、加载圈
 * 主色调 浅蓝(#38bdf8 / #0ea5e9) + 白色，配合 Tailwind CDN 使用
 * ============================================================================ */

:root {
    --brand: #38bdf8;
    --brand-deep: #0284c7;
    --radius: 16px;
}

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #eff6ff 100%);
    background-attachment: fixed;
}

/* ---- 毛玻璃卡片 ---- */
.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.12);
}

/* ---- 按钮交互 ---- */
.btn {
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

/* ---- 卡片 hover ---- */
.card-hover {
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(56, 189, 248, 0.18);
}

/* ---- 页面过渡 ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeInUp .4s ease both; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn .3s ease both; }

@keyframes popIn {
    0%   { opacity: 0; transform: scale(.9); }
    100% { opacity: 1; transform: scale(1); }
}
.pop-in { animation: popIn .25s cubic-bezier(.34,1.56,.64,1) both; }

/* ---- 加载圈 ---- */
.spinner {
    width: 22px; height: 22px;
    border: 3px solid #cbd5e1;
    border-top-color: var(--brand);
    border-radius: 50%;
    display: inline-block;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 自定义滚动条 ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,.4); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56,189,248,.6); }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 表单聚焦 ---- */
.input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    background: rgba(255,255,255,.8);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(56,189,248,.2);
}

/* ---- 摄像头全屏页 ---- */
.camera-stage {
    position: fixed; inset: 0;
    background: #000;
    overflow: hidden;
}
.camera-stage video {
    width: 100%; height: 100%; object-fit: cover;
}
.camera-overlay {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 5;
}
/* 实时水印预览(屏幕叠加) */
.wm-live {
    position: absolute;
    left: 16px; bottom: 24px;
    color: #fff;
    font-size: 13px;
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.9);
    background: rgba(0,0,0,.18);
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    word-break: break-all;
}

/* ---- 拍照控制条 ---- */
.camera-controls {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    padding: 20px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
    display: flex; align-items: center; justify-content: space-around;
}

/* ---- 瀑布流 ---- */
.waterfall {
    column-count: 2;
    column-gap: 12px;
}
@media (min-width: 768px) { .waterfall { column-count: 3; } }
@media (min-width: 1024px){ .waterfall { column-count: 4; } }
.waterfall > .wf-item {
    break-inside: avoid;
    margin-bottom: 12px;
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }

/* ---- 标签徽章 ---- */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 500;
}
.badge-admin { background: #dbeafe; color: #1d4ed8; }
.badge-user  { background: #e0f2fe; color: #0369a1; }
.badge-on    { background: #d1fae5; color: #047857; }
.badge-off   { background: #fee2e2; color: #b91c1c; }

/* ---- 侧边栏(后台) ---- */
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 12px;
    color: #475569; font-size: 14px; font-weight: 500;
    transition: all .2s;
}
.sidebar-link:hover { background: rgba(56,189,248,.12); color: #0369a1; }
.sidebar-link.active {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #fff; box-shadow: 0 6px 16px rgba(56,189,248,.35);
}

/* ---- 表格 ---- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
    text-align: left; font-size: 12px; font-weight: 600;
    color: #64748b; padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(248,250,252,.8);
}
.tbl td { padding: 12px; font-size: 13px; border-bottom: 1px solid #f1f5f9; }
.tbl tr:hover td { background: rgba(56,189,248,.04); }

/* ---- 隐藏 number input 箭头 ---- */
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
