/* style.css - Modern Wellness SaaS Design */
:root {
  --primary-purple: #8b5cf6;
  --primary-blue: #3b82f6;
  --primary-pink: #ec4899;
  --primary-green: #10b981;
  --soft-purple: #e9d5ff;
  --soft-blue: #dbeafe;
  --soft-pink: #fce7f3;
  --soft-green: #d1fae5;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--soft-purple) 0%, var(--soft-blue) 25%, var(--soft-pink) 50%, var(--soft-green) 75%, var(--soft-purple) 100%);
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: gradientShift 15s ease infinite;
  min-height: 100vh;
  color: #374151;
  line-height: 1.6;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body.customize-page {
  background: linear-gradient(135deg, var(--soft-purple) 0%, var(--soft-blue) 25%, var(--soft-pink) 50%, var(--soft-green) 75%, var(--soft-purple) 100%),
              url('image/train img.png') center/cover no-repeat;
  background-size: 400% 400%, cover;
  background-attachment: fixed;
  animation: gradientShift 15s ease infinite;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-purple);
}

.nav-brand .nav-logo {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  background: var(--glass-bg);
  color: var(--primary-purple);
  transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-purple);
}

.mobile-menu {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  flex-direction: column;
  z-index: 999;
}

.mobile-menu.hidden {
  display: none;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  list-style: none;
  gap: 0;
}

.mobile-nav-links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-links .nav-link {
  display: block;
  padding: 1rem 2rem;
  border-radius: 0;
  text-align: left;
}

.mobile-nav-links .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: none;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: #374151;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* Glassmorphism */
.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.glassmorphism:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-illustration {
  max-width: 300px;
  margin: 2rem auto;
  opacity: 0.8;
}

/* Login Page */
.login-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-purple);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Habit Cards */
.habits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.habit-card {
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
}

.habit-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  display: flex;
  align-items: center;
  justify-content: center;
}

.habit-icon img {
  width: 30px;
  height: 30px;
}

.habit-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2f4b74;
}

.habit-card p {
  color: #5e6779;
  font-size: 0.9rem;
}

/* Daily Tracker */
.daily-habits-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.daily-habit-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  gap: 1rem;
  transition: var(--transition);
}

.daily-habit-card.completed {
  background: linear-gradient(135deg, var(--soft-green), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--primary-green);
}

.habit-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.habit-info p {
  color: #6b7280;
  font-size: 0.85rem;
}

.habit-check-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: white;
  color: #6b7280;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.habit-check-btn.checked {
  background: var(--primary-green);
  color: white;
  border-color: var(--primary-green);
}

.streak-display {
  text-align: center;
  margin-bottom: 2rem;
}

.streak-display h2 {
  font-size: 2rem;
  color: var(--primary-purple);
  margin-bottom: 0.5rem;
}

/* Progress Page */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-card h3 {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-purple);
}

.badges-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.badge-card {
  text-align: center;
  padding: 2rem 1rem;
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.badge-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.badge-card p {
  color: #2a53a5;
  font-size: 0.9rem;
}

/* Customize Page */
.customize-section {
  margin-bottom: 3rem;
}

.customize-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #32435c;
}

.user-habits-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.user-habit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}

.suggested-habits-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.suggested-habit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
}

.habit-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.habit-info p {
  color: #6b7280;
  font-size: 0.9rem;
}

.add-custom-form {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(173, 145, 145, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-content {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.habit-detail .habit-header {
  text-align: center;
  margin-bottom: 2rem;
}

.habit-detail-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  padding: 1rem;
}

.habit-detail h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1f2937;
}

.habit-section {
  margin-bottom: 2rem;
}

.habit-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.habit-section ul {
  list-style: none;
  padding-left: 0;
}

.habit-section li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.habit-section li:before {
  content: '✓';
  color: var(--primary-green);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Chatbot */
#chatbot-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

#chatbot-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

#chatbot-toggle:hover {
  transform: scale(1.1);
}

#chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chatbot-header {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

#chatbot-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
}

#chatbot-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chatbot-message {
  padding: 0.75rem;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

.chatbot-message.user {
  background: var(--primary-purple);
  color: white;
  align-self: flex-end;
}

.chatbot-message.bot {
  background: rgba(255, 255, 255, 0.8);
  color: #374151;
  align-self: flex-start;
}

#chatbot-input-area {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  gap: 0.5rem;
}

#chatbot-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.8);
}

#chatbot-send {
  padding: 0.5rem 1rem;
  background: var(--primary-purple);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Achievement Notification */
.achievement-notification {
  position: fixed;
  top: 100px;
  right: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  z-index: 1500;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: flex;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .habits-grid,
  .daily-habits-container,
  .suggested-habits-container {
    grid-template-columns: 1fr;
  }
  
  #chatbot-window {
    width: 300px;
    height: 400px;
  }
}

/* Floating Shapes Animation */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite linear;
}

.floating-shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-shape:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 20%;
  right: 10%;
  animation-delay: 5s;
}

.floating-shape:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 10s;
}

.floating-shape:nth-child(4) {
  width: 70px;
  height: 70px;
  bottom: 10%;
  right: 20%;
  animation-delay: 15s;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(20px) rotate(240deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}