/* style.css - MyPerformance Premium Glassmorphism Theme */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.5);
  --secondary: #a855f7;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Glassmorphism Light */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  /* Backgrounds */
  --bg-gradient: linear-gradient(135deg, #f5f7fb 0%, #dbeafe 100%);
  --text-main: #1e293b;
  --text-muted: #64748b;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark-mode"] {
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary-glow);
  }

  50% {
    box-shadow: 0 0 20px var(--primary-glow);
  }

  100% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
}

/* App Layout */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.header {
  margin-bottom: 40px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
}

.subtitle {
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.streak-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.streak-emoji {
  font-size: 1.2rem;
}

.streak-number {
  font-weight: 700;
  color: var(--warning);
}

.streak-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-settings {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.theme-selector,
.notification-settings {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-selector select,
.notification-settings input {
  width: auto;
  padding: 5px 10px;
}

.enable-notifications-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 6px 15px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  overflow-x: auto;
}

[data-theme="dark-mode"] .tabs-container {
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark-mode"] .tab-btn.active {
  background: var(--glass-bg);
  color: var(--primary);
}

/* Tab Content Visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

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

/* Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 30px;
  animation: fadeInUp 0.5s ease-out;
}

.glass {
  /* Extra glassiness if needed */
}

/* Today Section */
.date-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.date-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.date-btn:hover {
  transform: scale(1.1);
}

.date-title {
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 150px;
  text-align: center;
}

.task-input-wrapper {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.task-input {
  flex: 1;
}

.add-task-btn {
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.progress-wrap {
  margin-bottom: 30px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.progress-bar {
  height: 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

[data-theme="dark-mode"] .progress-bar {
  background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent));
  transition: width 0.5s ease;
  border-radius: 10px;
}

/* Task List */
.task-list {
  list-style: none;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}

[data-theme="dark-mode"] .task-item {
  background: rgba(0, 0, 0, 0.1);
}

.task-item:hover {
  transform: translateX(5px);
  border-color: var(--primary);
}

.task-label {
  font-weight: 500;
}

.task-label.completed {
  color: var(--success);
  text-decoration: line-through;
}

.task-label.half-done {
  color: var(--warning);
}

.task-status-btns {
  display: flex;
  gap: 8px;
}

.status-btn {
  padding: 6px 10px;
  border: 1px solid var(--glass-border);
  background: white;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="dark-mode"] .status-btn {
  background: #334155;
  color: white;
}

.status-btn.completed {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.status-btn.half-done {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
}

.status-btn.not-done {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  text-align: center;
  padding: 25px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

/* History */
.history-day {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.history-date {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.history-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.history-task {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.history-task.completed {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.history-task.half-done {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.history-task.not-done {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Timetable */
.day-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.day-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="dark-mode"] .day-btn {
  background: #334155;
  color: white;
}

.day-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.timetable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.timetable-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="dark-mode"] .timetable-card {
  background: rgba(255, 255, 255, 0.05);
}

.timetable-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.tt-time {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tt-icon {
  font-size: 1.2rem;
}

.tt-activity {
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

.tt-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
}

.timetable-table th,
.timetable-table td {
  padding: 15px;
  border: 1px solid var(--glass-border);
  text-align: left;
}

.timetable-table th {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 700;
}

[data-theme="dark-mode"] .timetable-table th {
  background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 50px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

/* Utilities */
.fadeIn {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Mobile Optimization */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-right {
    margin-top: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 1.8rem;
  }

  .auth-card {
    padding: 25px;
  }
}

/* Timetable Additional Styles */
.timetable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.timetable-actions {
  display: flex;
  gap: 10px;
}

.add-task-btn.success {
  background: var(--success);
}

.time-input,
.activity-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  font-family: inherit;
}

[data-theme="dark-mode"] .time-input,
[data-theme="dark-mode"] .activity-input {
  background: rgba(0, 0, 0, 0.2);
  color: white;
}