/* Elios - Your Inner Compass */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --teal-gradient: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  --purple-gradient: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);

  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --teal-color: #20c997;
  --purple-color: #6f42c1;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;

  --page-bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #94a3b8;
  --border-color: #e5e7eb;

  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.16);

  --border-radius: 0.75rem;
  --border-radius-lg: 1.25rem;

  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

html[data-theme="dark"] {
  --page-bg: #0b1020;
  --surface: #111827;
  --surface-2: #1f2937;
  --surface-3: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
}

html[data-text-size="small"] { font-size: 14px; }
html[data-text-size="medium"] { font-size: 16px; }
html[data-text-size="large"] { font-size: 18px; }

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

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--page-bg);
  min-height: 100vh;
  transition: var(--transition);
}

body.dark-theme {
  background: var(--page-bg);
  color: var(--text-primary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

p, label, li, small, span {
  color: inherit;
}

.text-muted {
  color: var(--text-secondary) !important;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.display-4, .display-5, .display-6 {
  font-weight: 700;
}

.navbar {
  background: var(--primary-gradient) !important;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  transition: var(--transition);
  color: #fff !important;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.brand-text {
  margin-left: 0.5rem;
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  border-radius: var(--border-radius);
  margin: 0 0.25rem;
  padding: 0.5rem 1rem !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  color: #fff !important;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.rotating-compass {
  animation: rotate 20s linear infinite;
}

.fade-in { animation: fadeIn 0.8s ease-out; }
.fade-in-delay { animation: fadeIn 0.8s ease-out 0.3s both; }
.slide-in-left { animation: slideInLeft 0.6s ease-out; }
.slide-in-right { animation: slideInRight 0.6s ease-out; }
.bounce-animation { animation: bounce 2s infinite; }

.card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

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

.card-header {
  background: var(--primary-gradient);
  border: none;
  padding: 1.25rem;
  color: #fff;
}

.card-body {
  color: var(--text-primary);
}

.animated-card {
  animation: fadeIn 0.6s ease-out;
}

.animated-card:hover {
  transform: translateY(-5px);
}

.nav-card {
  transition: var(--transition);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--surface);
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: var(--transition);
}

.nav-card:hover::before {
  left: 100%;
}

.nav-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.nav-card .card-body {
  padding: 2rem;
}

.nav-card i {
  transition: var(--transition);
}

.nav-card:hover i {
  transform: scale(1.1);
  color: var(--primary-color) !important;
}

.status-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--success-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.coming-soon {
  background: var(--warning-color);
  color: #111827;
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  animation: rotate 60s linear infinite;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.compass-container {
  text-align: center;
  margin-bottom: 2rem;
}

.compass-container i {
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.45));
}

.features-section {
  background: var(--surface);
}

.feature-item {
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  border-radius: var(--border-radius-lg);
}

.feature-item:hover {
  transform: translateY(-10px);
  background: var(--surface-2);
}

.form-control,
.form-select,
textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
  background: var(--surface);
  color: var(--text-primary);
}

.form-control::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.2);
  background: var(--surface);
  color: var(--text-primary);
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
}

.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: none;
  letter-spacing: 0.3px;
  font-family: 'Poppins', sans-serif;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  filter: brightness(1.05);
}

.btn-success {
  background: var(--teal-gradient);
  border: none;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

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

.btn-outline-warning {
  color: #b45309;
  border: 1px solid #f59e0b;
  background: transparent;
}

.btn-outline-warning:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #111827;
}

.question-step {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.question-step.active {
  display: block;
}

.question-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-bar {
  border-radius: 999px;
  background: var(--teal-gradient);
  transition: width 0.6s ease;
}

.option-item {
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color) !important;
  background: var(--surface);
}

.option-item:hover {
  border-color: var(--primary-color) !important;
  background: rgba(102, 126, 234, 0.06);
  transform: translateX(5px);
}

.option-item input:checked + label {
  color: var(--primary-color);
  font-weight: 600;
}

.career-match {
  transition: var(--transition);
  border: 1px solid var(--border-color) !important;
  background: var(--surface);
}

.career-match:hover {
  border-color: var(--primary-color) !important;
  background: rgba(102, 126, 234, 0.03);
}

.timetable-container {
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.timetable-grid {
  margin: 0;
  color: var(--text-primary);
}

.timetable-grid th {
  background: var(--primary-gradient);
  color: white;
  text-align: center;
  padding: 1rem;
  border: none;
  font-weight: 600;
}

.timetable-grid td {
  padding: 0;
  border: 1px solid var(--border-color);
  height: 60px;
  vertical-align: middle;
  background: var(--surface);
}

.time-slot {
  background: var(--surface-2);
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  width: 100px;
}

.schedule-cell {
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.schedule-cell:hover {
  background: rgba(102, 126, 234, 0.08);
}

.schedule-cell.occupied {
  background: rgba(32, 201, 151, 0.12);
}

.scheduled-activity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 500;
  height: 100%;
  position: relative;
}

.study-activity { background: rgba(59, 130, 246, 0.18); color: #1d4ed8; }
.class-activity { background: rgba(34, 197, 94, 0.18); color: #166534; }
.break-activity { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.exercise-activity { background: rgba(239, 68, 68, 0.18); color: #991b1b; }
.meal-activity { background: rgba(14, 165, 233, 0.18); color: #075985; }
.hobby-activity { background: rgba(139, 92, 246, 0.18); color: #5b21b6; }

.remove-activity {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  opacity: 0;
  transition: var(--transition);
}

.scheduled-activity:hover .remove-activity {
  opacity: 1;
}

.activity-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-block {
  padding: 0.75rem;
  border-radius: var(--border-radius);
  cursor: grab;
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
}

.activity-block:active {
  cursor: grabbing;
}

.activity-block:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}

.study-block { background: rgba(59, 130, 246, 0.18); color: #1d4ed8; }
.class-block { background: rgba(34, 197, 94, 0.18); color: #166534; }
.break-block { background: rgba(245, 158, 11, 0.18); color: #92400e; }
.exercise-block { background: rgba(239, 68, 68, 0.18); color: #991b1b; }
.meal-block { background: rgba(14, 165, 233, 0.18); color: #075985; }
.hobby-block { background: rgba(139, 92, 246, 0.18); color: #5b21b6; }

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.summary-value {
  font-weight: 600;
  color: var(--primary-color);
}

.stats-card {
  transition: var(--transition);
  background: var(--surface);
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stats-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stats-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.stats-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-gradient);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -25px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 1;
}

.timeline-content {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-left: 1rem;
  border: 1px solid var(--border-color);
}

.achievement-item {
  transition: var(--transition);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.achievement-item:hover {
  background: rgba(102, 126, 234, 0.06);
  transform: translateX(5px);
}

.achievement-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 0.25rem;
}

.star-rating input {
  display: none;
}

.star-label {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.25rem;
}

.star-label:hover,
.star-label.active {
  color: #f59e0b;
  transform: scale(1.1);
}

.star-rating:hover .star-label {
  color: #d1d5db;
}

.star-rating:hover .star-label:hover,
.star-rating:hover .star-label:hover ~ .star-label {
  color: #f59e0b;
}

.star-rating input:checked ~ .star-label {
  color: #f59e0b;
}

.color-scheme-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.color-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: var(--transition);
}

input:checked + .color-preview .color-swatch {
  border-color: var(--primary-color);
  transform: scale(1.1);
}

.feedback-stat {
  transition: var(--transition);
  padding: 1rem;
  border-radius: var(--border-radius);
}

.feedback-stat:hover {
  background: rgba(102, 126, 234, 0.06);
  transform: translateY(-5px);
}

.settings-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.settings-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.account-info {
  background: var(--surface-2);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.settings-hero-icon {
  font-size: 3rem;
  color: var(--primary-color);
}

.json-editor {
  min-height: 280px;
  font-family: 'Courier New', monospace;
  background: var(--surface);
  color: var(--text-primary);
}

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.main-content {
  min-height: calc(100vh - 200px);
  flex: 1;
}

.coming-soon {
  opacity: 0.6;
  pointer-events: none;
}

.coming-soon:hover {
  transform: none !important;
}

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

html[data-theme="dark"] .spinner-overlay {
  background: rgba(0, 0, 0, 0.75);
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 0.3rem solid rgba(102, 126, 234, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: rotate 1s linear infinite;
}

.success-state {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

.error-state {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
}

.warning-state {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--warning-color);
  color: #92400e;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--page-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.min-vh-75 {
  min-height: 75vh;
}

.bg-gradient {
  background: var(--primary-gradient) !important;
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.border-gradient {
  border: 2px solid;
  border-image: var(--primary-gradient) 1;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus,
textarea:focus,
input:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .rotating-compass {
    animation: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --shadow: 0 0 0 2px #000;
    --shadow-lg: 0 0 0 3px #000;
  }

  .card,
  .btn {
    border: 2px solid #000;
  }
}

@media print {
  .navbar,
  .footer,
  .btn,
  .floating-elements {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }

  .main-content {
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 60vh;
    text-align: center;
  }

  .compass-container i {
    font-size: 4rem !important;
  }

  .display-4 {
    font-size: 2rem;
  }

  .nav-card .card-body {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .timetable-container {
    overflow-x: auto;
  }

  .activity-blocks {
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem 0;
  }

  .activity-block {
    min-width: 120px;
    flex-shrink: 0;
  }

  .star-label {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .container-fluid {
    padding: 0 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .question-title {
    font-size: 1.25rem;
  }

  .timeline {
    padding-left: 1rem;
  }

  .timeline-content {
    margin-left: 0.5rem;
  }
}
