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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(135deg, #a855f7, #ec4899, #ef4444);
}

.main-container {
  min-height: 100vh;
  position: relative;
  width: 100%;
}

/* Floating Elements */
.floating-elements {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
}

.floating-1 {
  top: 10%;
  left: 5%;
  width: 4rem;
  height: 4rem;
  background-color: #fde047;
  animation: float 6s ease-in-out infinite;
}

.floating-2 {
  top: 20%;
  right: 10%;
  width: 3rem;
  height: 3rem;
  background-color: #93c5fd;
  animation: float 8s ease-in-out infinite reverse;
}

.floating-3 {
  bottom: 30%;
  left: 15%;
  width: 2.5rem;
  height: 2.5rem;
  background-color: #86efac;
  animation: float 7s ease-in-out infinite;
  animation-delay: 2s;
}

.floating-4 {
  bottom: 20%;
  right: 20%;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #f9a8d4;
  animation: float 9s ease-in-out infinite;
  animation-delay: 1s;
}

.floating-5 {
  top: 60%;
  left: 8%;
  width: 2rem;
  height: 2rem;
  background-color: #a78bfa;
  animation: float 5s ease-in-out infinite;
  animation-delay: 3s;
}

.floating-6 {
  top: 40%;
  right: 5%;
  width: 4.5rem;
  height: 4.5rem;
  background-color: #fbbf24;
  animation: float 10s ease-in-out infinite reverse;
  animation-delay: 4s;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
}

.sparkle-icon {
  width: 1.5rem;
  height: 1.5rem;
  animation: pulse 2s infinite;
}

.navbar-nav {
  display: flex;
  flex-direction: row; /* Force horizontal layout */
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap; /* Prevent wrapping on larger screens */
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap; /* Prevent text wrapping */
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-item i {
  width: 1rem;
  height: 1rem;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.8);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 1);
  border-color: rgba(239, 68, 68, 0.5);
}

/* Dashboard Card */
.dashboard-card {
  max-width: 1200px;
  margin: 2rem auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  z-index: 10;
  margin-bottom: 3rem;
}

.dashboard-header {
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  color: white;
  padding: 2rem;
  text-align: center;
}

.welcome-section h1 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.welcome-section p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.focus-streak {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fbbf24;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.focus-streak i {
  width: 1.25rem;
  height: 1.25rem;
}

/* Dashboard Content Grid */
.dashboard-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.content-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f3f4f6;
}

.card-header i {
  width: 1.25rem;
  height: 1.25rem;
  color: #7c3aed;
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
  flex: 1;
}

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

/* Stats Cards */
.stats-card {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: #7c3aed;
  margin-top: 1rem;
}

/* Distraction Card */
.distraction-card {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  border-color: #ef4444;
}

.distraction-card .card-header i {
  color: #ef4444;
}

.distraction-card .stat-value {
  color: #ef4444;
}

.stat-progress {
  margin-top: 1rem;
}

.stat-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* Focus Score Card */
.focus-score-card {
  text-align: center;
  background: linear-gradient(135deg, #f0f9ff, #dbeafe);
  border-color: #3b82f6;
}

.focus-score-card .card-header i {
  color: #3b82f6;
}

.focus-score {
  color: #3b82f6 !important;
  position: relative;
}

.score-ring {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.score-circle {
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.5s ease;
}

/* Real-time Stats */
.realtime-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #22c55e;
}

.realtime-card .card-header i {
  color: #22c55e;
}

.realtime-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.stat-item i {
  width: 1.25rem;
  height: 1.25rem;
  color: #22c55e;
}

.stat-item div {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-number {
  font-size: 1.125rem;
  font-weight: bold;
  color: #22c55e;
}

/* Tips Card */
.tips-card {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #f59e0b;
}

.tips-card .card-header i {
  color: #f59e0b;
}

.tip-content {
  color: #92400e;
  font-weight: 500;
}

.tip-content p {
  margin: 0;
}

/* Sarcasm Card */
.sarcasm-card {
  grid-column: span 2;
  background: linear-gradient(135deg, #fefbef, #fed7aa);
  border-color: #f59e0b;
  text-align: center;
}

.sarcasm-card .card-header i {
  color: #f59e0b;
}

.sarcasm-content {
  font-size: 1.125rem;
  font-style: italic;
  color: #92400e;
  font-weight: 500;
  padding: 1rem;
  background: rgba(251, 146, 60, 0.1);
  border-radius: 0.5rem;
  border-left: 4px solid #f59e0b;
}

/* Thoughts Card */
.thoughts-card {
  grid-column: span 2;
}

.thoughts-input textarea {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: border-color 0.2s;
}

.thoughts-input textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.thoughts-input .btn {
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  border: none;
  font-weight: 600;
}

.thoughts-input .btn:hover {
  background: linear-gradient(90deg, #6d28d9, #db2777);
  transform: translateY(-1px);
}

.thoughts-input .btn i {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

/* Logs Card */
.logs-card {
  grid-column: span 2;
}

.logs-container {
  max-height: 300px;
  overflow-y: auto;
}

.logs-container .list-group-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  background: #f9fafb;
  font-size: 0.875rem;
  padding: 0.75rem;
}

.logs-container .list-group-item:hover {
  background: #f3f4f6;
}

/* Toast Styles */
.toast {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-width: 20rem;
}

.toast.success {
  border-left: 4px solid #22c55e;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
  }
}

/* Responsive */
@media (max-width: 576px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .navbar-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .dashboard-content {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .dashboard-card {
    margin: 1rem;
  }
  
  .sarcasm-card,
  .thoughts-card,
  .logs-card {
    grid-column: span 1;
  }
}