* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'Microsoft YaHei', sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== Nav ========== */
nav {
  background: rgba(20,20,35,0.95);
  backdrop-filter: blur(10px);
  padding: 0 30px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: #ff6b8a;
  text-decoration: none;
}

.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: #999;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover { color: #ff6b8a; }

/* ========== Main ========== */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
}

footer {
  text-align: center;
  padding: 20px;
  color: #555;
  font-size: 13px;
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  padding: 40px 0 30px;
}

.hero h1 {
  font-size: 32px;
  color: #fff;
  font-weight: normal;
}

.clock {
  font-size: 60px;
  font-weight: 200;
  color: #ff6b8a;
  margin: 10px 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
}

.date {
  color: #888;
  font-size: 16px;
}

/* ========== Grid ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-icon { font-size: 36px; margin-bottom: 10px; }
.card-title { font-size: 20px; font-weight: 600; color: #fff; }
.card-stat { font-size: 13px; color: #888; margin-top: 4px; }
.card-preview { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.card-preview span { font-size: 13px; color: #666; }

.card-pink { border-color: rgba(255,107,138,0.2); }
.card-pink:hover { border-color: rgba(255,107,138,0.5); }
.card-blue { border-color: rgba(100,150,255,0.2); }
.card-blue:hover { border-color: rgba(100,150,255,0.5); }
.card-green { border-color: rgba(100,220,150,0.2); }
.card-green:hover { border-color: rgba(100,220,150,0.5); }
.card-gray { border-color: rgba(255,255,255,0.05); cursor: default; }
.card-orange { border-color: rgba(255,180,80,0.2); }
.card-orange:hover { border-color: rgba(255,180,80,0.5); }
.card-gray:hover { transform: none; box-shadow: none; }
.coming-soon { opacity: 0.5; }

/* ========== Page Header ========== */
.page-header {
  text-align: center;
  padding: 20px 0 30px;
}
.page-header h2 { font-size: 28px; color: #fff; }
.page-header p { color: #888; margin-top: 6px; }

/* ========== Form ========== */
.form-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"], input[type="date"], textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, textarea:focus { border-color: rgba(255,107,138,0.5); }
textarea { width: 100%; resize: vertical; font-family: inherit; }

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
  color: #fff;
}
.btn:hover { opacity: 0.8; }
.btn-pink { background: #ff6b8a; }
.btn-blue { background: #4a8eff; }
.btn-green { background: #4cd9a0; }

.btn-sm {
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.btn-sm.btn-blue { background: #4a8eff; }
.btn-sm.btn-red { background: #e05555; }

.btn-del {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
}
.btn-del:hover { color: #ff4444; }

/* ========== Anniversary ========== */
.anniversary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.anni-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s;
}
.anni-card:hover { transform: translateY(-2px); }

.anni-past { border-color: rgba(255,107,138,0.2); }
.anni-future { border-color: rgba(100,150,255,0.2); }

.anni-icon { font-size: 40px; margin-bottom: 8px; }
.anni-title { font-size: 18px; font-weight: 600; color: #fff; }
.anni-date { font-size: 13px; color: #888; margin-top: 4px; }
.anni-days { margin-top: 16px; }
.days-num {
  font-size: 42px;
  font-weight: 200;
  color: #ff6b8a;
}
.anni-label { font-size: 12px; color: #888; margin-top: 2px; }

/* ========== Upload ========== */
.upload-form { display: flex; align-items: center; gap: 12px; }
.file-label {
  background: #4a8eff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.file-label:hover { opacity: 0.8; }
.file-name { color: #888; font-size: 13px; }

.breadcrumb {
  margin-bottom: 16px;
  font-size: 14px;
  color: #888;
}
.breadcrumb a { color: #4a8eff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ========== File List ========== */
.file-list { display: flex; flex-direction: column; gap: 4px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  transition: background 0.15s;
}
.file-item:hover { background: rgba(255,255,255,0.05); }
.folder-item { text-decoration: none; color: inherit; }

.file-icon { font-size: 20px; flex-shrink: 0; }
.file-name-text { flex: 1; font-size: 15px; color: #e0e0e0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 13px; color: #888; min-width: 70px; text-align: right; }
.file-date { font-size: 13px; color: #666; min-width: 100px; }
.file-actions { display: flex; gap: 6px; }

/* ========== Notes ========== */
.note-form { display: flex; flex-direction: column; gap: 10px; }
.note-form .btn { align-self: flex-end; }

.notes-list { display: flex; flex-direction: column; gap: 12px; }

.note-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 20px;
}

.note-content {
  font-size: 15px;
  line-height: 1.6;
  color: #e0e0e0;
  white-space: pre-wrap;
  word-break: break-all;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.note-time { font-size: 12px; color: #666; }

/* ========== Common ========== */
.empty {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

.flash {
  background: rgba(255,107,138,0.15);
  border: 1px solid rgba(255,107,138,0.3);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  color: #ff6b8a;
}

/* ========== Mobile ========== */
@media (max-width: 600px) {
  nav { padding: 0 15px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  main { padding: 16px 12px; }
  .clock { font-size: 40px; }
  .hero h1 { font-size: 24px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 16px; }
  .inline-form { flex-direction: column; }
  .file-date { display: none; }
  .file-size { display: none; }
  .anniversary-grid { grid-template-columns: 1fr 1fr; }
  .days-num { font-size: 32px; }
}

/* ========== Photos ========== */
.photo-upload-form .upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.photo-label { flex-shrink: 0; }
.selected-files { font-size: 13px; color: #888; margin-top: 8px; }

.album-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.album-tab {
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}
.album-tab:hover { border-color: rgba(255,107,138,0.3); color: #fff; }
.album-tab.active { background: rgba(255,107,138,0.15); border-color: rgba(255,107,138,0.4); color: #ff6b8a; }
.album-count {
  background: rgba(255,255,255,0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 4px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.photo-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

.photo-img {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  cursor: pointer;
}
.photo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.photo-card:hover .photo-img img { transform: scale(1.05); }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 28px;
}
.photo-card:hover .photo-overlay { opacity: 1; }

.photo-info { padding: 10px 12px; }
.photo-name { font-size: 13px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-meta { display: flex; justify-content: space-between; font-size: 11px; color: #666; margin-top: 4px; }

.photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-card:hover .photo-del { opacity: 1; }

/* ========== Lightbox ========== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-info {
  margin-top: 12px;
  text-align: center;
}
.lb-name { font-size: 16px; color: #fff; }
.lb-desc { font-size: 14px; color: #aaa; margin-top: 4px; }
.lb-meta { font-size: 12px; color: #666; margin-top: 4px; }

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: background 0.2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .photo-img { height: 140px; }
  .photo-upload-form .upload-row { flex-direction: column; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}
