/* Global Styles & Design System */
:root {
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #eff6ff 100%);
  --bg-dark: #f8fafc;
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-border: rgba(226, 232, 240, 0.8);
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #8b5cf6;
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow-glow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0284c7 100%);
  --bg-dark: #090d16;
  --panel-bg: rgba(15, 23, 42, 0.75);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --accent: #a855f7;
  --card-bg: rgba(30, 41, 59, 0.65);
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Glow Effects */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  pointer-events: none;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background: #38bdf8;
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: #a855f7;
  bottom: -150px;
  right: -100px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav {
  display: flex;
  gap: 8px;
  background: var(--card-bg);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--panel-border);
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item.active, .nav-item:hover {
  background: var(--primary);
  color: white;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--card-bg);
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn:hover {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero-section {
  padding: 40px 0 20px 0;
}

.hero-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: white;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.15);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-weight: 600;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 30px 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.filter-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: white;
}

/* Diaries Grid */
.diaries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.diary-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  cursor: pointer;
}

.diary-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.diary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.diary-category {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.diary-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.diary-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.diary-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.diary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 12px;
}

.diary-tags {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Todos */
.todo-card {
  padding: 24px;
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  transition: var(--transition);
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.todo-text {
  font-size: 0.95rem;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.priority-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: 700;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.priority-low { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* About & Compliance Notice */
.about-card {
  padding: 32px;
}

.compliance-notice-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 20px 0;
}

.notice-icon {
  font-size: 1.8rem;
  color: var(--primary);
}

.notice-text {
  line-height: 1.6;
  font-size: 0.95rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.info-block {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
}

.info-block h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;

}

.info-block ul {
  list-style: none;
  line-height: 1.8;
  font-size: 0.9rem;

}

/* Footer */
.site-footer {
  margin-top: auto;
  background: rgba(9, 13, 22, 0.8);
  border-top: 1px solid var(--panel-border);
  padding: 24px 0;

}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.footer-statement {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--card-bg);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  line-height: 1.5;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  width: 100%;
  max-width: 650px;
  position: relative;
  padding: 30px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-small {
  max-width: 420px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }
  
  .hero-card {
    flex-direction: column;
    text-align: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
