:root {
    --primary: #4a90e2;
    --primary-hover: #357abd;
    --glass: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text-main: #2c3e50;
    --text-sub: #7f8c8d;
    --shadow-soft: 0 10px 40px rgba(174, 190, 205, 0.2);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(120deg, #e0f2ff, #f0f7ff, #ffffff, #e6f3ff);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    color: var(--text-main);
    /* 默认 Flex 居中 (仅针对登录页/注册页有效，后台会覆盖此属性) */
    display: flex; justify-content: center; align-items: center; 
    padding: 20px;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%; max-width: 400px;
    background: var(--glass); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-radius: 24px; border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft); padding: 35px 30px; position: relative;
    animation: slideUpFade 0.8s var(--ease-smooth) backwards;
}
.container.admin-wide { max-width: 1200px; margin-top: 5vh; align-self: flex-start; }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

h2 { text-align: center; margin-bottom: 25px; color: var(--text-main); font-weight: 800; }

/* === 修复：输入框样式 (排除 radio, checkbox, hidden) === */
.input-group { margin-bottom: 20px; position: relative; transition: transform 0.3s; }
.input-group:focus-within { transform: scale(1.02); }
.input-group.has-dropdown { z-index: 100; }

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    width: 100%; padding: 15px 18px; border-radius: 14px; border: 2px solid transparent;
    background: #f8fafd; border: 1px solid #eef2f7; font-size: 14px; color: #333;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 10px 20px rgba(74, 144, 226, 0.15); transform: translateY(-2px); }

/* 按钮 */
button, .btn {
    width: 100%; padding: 15px; border-radius: 14px; border: none;
    background: var(--primary); color: white; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: all 0.3s var(--ease-smooth);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3); position: relative; overflow: hidden;
}
button:hover, .btn:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(74, 144, 226, 0.4); }
button:active, .btn:active { transform: scale(0.95); }

/* 标签页 */
.tabs { display: flex; background: rgba(0,0,0,0.03); border-radius: 16px; padding: 5px; margin-bottom: 25px; }
.tab { flex: 1; text-align: center; padding: 12px 0; border-radius: 12px; cursor: pointer; color: var(--text-sub); font-size: 14px; font-weight: 600; transition: 0.3s; }
.tab.active { background: #fff; color: var(--primary); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

/* 单选卡片 (Radio Card) */
.radio-group { display: flex; gap: 12px; margin-bottom: 20px; }
.radio-card {
    flex: 1; display: flex; align-items: center; padding: 15px; 
    border: 2px solid transparent; background: #f8f9fa;
    border-radius: 14px; cursor: pointer; transition: all 0.3s; position: relative;
}
.radio-card:hover { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: translateY(-2px); }
.radio-card:has(input:checked) { background: #eef6ff; border-color: var(--primary); box-shadow: 0 8px 20px rgba(74, 144, 226, 0.15); }
.radio-card input[type="radio"] { width: 20px !important; height: 20px !important; margin-right: 12px; accent-color: var(--primary); flex-shrink: 0; }
.radio-info { display: flex; flex-direction: column; }
.radio-info strong { font-size: 14px; color: #333; margin-bottom: 4px; }
.radio-info span { font-size: 12px; color: #888; }

/* 下拉列表 */
#authorList {
    position: absolute; top: calc(100% + 10px); left: 0; width: 100%;
    background: #fff; border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    max-height: 240px; overflow-y: auto; z-index: 200; display: none;
    animation: dropdownEnter 0.3s var(--ease-smooth);
}
@keyframes dropdownEnter { from { opacity: 0; transform: scaleY(0.8) translateY(-10px); } to { opacity: 1; transform: scaleY(1) translateY(0); } }
.author-item { padding: 15px; border-bottom: 1px solid #f5f7fa; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.author-item:hover { background: #f8fbff; padding-left: 19px; }

/* 弹窗 */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
.modal.active { opacity: 1; }
.modal-box { background: #fff; width: 420px; padding: 35px; border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.2); transform: scale(0.8); opacity: 0; transition: all 0.4s var(--ease-smooth); }
.modal.active .modal-box { transform: scale(1); opacity: 1; }

.panel { display: none; } .panel.active { display: block; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* Toast */
#toast { visibility: hidden; min-width: 200px; background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px); color: #fff; text-align: center; border-radius: 50px; padding: 14px 28px; position: fixed; z-index: 9999; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); font-weight: 500; opacity: 0; transition: all 0.4s; }
#toast.show { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }

/* 列表动画 */
.grid > div, tbody tr { animation: slideInStagger 0.5s var(--ease-smooth) backwards; }
.grid > div:nth-child(1) { animation-delay: 0.05s; } .grid > div:nth-child(2) { animation-delay: 0.1s; }
.grid > div:nth-child(3) { animation-delay: 0.15s; } .grid > div:nth-child(4) { animation-delay: 0.2s; }
@keyframes slideInStagger { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) { .container { padding: 30px 20px; } }
