/*
Theme Name: TLAR Academy
Theme URI: https://tlaracademy.com
Author: TLAR Academy
Author URI: https://tlaracademy.com
Description: Custom WordPress theme for TLAR Academy 4-Week SPX 0DTE Trading Curriculum
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tlar-academy
*/

/* ========== CSS VARIABLES - TLAR Color System ========== */
:root {
  --tlar-bg-primary: #0a0a0a;
  --tlar-bg-secondary: #111827;
  --tlar-bg-card: rgba(31, 41, 55, 0.95);
  --tlar-border: rgba(55, 65, 81, 1);
  --tlar-border-light: rgba(75, 85, 99, 0.3);
  
  --tlar-text-primary: #ffffff;
  --tlar-text-secondary: #d1d5db;
  --tlar-text-muted: #9ca3af;
  --tlar-text-dark: #6b7280;
  
  --tlar-green: #22c55e;
  --tlar-green-light: #86efac;
  --tlar-green-bg: rgba(34, 197, 94, 0.15);
  
  --tlar-red: #ef4444;
  --tlar-red-light: #fca5a5;
  --tlar-red-bg: rgba(239, 68, 68, 0.15);
  
  --tlar-blue: #3b82f6;
  --tlar-blue-light: #60a5fa;
  --tlar-blue-bg: rgba(59, 130, 246, 0.15);
  
  --tlar-purple: #a855f7;
  --tlar-purple-light: #c084fc;
  
  --tlar-yellow: #fbbf24;
  --tlar-yellow-light: #fcd34d;
  
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'Courier New', monospace;
}

/* ========== GLOBAL RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--tlar-bg-primary);
  color: var(--tlar-text-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: var(--tlar-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--tlar-blue-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== CONTAINER SYSTEM ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-full {
  width: 100%;
  padding: 0 20px;
}

/* ========== HEADER NAVIGATION ========== */
.site-header {
  background: linear-gradient(135deg, var(--tlar-bg-secondary), rgba(31, 41, 55, 0.98));
  border-bottom: 1px solid var(--tlar-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tlar-text-primary);
  letter-spacing: 2px;
}

.site-logo span {
  color: var(--tlar-blue);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--tlar-text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.main-nav a:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--tlar-blue-light);
}

.nav-btn {
  background: linear-gradient(135deg, var(--tlar-blue), #2563eb);
  color: white !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* ========== HERO SECTION ========== */
.hero-section {
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid var(--tlar-blue);
  color: var(--tlar-blue-light);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--tlar-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--tlar-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--tlar-blue), #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--tlar-text-primary);
  border: 2px solid var(--tlar-border);
}

.btn-secondary:hover {
  border-color: var(--tlar-blue);
  background: rgba(59, 130, 246, 0.1);
}

/* ========== CURRICULUM GRID ========== */
.curriculum-section {
  padding: 5rem 0;
  background: var(--tlar-bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--tlar-text-muted);
}

.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.week-card {
  background: linear-gradient(135deg, var(--tlar-bg-card), rgba(31, 41, 55, 0.8));
  border: 1px solid var(--tlar-border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.week-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--tlar-blue), var(--tlar-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.week-card:hover {
  transform: translateY(-5px);
  border-color: var(--tlar-blue);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.week-card:hover::before {
  opacity: 1;
}

.week-number {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: var(--tlar-blue-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.week-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--tlar-text-primary);
}

.week-topics {
  list-style: none;
}

.week-topics li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--tlar-text-secondary);
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

.week-topics li:last-child {
  border-bottom: none;
}

.week-topics li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--tlar-blue);
  font-weight: bold;
}

/* ========== LOGIN FORM ========== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.login-card {
  background: linear-gradient(135deg, var(--tlar-bg-card), rgba(31, 41, 55, 0.95));
  border: 1px solid var(--tlar-border);
  border-radius: 16px;
  padding: 3rem;
  max-width: 980px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-logo span {
  color: var(--tlar-blue);
}

.login-subtitle {
  color: var(--tlar-text-muted);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--tlar-text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--tlar-border);
  border-radius: 8px;
  color: var(--tlar-text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--tlar-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-checkbox label {
  color: var(--tlar-text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--tlar-blue), #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tlar-border-light);
}

.login-footer a {
  color: var(--tlar-blue);
  font-size: 0.875rem;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.alert-error {
  background: var(--tlar-red-bg);
  border: 1px solid var(--tlar-red);
  color: var(--tlar-red-light);
}

.alert-success {
  background: var(--tlar-green-bg);
  border: 1px solid var(--tlar-green);
  color: var(--tlar-green-light);
}

/* ========== COURSE CONTENT ========== */
.course-container {
  padding: 3rem 0;
}

.course-sidebar {
  background: var(--tlar-bg-card);
  border: 1px solid var(--tlar-border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.progress-bar {
  background: rgba(17, 24, 39, 0.8);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tlar-blue), var(--tlar-purple));
  transition: width 0.3s ease;
}

.lesson-list {
  list-style: none;
  margin-top: 1.5rem;
}

.lesson-item {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.lesson-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--tlar-blue);
}

.lesson-item.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--tlar-blue);
}

.lesson-item.completed {
  opacity: 0.6;
}

.lesson-item.completed::after {
  content: '✓';
  color: var(--tlar-green);
  float: right;
  font-weight: bold;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--tlar-bg-secondary);
  border-top: 1px solid var(--tlar-border);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--tlar-text-primary);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--tlar-text-muted);
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: var(--tlar-blue-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--tlar-border-light);
  color: var(--tlar-text-muted);
  font-size: 0.875rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .curriculum-grid {
    grid-template-columns: 1fr;
  }
  
  .login-card {
    padding: 2rem;
  }
  
  /* Course page mobile improvements */
  .course-container {
    padding: 2rem 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .week-header {
    padding: 1.5rem !important;
  }
  
  .week-header > div {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .week-header h2 {
    font-size: 1.5rem !important;
  }
  
  /* Video list mobile */
  .video-list-item {
    padding: 1rem !important;
  }
  
  .video-list-item h3 {
    font-size: 1rem !important;
  }
  
  /* Hide video icon on very small screens */
  .video-list-item > div > div:nth-child(2) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .week-header {
    padding: 1rem !important;
  }
  
  .week-number {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }
  
  .video-list-item {
    padding: 0.875rem !important;
  }
  
  .video-list-item > div > div:first-child {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
  }
  
  .video-list-item h3 {
    font-size: 0.95rem !important;
  }
  
  .video-list-item > div > div:last-child span {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
  }
  
  /* Course sidebar mobile */
  .course-sidebar {
    padding: 1.5rem;
  }
  
  .course-sidebar h3 {
    font-size: 1.125rem;
  }
}

/* Landscape mobile orientation */
@media (max-height: 600px) and (orientation: landscape) {
  .login-container {
    padding: 1rem;
  }
  
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--tlar-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* ========== VIDEO STYLES ========== */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    border: 1px solid var(--tlar-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-container video {
    background: #000;
    object-fit: contain;
}

/* Video controls styling */
.video-container video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.video-container video::-webkit-media-controls-play-button,
.video-container video::-webkit-media-controls-current-time-display,
.video-container video::-webkit-media-controls-time-remaining-display {
    color: #ffffff;
}

.video-container video::-webkit-media-controls-timeline {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    margin: 0 10px;
}

.video-container video::-webkit-media-controls-volume-slider {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
}

/* Firefox video controls */
.video-container video::-moz-media-controls {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

/* Lesson content styling for video timestamps */
.lesson-content h3 {
    color: var(--tlar-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.lesson-content h4 {
    color: var(--tlar-text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.lesson-content ul,
.lesson-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.lesson-content li {
    margin-bottom: 0.5rem;
}

.lesson-content code {
    background: rgba(59, 130, 246, 0.1);
    color: var(--tlar-blue-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.lesson-content pre {
    background: var(--tlar-bg-secondary);
    border: 1px solid var(--tlar-border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.lesson-content pre code {
    background: none;
    color: var(--tlar-text-secondary);
    padding: 0;
}

/* Timestamp links in lesson content */
.lesson-content a[href^="#"] {
    color: var(--tlar-blue);
    text-decoration: none;
    border-bottom: 1px dashed var(--tlar-blue);
    transition: all 0.2s ease;
}

.lesson-content a[href^="#"]:hover {
    color: var(--tlar-blue-light);
    border-bottom-style: solid;
}

/* Video loading state */
.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--tlar-blue);
    border-radius: 50%;
    animation: videoSpinner 0.8s linear infinite;
    z-index: -1;
}

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