/* ============================================================
   学习记录 study.s1.css
   蓝色渐变主题 + 玻璃拟态，移动端自适应
   ============================================================ */

.study-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(239,246,255,0.92));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.10);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.study-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(14,165,233,0.10), transparent 70%);
    pointer-events: none;
}
.study-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(59,130,246,0.08), transparent 70%);
    pointer-events: none;
}
.study-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%) !important;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
    animation: study-breath 3s ease-in-out infinite;
}
@keyframes study-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(59,130,246,0.35); }
    50% { box-shadow: 0 6px 26px rgba(14,165,233,0.55); }
}

/* ---------- 登录引导 ---------- */
.study-login-guide { text-align: center; padding: 34px 16px 26px; position: relative; z-index: 1; }
.study-login-guide i { font-size: 40px; background: linear-gradient(135deg,#3b82f6,#0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.study-login-guide h3 { margin: 12px 0 6px; font-size: 1.05rem; color: #1e293b; }
.study-login-guide p { margin: 0 0 18px; font-size: 0.85rem; color: #64748b; }
.study-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.study-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
}
.study-login-btns a.main { background: linear-gradient(135deg,#3b82f6,#0ea5e9); color: #fff; box-shadow: 0 6px 16px rgba(59,130,246,0.35); }
.study-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(14,165,233,0.45); }
.study-login-btns a.ghost { border: 1.5px solid rgba(59,130,246,0.45); color: #1d4ed8; background: rgba(255,255,255,0.7); }
.study-login-btns a.ghost:hover { background: rgba(59,130,246,0.08); }

/* ---------- Tabs ---------- */
.study-tabs {
    display: flex; gap: 5px; margin: 6px 0 16px;
    background: rgba(219,234,254,0.55); border: 1px solid rgba(59,130,246,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.study-tabs::-webkit-scrollbar { display: none; }
.study-tab {
    flex: 1 0 auto; border: none; background: transparent; cursor: pointer;
    padding: 9px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.study-tab i { font-size: 0.8rem; }
.study-tab:hover { color: #1d4ed8; }
.study-tab.active {
    background: linear-gradient(135deg,#3b82f6,#0ea5e9); color: #fff;
    box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}
.study-pane { display: none; animation: study-slide-in .3s ease; position: relative; z-index: 1; }
.study-pane.active { display: block; }
@keyframes study-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 概览卡 ---------- */
.study-overview-card {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: linear-gradient(135deg, #dbeafe 0%, #bae6fd 100%);
    border-radius: 16px; padding: 18px 20px;
    border: 1px solid rgba(59,130,246,0.4);
    box-shadow: 0 6px 20px rgba(59,130,246,0.10);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.study-overview-main { flex: 1; min-width: 0; }
.study-overview-label { font-size: 0.78rem; color: #1e40af; font-weight: 600; letter-spacing: 0.5px; }
.study-overview-date { font-size: 1.5rem; font-weight: 700; color: #1e3a8a; margin: 4px 0 2px; }
.study-overview-sub { font-size: 0.82rem; color: #1e40af; }
.study-overview-side { display: flex; flex-direction: column; gap: 6px; }
.study-overview-side-item { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: #1e3a8a; font-weight: 500; }
.study-ov-ico { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.5); display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; }

/* ---------- 表单 ---------- */
.study-form-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(59,130,246,0.22);
    border-radius: 16px; padding: 18px;
}
.study-form-title { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: #1e3a8a; margin-bottom: 16px; }
.study-form-title i { color: #3b82f6; }

.study-field-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.study-field { flex: 1; min-width: 130px; margin-bottom: 14px; }
.study-field label { display: block; font-size: 0.82rem; font-weight: 600; color: #475569; margin-bottom: 7px; }
.study-field label i { color: #3b82f6; margin-right: 4px; }
.study-field input[type="date"], .study-field input[type="number"], .study-field input[type="text"] {
    width: 100%; padding: 10px 12px; border: 1.5px solid rgba(59,130,246,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.study-field input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

.study-content-input {
    width: 100%; box-sizing: border-box;
    padding: 11px 12px; border: 1.5px solid rgba(59,130,246,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff; resize: vertical; min-height: 80px; font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.study-content-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

.study-note-input {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1.5px solid rgba(59,130,246,0.25);
    border-radius: 10px; font-size: 0.88rem; color: #1e293b;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.study-note-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

/* 保存按钮 */
.study-save-row { display: flex; gap: 10px; margin-top: 6px; }
.study-save-btn {
    flex: 1; border: none; cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#3b82f6,#0ea5e9);
    box-shadow: 0 6px 16px rgba(59,130,246,0.35);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s ease;
}
.study-save-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(14,165,233,0.45); }
.study-cancel-btn {
    border: 1.5px solid rgba(59,130,246,0.4); cursor: pointer;
    padding: 12px 20px; border-radius: 12px;
    font-size: 0.92rem; font-weight: 600; color: #1d4ed8; background: rgba(255,255,255,0.7);
    transition: all .2s;
}
.study-cancel-btn:hover { background: rgba(59,130,246,0.08); }

/* ---------- 筛选 ---------- */
.study-filter-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.study-filter-row input {
    padding: 8px 12px; border: 1.5px solid rgba(59,130,246,0.25);
    border-radius: 10px; font-size: 0.82rem; color: #1e293b; background: #fff;
}
.study-filter-row input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.study-filter-btn {
    border: none; cursor: pointer; padding: 8px 14px; border-radius: 10px;
    font-size: 0.82rem; font-weight: 600; color: #fff;
    background: linear-gradient(135deg,#3b82f6,#0ea5e9);
    display: inline-flex; align-items: center; gap: 5px;
    transition: all .2s;
}
.study-filter-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.3); }

/* ---------- 统计页 ---------- */
.study-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.study-stat-card {
    background: rgba(255,255,255,0.8); border-radius: 14px; padding: 14px;
    border: 1px solid rgba(59,130,246,0.18);
}
.study-stat-card.c1 { background: linear-gradient(135deg, #dbeafe, #fff); }
.study-stat-card.c2 { background: linear-gradient(135deg, #cffafe, #fff); }
.study-stat-card.c3 { background: linear-gradient(135deg, #fef3c7, #fff); }
.study-stat-card.c4 { background: linear-gradient(135deg, #d1fae5, #fff); }
.study-stat-label { font-size: 0.78rem; color: #64748b; margin-bottom: 6px; }
.study-stat-label i { margin-right: 4px; }
.study-stat-value { font-size: 1.5rem; font-weight: 800; color: #1e293b; }
.study-stat-value small { font-size: 0.8rem; font-weight: 500; color: #64748b; }

.study-top-title { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: #1e3a8a; margin: 18px 0 12px; }
.study-top-title i { color: #3b82f6; }

.study-category-dist { display: flex; flex-direction: column; gap: 8px; }
.study-cat-bar { display: flex; align-items: center; gap: 10px; }
.study-cat-bar .study-cat-ico { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem; flex-shrink: 0; }
.study-cat-bar .study-cat-info { flex: 1; min-width: 0; }
.study-cat-bar .study-cat-head { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 4px; }
.study-cat-bar .study-cat-head .study-cat-nm { color: #475569; font-weight: 500; }
.study-cat-bar .study-cat-head .study-cat-pct { color: #94a3b8; }
.study-cat-bar .study-cat-track { height: 7px; background: rgba(59,130,246,0.12); border-radius: 999px; overflow: hidden; }
.study-cat-bar .study-cat-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }

/* ---------- 历史列表 ---------- */
.study-history-list { display: flex; flex-direction: column; gap: 10px; }
.study-history-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.8); border: 1px solid rgba(59,130,246,0.18);
    border-radius: 12px; padding: 12px 14px;
}
.study-hist-dot { width: 10px; height: 10px; border-radius: 50%; background: #3b82f6; flex-shrink: 0; }
.study-hist-info { flex: 1; min-width: 0; }
.study-hist-date { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
.study-hist-meta { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }
.study-hist-actions { display: flex; gap: 6px; }
.study-hist-btn { border: none; background: rgba(59,130,246,0.08); color: #1d4ed8; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; transition: all .2s; }
.study-hist-btn:hover { background: rgba(59,130,246,0.18); }
.study-hist-btn.del { color: #ef4444; background: rgba(239,68,68,0.08); }
.study-hist-btn.del:hover { background: rgba(239,68,68,0.18); }

.study-empty { text-align: center; padding: 28px 16px; color: #94a3b8; }
.study-empty i { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.study-empty div { font-size: 0.85rem; }

.study-pager { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.study-page-btn {
    border: 1px solid rgba(59,130,246,0.3); background: #fff; color: #1d4ed8;
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 0.82rem; font-weight: 600;
    transition: all .2s;
}
.study-page-btn:hover { background: rgba(59,130,246,0.1); }
.study-page-btn.active { background: linear-gradient(135deg,#3b82f6,#0ea5e9); color: #fff; border-color: transparent; }
.study-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Toast ---------- */
.study-toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #fff; padding: 12px 20px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; font-weight: 500; z-index: 999999;
    border-left: 4px solid #3b82f6;
    animation: study-toast-in .3s ease;
    max-width: 90vw;
}
.study-toast.success { border-left-color: #10b981; }
.study-toast.error { border-left-color: #ef4444; }
.study-toast.warning { border-left-color: #f59e0b; }
.study-toast.info { border-left-color: #3b82f6; }
.study-toast i { font-size: 1rem; }
.study-toast.success i { color: #10b981; }
.study-toast.error i { color: #ef4444; }
.study-toast.warning i { color: #f59e0b; }
.study-toast.info i { color: #3b82f6; }
@keyframes study-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-15px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 弹窗 ---------- */
.study-modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,0.45);
    z-index: 999998; display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: study-fade .2s ease;
}
@keyframes study-fade { from { opacity: 0; } to { opacity: 1; } }
.study-modal {
    background: #fff; border-radius: 18px; max-width: 420px; width: 100%;
    padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: study-pop .25s ease;
    max-height: 85vh; overflow-y: auto;
}
@keyframes study-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.study-modal-title { font-size: 1.05rem; font-weight: 700; color: #1e3a8a; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.study-modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
.study-modal-row:last-child { border-bottom: none; }
.study-modal-row .study-mr-label { color: #64748b; }
.study-modal-row .study-mr-val { font-weight: 600; color: #1e293b; }
.study-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.study-modal-btn {
    flex: 1; border: none; cursor: pointer; padding: 10px; border-radius: 10px;
    font-size: 0.88rem; font-weight: 600; transition: all .2s;
}
.study-modal-btn.primary { background: linear-gradient(135deg,#3b82f6,#0ea5e9); color: #fff; }
.study-modal-btn.primary:hover { transform: translateY(-1px); }
.study-modal-btn.ghost { background: rgba(59,130,246,0.08); color: #1d4ed8; }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .study-card { padding: 14px; border-radius: 16px; }
    .study-tab { padding: 8px 10px; font-size: 0.78rem; }
    .study-tab i { display: none; }
    .study-overview-card { padding: 14px; }
    .study-overview-date { font-size: 1.25rem; }
    .study-form-card { padding: 14px; }
    .study-field-row { gap: 8px; }
    .study-stat-grid { gap: 8px; }
    .study-stat-card { padding: 12px; }
    .study-stat-value { font-size: 1.25rem; }
}
