/* === 1. Reset & Global Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
  background: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  -webkit-user-drag: none;
  user-drag: none;

  /* Fix: Prevent header overlap */
  padding-top: 80px;
}

/* === 2. CSS Variables for Theming === */
:root {
  --bg-color: #f9f9f9;
  --text-color: #333;

  /* Header variable removed for universal gradient */
  --card-bg: #fff;
  --form-bg: #fff;

  --primary-gradient: linear-gradient(45deg, #ff6a00, #ee0979);
  --secondary-gradient: linear-gradient(90deg, #00c6ff, #0072ff);
  --logo-gradient: linear-gradient(45deg, #ff6b6b, #feca57, #1dd1a1, #5f27cd);

  --section-odd-bg: linear-gradient(135deg, #ff9a9e, #fad0c4);
  --section-even-bg: linear-gradient(135deg, #a1c4fd, #c2e9fb);

  --link-color: #0077cc;
  --link-hover-color: #ff512f;

  --code-bg: #f4f4f4;
  --code-color: #d6336c;

  --shadow: 0 6px 16px rgba(0, 0, 0, 0.1);

  /* Z-Index Scale */
  --z-header: 2000;
  --z-menu: 3000;
  --z-overlay: 2500;
}
.dark-mode {
  --bg-color: #121212;
  --text-color: #f1f1f1;
  /* Header variable removed for universal gradient */
  --card-bg: #1e1e1e;
  --form-bg: #1e1e1e;

  --logo-gradient: linear-gradient(45deg, #5f27cd, #1dd1a1, #feca57, #ff6b6b);

  --section-odd-bg: linear-gradient(135deg, #2b2b2b, #1c1c1c);
  --section-even-bg: linear-gradient(135deg, #3a3a3a, #222);

  --link-color: #00c6ff;
  --link-hover-color: #a18cd1;

  --code-bg: #272822;
  --code-color: #f8f8f2;
}

/* === 3. Global Typography & Spacing === */
h1 {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(45deg, #ff512f, #dd2476);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  background: linear-gradient(45deg, #2193b0, #6dd5ed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--link-color);
  border-radius: 2px;
}
h3 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  background: linear-gradient(45deg, #a18cd1, #fbc2eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
p, ul li, ol li {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-color);
}
ul li::marker { color: #ff7e5f; }
ol li::marker { color: #6a11cb; }
strong { color: #e63946; font-weight: 700; }
em { color: #1d3557; font-style: italic; }
blockquote {
  border-left: 4px solid #6a11cb;
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  background: linear-gradient(90deg, rgba(106, 17, 203, 0.05), rgba(37, 117, 252, 0.05));
  border-radius: 8px;
}
code {
  background: var(--code-bg);
  color: var(--code-color);
  padding: 2px 6px;
  border-radius: 4px;
}
pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

/* === 4. Header & Navigation === */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  
  /* UPDATED: Layered background with PNG and gradient */
  background-image:
    url('wave.png'),
    linear-gradient(to right, #4a7bff, #9c27b0);
  
  background-repeat: no-repeat, no-repeat;
  background-position: bottom, top;
  background-size: cover, cover;

  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: var(--z-header);
  box-shadow: var(--shadow);
  transition: background 0.4s ease;
}
.logo {
  font-weight: 700;
  line-height: 1;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
  font-size: clamp(1rem, 4vw, 2.5rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === 5. Slide Menu === */
.menu {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100vh;
  width: 260px;
  max-width: 80vw;
  background: linear-gradient(135deg, #0077cc, #00c6ff, #6a11cb);
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
  transition: right 0.4s ease;
  z-index: var(--z-menu);
  padding: 2rem 1.5rem;
  overflow-y: auto;
}
.dark-mode .menu {
  background: linear-gradient(135deg, #1a1a1a, #242424, #3a3a3a);
}
.menu.active { right: 0; }
.menu ul { list-style: none; }
.menu li { margin-bottom: 1.2rem; }
.menu a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}
.menu a:hover {
  background: linear-gradient(90deg, #ff8a00, #e52e71, #0077ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateX(6px);
}

/* === 6. Menu Overlay === */
.menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s;
  z-index: var(--z-overlay);
}
.menu.active ~ .menu-overlay {
  opacity: 1;
  visibility: visible;
}

/* === 7. Sections === */
section {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem);
  position: relative;
}
.odd-section { background: var(--section-odd-bg); }
.even-section { background: var(--section-even-bg); }
section::before,
section::after,
footer::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: -1;
  border-radius: 50% / 20%;
  opacity: 0.3;
}
section::before {
  top: -20px;
  background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(0,0,0,0.05));
}
section::after {
  bottom: -20px;
  background: linear-gradient(90deg, rgba(0,0,0,0.05), rgba(255,255,255,0.1));
}
footer::before {
  top: -20px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(0,0,0,0.1));
}
/* === 8. Cards, Buttons, Forms === */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 400px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}
button,
.btn {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.4s ease;
}
button:hover,
.btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
  background: linear-gradient(135deg, #ff6a00, #ee0979);
}
button:focus,
.btn:focus,
a:focus,
input:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 3px;
}
/* === Special Buttons (peach/pink gradient + glow) === */
.menu-toggle,
.dark-toggle,
.toggle-btn {
  /* UPDATED: "No color" buttons */
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.4s ease, box-shadow 0.3s ease;
  text-shadow: none;

  box-shadow: none;
}

.menu-toggle:hover,
.dark-toggle:hover,
.toggle-btn:hover {
  opacity: 0.95;
  transform: scale(1.05);
  /* UPDATED: Button hover styles */
  background: transparent;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

/* === CTA Buttons (cool blue/teal gradient + glow) === */
.cta-button,
.youtube-cta-button {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.6rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.4s ease, box-shadow 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);

  box-shadow: 0 4px 12px rgba(0, 114, 255, 0.35);
}

.cta-button:hover,
.youtube-cta-button:hover {
  opacity: 0.95;
  transform: scale(1.05);
  background: linear-gradient(135deg, #00e6ff, #3399ff);
  box-shadow: 0 6px 18px rgba(0, 114, 255, 0.5);
}
.auth-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--form-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.auth-form input {
  width: 100%;
  padding: 0.8rem;
  margin: 0.6rem 0;
  border-radius: 8px;
  border: 1px solid var(--text-color);
}
.auth-form button {
  width: 100%;
  padding: 0.8rem;
  margin-top: 1rem;
  background: var(--secondary-gradient);
  color: #fff;
  font-weight: 600;
}

/* === 9. Validation Messages === */
.input-error { border: 1px solid #e52e71 !important; }
.error-message { color: #e52e71; font-size: 0.9rem; }

/* === 10. Animations (AOS + custom) === */
[data-aos] { opacity: 0; transition-property: opacity, transform; }
[data-aos].aos-animate { opacity: 1; }
@keyframes waveMove {
  from { background-position-x: 0; }
  to { background-position-x: 1000px; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlide {
  0% { opacity: 0.6; transform: translateY(10px); }
  50% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.6; transform: translateY(-10px); }
}
@keyframes quoteBounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-6px); opacity: 1; }
}

/* === 11. Footer === */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--secondary-gradient);
  color: #fff;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.95rem;
}
.dark-mode footer { background: linear-gradient(90deg, #111, #222); }
footer p { margin: 0.5rem 0; }
footer a {
  color: #fff; text-decoration: underline;
  transition: color 0.3s ease;
}
footer a:hover { color: var(--link-hover-color); }

/* === 12. Mobile Adjustments === */
@media (max-width: 768px) {
  section { padding: clamp(1.4rem, 5vw, 2.2rem); }
  .main-header { padding: 0.8rem 1rem; }
  .logo { font-size: 1.3rem; }
  .menu a { font-size: 1rem; }
  section::before, section::after, footer::before {
    height: 20px;
    border-radius: 50% / 30%;
  }
}

/* === 13. Site-Specific Styles === */
.auth-form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
}
.auth-form-container h2 { text-align: center; margin-bottom: 1rem; }
.auth-form-container p { text-align: center; margin-bottom: 2rem; }

/* Course Cards */
.course-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  margin: 1.5rem auto;
  max-width: 500px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); }
.course-card h3 { margin-bottom: 0.8rem; }
.course-card p { margin-bottom: 1rem; }
.course-card a.btn { display: inline-block; margin-top: 0.5rem; }

/* Trading Cards */
.trading-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 600px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.trading-card:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.trading-card h3 { margin-bottom: 0.5rem; }
.trading-card p { margin-bottom: 0.8rem; }

/* YouTube Tips Section */
.youtube-tips-section {
  padding: 4rem 2rem;
  background: var(--section-even-bg);
  border-radius: 12px;
  margin: 2rem auto;
}
.youtube-tips-section h2 { text-align: center; margin-bottom: 2rem; }
.youtube-tips { display: grid; gap: 1.5rem; }
.youtube-tip {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.youtube-tip:hover { transform: translateY(-6px); }
.youtube-tip h3 { margin-bottom: 0.5rem; }

/* CTA Section */
.cta {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--section-odd-bg);
  border-radius: 12px;
  margin: 2rem auto;
}
.cta h2 { margin-bottom: 1rem; }
.cta p { margin-bottom: 1.5rem; }
.cta .btn { padding: 0.8rem 1.6rem; font-size: 1.1rem; }

/* Progress Bar */
.progress-section { padding: 4rem 2rem; text-align: center; }
.progress-bar-container {
  width: 100%; max-width: 600px; height: 20px;
  background: #e0e0e0; border-radius: 10px;
  margin: 1rem auto; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0;
  background: var(--secondary-gradient);
  border-radius: 10px; transition: width 0.6s ease;
}

/* Success Screen */
.success-screen {
  text-align: center;
  padding: 3rem;
  background: #e0ffe5;
  border-radius: 12px;
  color: #2d7a32;
  font-weight: bold;
  box-shadow: var(--shadow);
}

/* === 14. Trader Quotes Section === */
.quote-section {
  text-align: center;
  margin: 0 auto;
  max-width: 1000px;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  border-radius: 16px;
  background: linear-gradient(135deg, #e0f7fa, #fce4ec);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease forwards;
}
.quote-section::before,
.quote-section::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 120px;
  background-repeat: no-repeat;
  background-size: cover;
  animation: waveMove 6s linear infinite alternate;
  opacity: 0.25;
  z-index: 0;
}
.quote-section::before {
  top: 0;
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='%23ff9a9e' fill-opacity='1' d='M0,32L48,69.3C96,107,192,181,288,186.7C384,192,480,128,576,101.3C672,75,768,85,864,117.3C960,149,1056,203,1152,197.3C1248,192,1344,128,1392,96L1440,64L1440,0L0,0Z'></path></svg>");
}
.quote-section::after {
  bottom: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='%23a1c4fd' fill-opacity='1' d='M0,64L48,96C96,128,192,192,288,197.3C384,203,480,149,576,128C672,107,768,117,864,128C960,139,1056,149,1152,154.7C1248,160,1344,160,1392,160L1440,160L1440,0L0,0Z'></path></svg>");
}
.trader-quote::before {
  content: "❝";
  display: block;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  margin-bottom: 1rem;
  color: #ff6a00;
  opacity: 0.7;
  animation: quoteBounce 3s ease-in-out infinite;
}
.trader-quote {
  position: relative;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(90deg, #ff6a00, #ee0979);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeSlide 4s ease-in-out infinite alternate;
  z-index: 1;
}
body.dark-mode .quote-section {
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.05);
}
body.dark-mode .trader-quote {
  background: linear-gradient(90deg, #00c6ff, #7ec8e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.dark-mode .trader-quote::before {
  color: #00c6ff;
}

/* === 15. Blog Section === */
.blog-section { padding: 4rem 2rem; }
.blog-list { display: grid; gap: 2rem; max-width: 900px; margin: 0 auto; }
.blog-post {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-post:hover { transform: translateY(-6px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.blog-post h3 { margin-bottom: 1rem; }
.blog-post p { margin-bottom: 1rem; }
.blog-post a.btn { display: inline-block; margin-top: 0.5rem; }

/* === 16. About Section === */
.about-section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.about-section h2 { margin-bottom: 1rem; }
.about-section p { margin-bottom: 1.5rem; line-height: 1.8; }

/* === 17. Contact Section === */
.contact-section {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.contact-section h2 { text-align: center; margin-bottom: 1.5rem; }
.contact-form {
  background: var(--form-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 0.8rem; margin: 0.6rem 0;
  border-radius: 8px; border: 1px solid var(--text-color);
  resize: none;
}
.contact-form button {
  width: 100%; padding: 0.8rem; margin-top: 1rem;
  background: var(--secondary-gradient); color: #fff;
  font-weight: 600;
}

/* === 18. Utility Classes === */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* === 19. Trader Quotes Section === */
.quote-section {
  text-align: center;
  margin: 0 auto;
  max-width: 1000px;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem);
  border-radius: 16px;
  background: linear-gradient(135deg, #e0f7fa, #fce4ec);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease forwards;
}
.quote-section::before,
.quote-section::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 120px;
  background-repeat: no-repeat;
  background-size: cover;
  animation: waveMove 6s linear infinite alternate;
  opacity: 0.25;
  z-index: 0;
}
.quote-section::before {
  top: 0;
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='%23ff9a9e' fill-opacity='1' d='M0,32L48,69.3C96,107,192,181,288,186.7C384,192,480,128,576,101.3C672,75,768,85,864,117.3C960,149,1056,203,1152,197.3C1248,192,1344,128,1392,96L1440,64L1440,0L0,0Z'></path></svg>");
}
.quote-section::after {
  bottom: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='%23a1c4fd' fill-opacity='1' d='M0,64L48,96C96,128,192,192,288,197.3C384,203,480,149,576,128C672,107,768,117,864,128C960,139,1056,149,1152,154.7C1248,160,1344,160,1392,160L1440,160L1440,0L0,0Z'></path></svg>");
}
.trader-quote::before {
  content: "❝";
  display: block;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
  margin-bottom: 1rem;
  color: #ff6a00;
  opacity: 0.7;
  animation: quoteBounce 3s ease-in-out infinite;
}
.trader-quote {
  position: relative;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(90deg, #ff6a00, #ee0979);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeSlide 4s ease-in-out infinite alternate;
  z-index: 1;
}
body.dark-mode .quote-section {
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.05);
}
body.dark-mode .trader-quote {
  background: linear-gradient(90deg, #00c6ff, #7ec8e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.dark-mode .trader-quote::before {
  color: #00c6ff;
}
