/* Terms & Conditions Page - Dark/Light Mode Support */

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

/* Light Mode Colors */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --toggle-bg: #e0e0e0;
  --toggle-active: #4a90e2;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode Styles */
body.light-mode {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Dark Mode Colors */
body.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --toggle-bg: #404040;
  --toggle-active: #5ba3f5;
  
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Smooth theme transition */
body.theme-transition,
body.theme-transition * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Container */
.terms-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Header */
.terms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 40px;
  position: sticky;
  top: 0;
  background-color: var(--bg-primary);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.terms-header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--shadow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  font-size: 28px;
  position: absolute;
  transition: all 0.3s ease;
}

/* Light mode - show sun icon */
body.light-mode .light-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.light-mode .dark-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

/* Dark mode - show moon icon */
body.dark-mode .light-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

body.dark-mode .dark-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Content */
.terms-content {
  padding-bottom: 60px;
}

/* Sections */
.terms-section {
  margin-bottom: 40px;
  padding: 30px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.3s ease;
}

.terms-section:hover {
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
}

.terms-section h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.terms-section p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.terms-section p:last-child {
  margin-bottom: 0;
}

/* Lists */
.terms-section ul {
  margin: 16px 0;
  padding-left: 24px;
}

.terms-section li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.terms-section li:last-child {
  margin-bottom: 0;
}

/* Footer */
.terms-footer {
  margin-top: 60px;
  padding: 30px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  text-align: center;
}

.terms-footer p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.terms-footer p:last-child {
  margin-bottom: 0;
}

.terms-footer strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .terms-container {
    padding: 16px;
  }

  .terms-header {
    padding: 20px 0;
    margin-bottom: 30px;
  }

  .terms-header h1 {
    font-size: 26px;
  }

  .theme-toggle {
    width: 50px;
    height: 50px;
  }

  .theme-icon {
    font-size: 24px;
  }

  .terms-section {
    padding: 20px;
    margin-bottom: 24px;
  }

  .terms-section h2 {
    font-size: 20px;
  }

  .terms-section p,
  .terms-section li {
    font-size: 15px;
  }

  .terms-footer {
    padding: 20px;
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .terms-container {
    padding: 12px;
  }

  .terms-header {
    padding: 16px 0;
    margin-bottom: 24px;
  }

  .terms-header h1 {
    font-size: 22px;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .theme-icon {
    font-size: 20px;
  }

  .terms-section {
    padding: 16px;
    margin-bottom: 20px;
  }

  .terms-section h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .terms-section p,
  .terms-section li {
    font-size: 14px;
  }

  .terms-footer {
    padding: 16px;
    margin-top: 32px;
  }

  .terms-footer p {
    font-size: 14px;
  }
}

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

/* Print Styles */
@media print {
  body {
    background-color: white;
    color: black;
  }

  .theme-toggle {
    display: none;
  }

  .terms-header {
    position: static;
    border-bottom: 2px solid #000;
  }

  .terms-section {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
