:root {
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #000000; /* Minimalist black */
  --primary-hover: #1e293b;
  --surface: #ffffff;
  --surface-blur: rgba(255, 255, 255, 0.7);
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px rgba(0,0,0,0.05);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 60px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  /* Mobile app feel constraints */
  max-width: 480px; /* Tablet up to maybe 768, but we center it */
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  box-shadow: var(--shadow-glow);
}

@media (min-width: 481px) {
  body {
    background-color: #e2e8f0; /* Darker background outside the app area on desktop */
  }
  .app-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-color);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
  }
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Glassmorphism Header */
header.top-nav {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: var(--surface-blur);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

header .icon-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

header .icon-btn:active {
  transform: scale(0.9);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-lg);
}

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

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.5);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Search */
.search-container {
  padding: 1rem 20px;
  position: sticky;
  top: var(--nav-height);
  background: var(--bg-color);
  z-index: 40;
}

.search-input-wrapper {
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* Sidebar / Drawer menu */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--surface);
  z-index: 101;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(300px);
}

.sidebar-header {
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
}

.sidebar-menu a i {
  margin-right: 1rem;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.sidebar-menu a:hover {
  background: var(--bg-color);
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--border);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* Utility */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
