/* =============================================
   文件名：style.css
   用途：全站统一风格（反主流粗野主义版）
   ============================================= */

:root {
    /* 核心撞色 */
    --accent-yellow: #FFDE00;
    --accent-pink: #FF5A5F;
    --accent-cyan: #00E5FF;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* 极简黑灰 */
    --text: #111111;
    --text-light: #444444;
    --text-mute: #666666;
    --bg: #F4F1EA; 
    
    /* 边框与硬阴影 */
    --border-heavy: 3px solid #111111;
    --border-thin: 2px solid #111111;
    --shadow-hard: 5px 5px 0 0 #111111;
    --shadow-hard-sm: 3px 3px 0 0 #111111;
    
    /* 字体 */
    --font-sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-serif: "Times New Roman", Times, "Songti SC", serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    margin: 30px;
    background-color: var(--bg);
    /* 噪点纹理，拒绝纯平 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   排版：衬线体与大字号混搭
   ============================================= */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 900;
    color: var(--text);
}

h1 { 
    font-size: 2.8rem; 
    line-height: 1.1;
    margin: 0 0 24px; 
    padding-bottom: 12px; 
    border-bottom: var(--border-heavy);
    letter-spacing: -1px;
}
h2 { font-size: 1.8rem; margin: 0 0 16px; }
h3 { font-size: 1.4rem; margin: 0 0 12px; font-family: var(--font-sans); font-weight: 800; }

/* =============================================
   链接
   ============================================= */
a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s steps(2, end); /* 阶梯式生硬反馈 */
    font-weight: 600;
}
a:hover { 
    background-color: var(--accent-yellow); 
    border-bottom: 2px solid var(--text); 
}

/* =============================================
   按钮：重拳出击
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--accent-yellow);
    color: var(--text) !important;
    border: var(--border-thin);
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: var(--shadow-hard-sm);
    transition: transform 0.1s steps(2, end), box-shadow 0.1s steps(2, end);
    line-height: 1.2;
}
.btn:hover { 
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 0 #111111;
    background: var(--accent-yellow);
    opacity: 1;
}
.btn:active { 
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 #111111;
}
.btn:disabled { 
    opacity: .6; 
    cursor: not-allowed; 
    transform: none;
    box-shadow: none;
    background: #ccc;
}

.btn-sm { padding: 4px 10px; font-size: 12px; box-shadow: 2px 2px 0 0 #111111; }
.btn-sm:hover { box-shadow: 3px 3px 0 0 #111111; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* 不同颜色的按钮 */
.btn-secondary { background: #FFF; }
.btn-success { background: var(--success); color: #FFF !important; }
.btn-danger { background: var(--danger); color: #FFF !important; }
.btn-warning { background: var(--warning); color: #FFF !important; }
.btn-purple { background: #d8b4fe; } /* 拒绝高饱和紫，用脏粉紫 */
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--accent-cyan); }

/* =============================================
   卡片：厚重的工业感
   ============================================= */
.card {
    background: #FFF;
    border: var(--border-heavy);
    border-radius: 0;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-hard);
}

/* =============================================
   表格：结构化陈列
   ============================================= */
table {
    border-collapse: collapse;
    width: 100%;
    background: #FFF;
    border: var(--border-heavy);
    box-shadow: var(--shadow-hard);
    font-size: 14px;
    margin-bottom: 24px;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border: var(--border-thin);
}
th {
    background: #111;
    color: #FFF;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
}
tr:hover td { background: var(--accent-cyan); color: #111; }

/* =============================================
   表单：边框要粗，颜色要亮
   ============================================= */
input[type="text"], input[type="password"], input[type="number"],
input[type="email"], textarea, select {
    padding: 10px 14px;
    border: var(--border-thin);
    border-radius: 0;
    font-size: 15px;
    font-family: inherit;
    background: #FFF;
    color: var(--text);
    outline: none;
    transition: all 0.15s;
    width: 100%;
    max-width: 100%;
    font-weight: 600;
}
input:focus, textarea:focus, select:focus {
    background: var(--accent-yellow);
    border-color: #111;
    box-shadow: 4px 4px 0 0 #111;
    transform: translate(-2px, -2px);
}

/* 原生按钮 */
button[type="submit"], button[type="button"]:not(.btn) {
    padding: 10px 24px;
    background: var(--accent-cyan);
    color: var(--text);
    border: var(--border-thin);
    border-radius: 0;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.1s steps(2, end);
}
button[type="submit"]:hover, button[type="button"]:not(.btn):hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 0 #111;
}
button[type="submit"]:active, button[type="button"]:not(.btn):active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 #111;
}
button:disabled { opacity: .6; cursor: not-allowed; background: #ccc; box-shadow: none; transform: none; }

/* =============================================
   提示与徽章
   ============================================= */
.error, .msg-error { 
    color: #FFF; 
    background: var(--danger); 
    padding: 12px; 
    border: var(--border-thin);
    box-shadow: var(--shadow-hard-sm);
    font-weight: 700;
    margin-bottom: 16px;
}
.success, .msg-success { 
    color: #FFF; 
    background: var(--success); 
    padding: 12px; 
    border: var(--border-thin);
    box-shadow: var(--shadow-hard-sm);
    font-weight: 700;
    margin-bottom: 16px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid #111;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 0;
    box-shadow: 2px 2px 0 0 #111;
}
.badge-public { background: var(--success); color: #FFF; }
.badge-private { background: var(--warning); color: #FFF; }
.badge-folder { background: var(--accent-yellow); color: #111; }
.badge-owner { background: #FFF; color: #111; }

/* =============================================
   布局辅助与导航
   ============================================= */
.flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.text-mute { color: var(--text-mute); font-size: 13px; font-weight: 500; }

.page-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    font-size: 15px;
    background: #FFF;
    padding: 12px 16px;
    border: var(--border-thin);
    box-shadow: var(--shadow-hard-sm);
}

/* =============================================
   头像：拒绝圆形（打破常规）
   ============================================= */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 0; /* 强制方形 */
    border: var(--border-thin);
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 2px 2px 0 0 #111;
}
.frame_gold { border-color: #fbbf24 !important; background: #fbbf24; }
.frame_diamond { border-color: #22d3ee !important; background: #22d3ee; }
.frame_rainbow { border-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1 !important; border-width: 3px; }

/* =============================================
   移动端调整：保持粗野感
   ============================================= */
@media (max-width: 640px) {
    body { margin: 16px; font-size: 14px; }
    h1 { font-size: 2rem; }
    th, td { padding: 8px 10px; }
    .card { padding: 16px; box-shadow: 4px 4px 0 0 #111; }
    .btn { padding: 6px 12px; font-size: 13px; }
}

/* =============================================
   移动端专属重构 (宽度小于 768px 生效)
   ============================================= */
    /* 2. 暴力解决表格溢出 —— 让表格变成可横向滑动的区块 */
    table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap !important;
        border: var(--border-thin) !important;
        box-shadow: 3px 3px 0 0 #111 !important;
    }
    
    /* 优化手机端表格的间距 */
    th, td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }