:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #818cf8;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}

.brand-icon {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7175f3, var(--primary));
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* Main Layout */
main {
  flex: 1;
  padding: 2.5rem 0;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem;
}

.hero-tagline {
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Tech Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-card-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Auth Forms */
.auth-wrapper {
  max-width: 440px;
  margin: 2rem auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Dashboard UI */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

/* Todo / Notes list */
.todo-input-card {
  margin-bottom: 2rem;
}

.todo-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.todo-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.todo-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(17, 24, 39, 0.9);
}

.todo-item.completed {
  opacity: 0.65;
  background: rgba(17, 24, 39, 0.35);
}

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

.todo-left {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  flex: 1;
}

.todo-checkbox {
  margin-top: 0.25rem;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.todo-content-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.todo-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.todo-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: pre-line;
}

.todo-meta {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.todo-actions {
  display: flex;
  gap: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

/* System Info Card */
.sys-info-banner {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

.sys-info-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.25s ease-out;
  min-width: 260px;
}

.toast.toast-success {
  border-color: var(--success);
  color: var(--text-main);
}

.toast.toast-error {
  border-color: var(--danger);
  color: var(--text-main);
}

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

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 0;
  background: rgba(11, 15, 25, 0.9);
  color: var(--text-subtle);
  font-size: 0.85rem;
  text-align: center;
  margin-top: auto;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .nav-container {
    height: auto;
    padding: 1rem 0;
    flex-direction: column;
    gap: 0.75rem;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
