/* ============================================
   KARTHIGEYAN R - CUSTOM IMPROVEMENTS
   Maintains original theme with enhancements
   ============================================ */

/* CSS Variables */
:root {
  --gold: #d4af37;
  --gold-light: #f0d878;
  --bg-dark: #050508;
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
}

/* ============================================
   STARFIELD BACKGROUND
   ============================================ */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: var(--opacity, 0.5); }
  50% { opacity: 1; }
}

/* ============================================
   BUTTON BOX - HORIZONTAL LAYOUT
   ============================================ */
.btn-box {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 500px;
}

.button {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  color: var(--gold) !important;
  padding: 8px 14px !important;
  font-size: 11px !important;
  font-family: 'Major Mono Display', monospace !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

.button:hover {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transform: translateY(-1px);
}

.button.red-giant {
  border-color: rgba(255, 80, 80, 0.4) !important;
  color: #ff8080 !important;
}

.button.red-giant:hover {
  background: rgba(255, 80, 80, 0.2) !important;
  border-color: #ff5050 !important;
  box-shadow: 0 0 15px rgba(255, 80, 80, 0.4);
}

/* ============================================
   SOLAR SYSTEM - FIXED BACKGROUND
   ============================================ */
.canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.solar-system {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.planet {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 100%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

/* Planet Styles */
.mercury { width: 8px; height: 8px; background: radial-gradient(circle at 30% 30%, #a0a0a0, #5a5a5a); }
.venus { width: 18px; height: 18px; background: radial-gradient(circle at 30% 30%, #e6c288, #b8956b); }
.earth { width: 20px; height: 20px; background: radial-gradient(circle at 30% 30%, #6b93d6, #2e5c8a); }
.mars { width: 12px; height: 12px; background: radial-gradient(circle at 30% 30%, #c1440e, #8b2e0a); }
.jupiter { width: 60px; height: 60px; background: linear-gradient(180deg, #c99039 0%, #d4a574 20%, #c99039 40%, #a67c52 60%, #c99039 80%, #d4a574 100%); }
.saturn { width: 50px; height: 50px; background: radial-gradient(circle at 30% 30%, #e3dccb, #b8aa8f); position: relative; }
.saturn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 4px solid rgba(184, 170, 143, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
}
.uranus { width: 35px; height: 35px; background: radial-gradient(circle at 30% 30%, #a8d8ea, #6bb3cd); }
.neptune { width: 34px; height: 34px; background: radial-gradient(circle at 30% 30%, #5b7cff, #3b5bdb); }

.sun {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #ffd700, #ff8c00, #ff4500);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 60px rgba(255, 140, 0, 0.5), 0 0 100px rgba(255, 69, 0, 0.3);
  animation: sun-pulse 4s ease-in-out infinite;
}

@keyframes sun-pulse {
  0%, 100% { box-shadow: 0 0 60px rgba(255, 140, 0, 0.5), 0 0 100px rgba(255, 69, 0, 0.3); }
  50% { box-shadow: 0 0 80px rgba(255, 140, 0, 0.7), 0 0 140px rgba(255, 69, 0, 0.5); }
}

/* Orbit Sizes & Animation */
.mercury-orbit { width: 15%; height: 15%; animation: orbit 8s linear infinite; }
.venus-orbit { width: 22%; height: 22%; animation: orbit 12s linear infinite; }
.earth-orbit { width: 30%; height: 30%; animation: orbit 16s linear infinite; }
.mars-orbit { width: 38%; height: 38%; animation: orbit 24s linear infinite; }
.jupiter-orbit { width: 52%; height: 52%; animation: orbit 48s linear infinite; }
.saturn-orbit { width: 66%; height: 66%; animation: orbit 72s linear infinite; }
.uranus-orbit { width: 78%; height: 78%; animation: orbit 96s linear infinite; }
.neptune-orbit { width: 90%; height: 90%; animation: orbit 120s linear infinite; }

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Planet Labels */
.planet-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-family: 'Major Mono Display', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.neptune-label { top: 10%; right: 15%; }
.uranus-label { top: 15%; right: 25%; }
.saturn-label { top: 25%; right: 32%; }
.jupiter-label { top: 35%; right: 38%; }
.mars-label { top: 45%; right: 42%; color: rgba(193, 68, 14, 0.7); }
.earth-label { top: 50%; right: 45%; color: rgba(107, 147, 214, 0.7); }
.venus-label { top: 55%; right: 47%; color: rgba(230, 194, 136, 0.7); }
.mercury-label { top: 60%; right: 48%; }

/* Real Size Mode */
.body.real-size .mercury { width: 4px; height: 4px; }
.body.real-size .venus { width: 10px; height: 10px; }
.body.real-size .earth { width: 10px; height: 10px; }
.body.real-size .mars { width: 6px; height: 6px; }
.body.real-size .jupiter { width: 112px; height: 112px; }
.body.real-size .saturn { width: 94px; height: 94px; }
.body.real-size .uranus { width: 40px; height: 40px; }
.body.real-size .neptune { width: 38px; height: 38px; }

/* Real Orbits Mode */
.body.real-orbits .mercury-orbit { width: 12%; height: 12%; }
.body.real-orbits .venus-orbit { width: 18%; height: 18%; }
.body.real-orbits .earth-orbit { width: 25%; height: 25%; }
.body.real-orbits .mars-orbit { width: 35%; height: 35%; }
.body.real-orbits .jupiter-orbit { width: 55%; height: 55%; }
.body.real-orbits .saturn-orbit { width: 75%; height: 75%; }
.body.real-orbits .uranus-orbit { width: 90%; height: 90%; }
.body.real-orbits .neptune-orbit { width: 100%; height: 100%; }

/* Red Giant Mode */
.body.red-giant-mode .sun {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #ff0000, #8b0000);
  box-shadow: 0 0 100px rgba(255, 0, 0, 0.8), 0 0 200px rgba(139, 0, 0, 0.5);
  animation: red-giant-pulse 2s ease-in-out infinite;
}

@keyframes red-giant-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */
.main-content-wrapper {
  position: relative;
  z-index: 10;
  margin-top: 100vh;
  background: linear-gradient(to bottom, transparent 0%, rgba(5, 5, 8, 0.9) 5%, var(--bg-dark) 15%);
  padding: 60px 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 60px;
}

.hero-split {
  flex: 1;
  min-width: 300px;
}

.hero-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-images img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.hero-images img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.2);
}

.centered-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--gold);
  margin-bottom: 30px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.margin-bottom-24px {
  margin-bottom: 24px;
  line-height: 1.8;
  color: var(--text-muted);
}

.margin-bottom-24px strong {
  color: var(--gold);
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--gold-light);
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin: 30px 0;
  line-height: 1.8;
}

/* ============================================
   DYNAMIC CONTENT AREA
   ============================================ */
.dynamic-content {
  margin: 40px 0;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.w-dyn-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  margin: 40px 0;
}

.newsletter-form {
  max-width: 400px;
  margin: 30px auto 0;
}

.newsletter-form label {
  display: block;
  text-align: left;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.newsletter-form .w-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  color: var(--text-white);
  padding: 12px 16px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.newsletter-form .w-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  outline: none;
}

.submit-btn {
  background: linear-gradient(135deg, var(--gold), var(--gold-light)) !important;
  color: #000 !important;
  font-family: 'Major Mono Display', monospace !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 14px 32px !important;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.form-message {
  display: none;
  padding: 16px;
  border-radius: 4px;
  margin-top: 20px;
  font-size: 14px;
}

.form-message.success {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #81c784;
}

.form-message.error {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #e57373;
}

.form-message.visible {
  display: block;
  animation: fade-in 0.3s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
}

.nav-link {
  display: inline-block;
  padding: 12px 24px;
  color: var(--text-white);
  text-decoration: none;
  font-family: 'Major Mono Display', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.4);
}

.nav-link:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.nav-link.highlight {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

.nav-link.highlight:hover {
  background: rgba(212, 175, 55, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-text {
  font-family: 'Major Mono Display', monospace;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-subtext {
  color: var(--text-muted);
  font-size: 12px;
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.notification-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.9);
  color: var(--gold);
  padding: 12px 24px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-family: 'Major Mono Display', monospace;
  font-size: 12px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.notification-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 991px) {
  .btn-box {
    top: 10px;
    left: 10px;
    max-width: 350px;
  }
  
  .button {
    padding: 6px 10px !important;
    font-size: 10px !important;
  }
  
  .hero-wrapper {
    flex-direction: column;
  }
  
  .hero-images {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .hero-images img {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .main-content-wrapper {
    margin-top: 80vh;
  }
  
  .btn-box {
    position: relative;
    top: auto;
    left: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
  }
  
  .main-nav {
    gap: 8px;
  }
  
  .nav-link {
    padding: 10px 16px;
    font-size: 11px;
  }
  
  .planet-label {
    font-size: 8px;
  }
}

@media (max-width: 479px) {
  .centered-heading {
    font-size: 1.5rem;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: 1px;
  }
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ============================================
   MEMORIES PAGE STYLES
   ============================================ */

.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 4px;
  color: var(--gold);
  text-decoration: none;
  font-family: 'Major Mono Display', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.back-link:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.memories-page {
  padding-top: 80px;
}

.memories-header {
  text-align: center;
  margin-bottom: 40px;
}

.memory-section {
  margin-bottom: 60px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.memory-section:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(212, 175, 55, 0.2);
}

.memory-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  font-family: 'Major Mono Display', monospace;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 20px;
}

.poem-container {
  margin: 30px 0;
  padding: 30px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.poem-tamil {
  font-family: 'Noto Sans Tamil', 'Open Sans', sans-serif;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--gold-light);
  margin-bottom: 30px;
}

.poem-tamil p {
  margin: 8px 0;
}

.poem-translation {
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.poem-translation h4 {
  font-family: 'Major Mono Display', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 15px;
}

.poem-translation p {
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
: 2px;
  margin-bottom: 8px;
}

.footer-subtext {
  color: var(--color-text-muted);
  font-size: 12px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-images {
    order: -1;
  }
  
  .image-grid {
    max-width: 400px;
  }
  
  .btn-box {
    top: 10px;
    left: 10px;
  }
  
  .button {
    padding: 8px 12px;
    font-size: 10px;
    min-width: 100px;
  }
}

@media (max-width: 767px) {
  .nav-list {
    gap: 8px;
  }
  
  .nav-link {
    padding: 10px 16px;
    font-size: 12px;
  }
  
  .hero-section {
    padding: 40px 0;
  }
  
  .image-grid {
    grid-template-columns: 1fr;
  }
  
  .img-1 {
    grid-row: 1;
    height: 250px;
  }
  
  .img-2 {
    grid-row: 2;
  }
  
  .btn-box {
    flex-direction: row;
    flex-wrap: wrap;
    width: calc(100% - 20px);
    justify-content: center;
  }
  
  .button {
    flex: 1 1 calc(50% - 8px);
    max-width: 150px;
  }
}

@media (max-width: 479px) {
  .title-main {
    letter-spacing: 2px;
  }
  
  .quote {
    font-size: 1.1rem;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 1px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

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

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-gold: #ffd700;
    --color-text-muted: #cccccc;
  }
}
