/* Color Palette Variables */
:root {
  --primary-blue: #2196F3;
  --success-green: #4CAF50;
  --warning-yellow: #FFC107;
  --danger-red: #F44336;
  --accent-purple: #9C27B0;
  --light-gray: #f8f9fa;
  --dark-gray: #343a40;
  --white: #ffffff;
  --black: #000000;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --bs-body-bg: #1a1a1a;
  --bs-body-color: #ffffff;
  --bs-light: #2d2d2d;
  --bs-dark: #ffffff;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Dark Mode Styles */
[data-theme="dark"] {
  background-color: #1a1a1a;
  color: #ffffff;
}

[data-theme="dark"] .navbar-light {
  background-color: #2d2d2d !important;
}

[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .navbar-nav .nav-link {
  color: #ffffff !important;
}

[data-theme="dark"] .navbar-light .navbar-nav .nav-link img {
  filter: brightness(1.2);
}

/* Google Play Button in Navbar */
.navbar .nav-link img {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.9;
}

.navbar .nav-link:hover img {
  transform: scale(1.1);
  opacity: 1;
}

.navbar .nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.5rem 1rem;
}

.navbar .nav-link img {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .navbar .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar .nav-link img {
    height: 20px;
    margin-right: 8px;
  }
}

[data-theme="dark"] .bg-light {
  background-color: #2d2d2d !important;
  color: #ffffff;
}

[data-theme="dark"] .card {
  background-color: #2d2d2d;
  border-color: #404040;
  color: #ffffff;
}

[data-theme="dark"] .card-header {
  background-color: #404040;
  border-color: #404040;
}

[data-theme="dark"] .accordion-item {
  background-color: #2d2d2d;
  border-color: #404040;
}

[data-theme="dark"] .accordion-button {
  background-color: #404040;
  color: #ffffff;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: var(--primary-blue);
  color: #ffffff;
}

[data-theme="dark"] .form-control {
  background-color: #404040;
  border-color: #555555;
  color: #ffffff;
}

[data-theme="dark"] .form-control:focus {
  background-color: #404040;
  border-color: var(--primary-blue);
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
  color: white;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 0;
}

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

.hero-section h1 {
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(0,0,0,0.3);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-section .lead {
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4), 0 0 10px rgba(0,0,0,0.2);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-section .btn {
  text-shadow: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.hero-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.hero-section .btn-outline-primary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  backdrop-filter: blur(10px);
}

.hero-section .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
}

/* Google Play Button */
.google-play-button {
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.google-play-button:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.google-play-button:active {
  transform: scale(0.98);
}

/* Footer Google Play Button */
footer .google-play-button {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

footer .google-play-button:hover {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}

/* Timeline Styles */
.timeline-container {
  position: relative;
}

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

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

.timeline-item:last-child::before {
  bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0.5rem;
  top: 1rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--primary-blue);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--primary-blue);
}

.timeline-marker.completed {
  background: var(--success-green);
  box-shadow: 0 0 0 3px var(--success-green);
}

.timeline-marker.overdue {
  background: var(--danger-red);
  box-shadow: 0 0 0 3px var(--danger-red);
}

.timeline-marker.warning {
  background: var(--warning-yellow);
  box-shadow: 0 0 0 3px var(--warning-yellow);
}

/* Timeline Cards */
.timeline-card {
  border: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary-blue);
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.timeline-card.completed {
  border-left-color: var(--success-green);
  background-color: rgba(76, 175, 80, 0.05);
}

.timeline-card.overdue {
  border-left-color: var(--danger-red);
  background-color: rgba(244, 67, 54, 0.05);
}

.timeline-card.warning {
  border-left-color: var(--warning-yellow);
  background-color: rgba(255, 193, 7, 0.05);
}

/* Status Badges */
.status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background-color: rgba(33, 150, 243, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.status-completed {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--success-green);
  border: 1px solid var(--success-green);
}

.status-overdue {
  background-color: rgba(244, 67, 54, 0.1);
  color: var(--danger-red);
  border: 1px solid var(--danger-red);
}

.status-warning {
  background-color: rgba(255, 193, 7, 0.1);
  color: #b8860b;
  border: 1px solid var(--warning-yellow);
}

/* Progress Bars */
.progress {
  height: 8px;
  border-radius: 4px;
  background-color: rgba(0,0,0,0.1);
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-blue), var(--success-green));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 150px;
  width: 150px;
  margin: 0 auto;
}

/* Statistics */
.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

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

.task-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

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

.task-checkbox {
  margin-right: 0.75rem;
}

.task-text {
  flex: 1;
  margin: 0;
}

.task-text.completed {
  text-decoration: line-through;
  color: #6c757d;
}

/* Notes Textarea */
.notes-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Buttons */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn-success {
  background-color: var(--success-green);
  border-color: var(--success-green);
}

.btn-warning {
  background-color: var(--warning-yellow);
  border-color: var(--warning-yellow);
  color: #000;
}

.btn-danger {
  background-color: var(--danger-red);
  border-color: var(--danger-red);
}

/* Cards */
.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Accordion */
.accordion-button {
  border-radius: 0.375rem;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: var(--primary-blue);
  color: white;
}

/* Offcanvas */
.offcanvas {
  width: 350px !important;
}

@media (max-width: 768px) {
  .offcanvas {
    width: 100% !important;
  }
}

/* Ad Placeholder */
.ad-placeholder {
  border: 2px dashed #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  text-align: center;
  background-color: #f8f9fa;
}

[data-theme="dark"] .ad-placeholder {
  background-color: #2d2d2d;
  border-color: #404040;
}

/* Modal Styles */
.modal-content {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
  border-top: 1px solid rgba(0,0,0,0.1);
  border-radius: 0 0 0.5rem 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 50vh;
    text-align: center;
    padding: 3rem 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5), 0 0 15px rgba(0,0,0,0.3);
    margin-bottom: 1.25rem;
  }
  
  .hero-section .lead {
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    margin-bottom: 1.5rem;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .timeline-item::before {
    left: 0.5rem;
  }
  
  .timeline-marker {
    left: 0;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .chart-container {
    height: 120px;
    width: 120px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 2.5rem 0;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5), 0 0 12px rgba(0,0,0,0.3);
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .timeline-card {
    margin-bottom: 1rem;
  }
  
  .stat-item {
    padding: 0.5rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

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

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 0.125rem solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-primary-custom {
  color: var(--primary-blue) !important;
}

.bg-primary-custom {
  background-color: var(--primary-blue) !important;
}

.border-primary-custom {
  border-color: var(--primary-blue) !important;
}

.shadow-custom {
  box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.rounded-custom {
  border-radius: 0.5rem !important;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .offcanvas,
  .modal,
  .ad-placeholder,
  footer {
    display: none !important;
  }
  
  .timeline-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .hero-section {
    background: none !important;
    color: #000 !important;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25);
  outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .timeline-card {
    border: 2px solid #000;
  }
  
  .btn {
    border: 2px solid;
  }
  
  .card {
    border: 1px solid #000;
  }
}

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

[data-theme="dark"] .status-badge {
  background-color: #23272b;
  color: #fff;
  border: 1px solid #444;
}
[data-theme="dark"] .status-pending {
  background-color: rgba(33, 150, 243, 0.2);
  color: #90caf9;
  border: 1px solid #2196F3;
}
[data-theme="dark"] .status-completed {
  background-color: rgba(76, 175, 80, 0.2);
  color: #a5d6a7;
  border: 1px solid #4CAF50;
}
[data-theme="dark"] .status-overdue {
  background-color: rgba(244, 67, 54, 0.2);
  color: #ef9a9a;
  border: 1px solid #F44336;
}
[data-theme="dark"] .status-warning {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffe082;
  border: 1px solid #FFC107;
}
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content {
  background-color: #23272b;
  color: #f1f1f1;
  border-color: #444;
}
[data-theme="dark"] .card-header,
[data-theme="dark"] .modal-header {
  background-color: #181a1b;
  color: #fff;
  border-bottom: 1px solid #333;
}
[data-theme="dark"] .modal-footer {
  background-color: #181a1b;
  color: #fff;
  border-top: 1px solid #333;
}
[data-theme="dark"] .progress {
  background-color: #333;
}
[data-theme="dark"] .progress-bar {
  background: linear-gradient(90deg, #2196F3, #4CAF50);
}
[data-theme="dark"] .stat-label {
  color: #b0b0b0;
}
[data-theme="dark"] .task-text.completed {
  color: #b0b0b0;
}
[data-theme="dark"] .btn,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-success,
[data-theme="dark"] .btn-warning,
[data-theme="dark"] .btn-danger {
  color: #fff;
  border-color: #444;
}
[data-theme="dark"] .btn-primary {
  background-color: #1565c0;
  border-color: #1565c0;
}
[data-theme="dark"] .btn-success {
  background-color: #388e3c;
  border-color: #388e3c;
}
[data-theme="dark"] .btn-warning {
  background-color: #ffa000;
  border-color: #ffa000;
  color: #23272b;
}
[data-theme="dark"] .btn-danger {
  background-color: #c62828;
  border-color: #c62828;
}
[data-theme="dark"] .form-control {
  background-color: #181a1b;
  color: #fff;
  border-color: #444;
}
[data-theme="dark"] .form-control:focus {
  background-color: #23272b;
  color: #fff;
  border-color: #2196F3;
}
