/* style.css — 覆盖与增强（保留玻璃拟态风格，增加移动端、按钮、输入框、背景开关等） */

:root{
  --accent: #4A90E2;
  --danger: #E24A4A;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.08);
  --muted: rgba(255,255,255,0.75);
  --text: #fff;
  --radius: 12px;
}

/* 基础布局安全 */
*{box-sizing:border-box}
html,body{height:100%;margin:0;padding:0;overflow-x:hidden;font-family:"Inter", "PingFang SC", "Helvetica Neue", Arial, sans-serif;color:var(--text)}
.bg{position:fixed;inset:0;background:url('assets/bg.jpg') center/cover no-repeat;z-index:-1;transition:filter .28s ease, opacity .28s ease;}
.bg.blur-on{filter: blur(8px) brightness(.55);}
.bg.blur-off{filter: none; opacity: 1;}

/* 主容器 —— 统一左右内边距，防止移动端右边距消失 */
.layout{max-width:1100px;margin:28px auto;padding:20px;display:grid;grid-template-columns:1fr 420px;grid-gap:20px;box-sizing:border-box;}
@media (max-width:920px){ .layout{grid-template-columns:1fr;padding:14px;grid-gap:14px} }

/* 玻璃卡片 */
.glass{background:var(--glass-bg);border:1px solid var(--glass-border);backdrop-filter:blur(10px) saturate(120%);border-radius:var(--radius);padding:18px;box-shadow:0 8px 30px rgba(0,0,0,0.45);}

/* 标题 */
.site-header{display:flex;flex-direction:column;align-items:center;text-align:center}
.site-header .title{font-size:22px;font-weight:700}
.site-header .sub{font-size:13px;color:var(--muted);margin-top:6px}

/* 面板 */
.panel{padding:12px}
.muted{color:var(--muted);font-size:13px}

/* 输入框 */
/* 输入框美化（覆盖旧样式） */
input[type="text"], input[type="password"], input[type="date"]{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  transition: box-shadow .3s ease, transform .2s ease, border-color .2s ease;
  outline: none;
}
input[type="text"]:hover,
input[type="password"]:hover,
input[type="date"]:hover {
  transform: translateY(-2px);
  border-color: rgba(74,144,226,0.6);
  box-shadow: 0 4px 12px rgba(74,144,226,0.12);
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
  border-color: rgba(74,144,226,0.9);
  box-shadow: 0 8px 20px rgba(74,144,226,0.25);
  transform: translateY(-2px);
}

/* 防止黄色 outline（Chrome/Android） */
input:focus { -webkit-tap-highlight-color: transparent; -webkit-appearance: none; }

/* 按钮统一翻新 */
.btn{
  display:inline-block; padding:10px 14px; border-radius:10px; border:none; cursor:pointer; background:var(--accent); color:#fff; font-weight:600;
  box-shadow: 0 8px 18px rgba(74,144,226,0.12); transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:hover{ transform: translateY(-3px); box-shadow: 0 14px 34px rgba(74,144,226,0.18); }
.btn.ghost{ background: transparent; border:1px solid rgba(255,255,255,0.06); box-shadow:none; color:var(--text); }
.btn.danger{ background: var(--danger); box-shadow: 0 8px 18px rgba(226,74,74,0.12); }
.btn.mini{ padding:6px 8px; font-size:13px; border-radius:8px; }

/* timer 显示 */
.timer-display.big{ font-size:36px; font-weight:700; text-align:center; margin:8px 0; }

/* 日历 */
.calendar{padding:8px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.cal-cell{background:rgba(255,255,255,0.03);padding:12px;border-radius:8px;text-align:center;position:relative;cursor:default;color:var(--muted)}
.cal-cell.day-has{background:linear-gradient(135deg,#3a7bd5 0%, #4facfe 100%);color:#fff;box-shadow:0 6px 18px rgba(74,144,226,0.18);cursor:pointer;transition:transform .14s ease}
.cal-cell.day-has:hover{transform:translateY(-6px) scale(1.04)}
.cal-cell .dot{position:absolute;bottom:6px;right:6px;width:8px;height:8px;background:#fff;border-radius:50%;opacity:.9}

/* legend */
.legend-item{display:flex;justify-content:space-between;padding:8px 0;border-top:1px dashed rgba(255,255,255,0.03);font-size:14px}

/* records list */
.records-area{margin-top:10px}
.record-item{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid rgba(255,255,255,0.03)}

/* footer */
.site-footer{display:flex;justify-content:center;padding:12px}
.site-footer a{color:var(--accent);text-decoration:none;padding:6px 12px;border-radius:8px;background:rgba(255,255,255,0.03)}

/* mobile fix: prevent right overflow and unify padding */
@media (max-width:480px){
  .layout{padding-left:14px;padding-right:14px;}
  .cal-cell{padding:10px;font-size:13px}
  .timer-display.big{font-size:28px}
}

/* small helpers used by scripts */
.hidden{display:none !important;}
.center{text-align:center;}

/* 强制覆盖：按钮与输入交互 (放在文件末尾以便覆盖其他样式) */
.layout .btn{ transform: translateZ(0); transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease !important; }
.layout .btn:hover{ transform: translateY(-4px) !important; }
.layout input[type="text"], .layout input[type="password"], .layout input[type="date"]{
  -webkit-appearance:none; outline:none; border:none; border-radius:10px; padding:10px 12px;
  background: rgba(255,255,255,0.03); color:var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.layout input[type="text"]:focus, .layout input[type="password"]:focus, .layout input[type="date"]:focus{
  box-shadow: 0 8px 20px rgba(74,144,226,0.20) !important; border-radius:10px;
  border: 1px solid rgba(74,144,226,0.9) !important;
}
#bg.blur-on{ filter: blur(8px) brightness(.55) !important; }
#bg.blur-off{ filter: none !important; opacity:1 !important; }

/* ========== 玻璃拟态输入框 & 按钮 & 响应式 ========== */
.form-input{ width:100%; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.06); background:rgba(255,255,255,0.03); color:var(--text); transition:box-shadow .2s ease, transform .12s ease; outline:none; }
.form-input:hover{ transform:translateY(-2px); border-color: rgba(74,144,226,0.5); }
.form-input:focus{ box-shadow:0 10px 30px rgba(74,144,226,0.18); border-color: rgba(74,144,226,0.9); }

.glass-btn{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: transform .12s ease, box-shadow .12s ease;
}
.glass-btn:hover{ transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.35); }
/* 透明玻璃拟态删除按钮 */
.btn.danger.glass-btn {
    background: rgba(255,255,255,0.1); /* 透明玻璃 */
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.btn.danger.glass-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px rgba(255,255,255,0.02) inset !important; box-shadow:0 0 0 1000px rgba(255,255,255,0.02) inset !important; -webkit-text-fill-color:var(--text) !important; }

@media (max-width:480px){
  .layout{ padding-left:14px; padding-right:14px; }
  .panel{ padding:12px; }
}

.site-footer a {
    color: #fff !important;
    text-decoration: underline;
    transition: color 0.3s;
}
.site-footer a:hover {
    color: #e0e0e0;
}