/* ========================================
   COSMIC CATS - CLEANED & OPTIMIZED STYLESHEET
   🎯 PURPOSE: A clean, deduplicated, and functional stylesheet for the entire site.
   📄 USED BY: index.html + all *-content.html files
   ✨ FEATURES: Neon semi-transparent look, responsive design, all features preserved.
   
   ⚠️ REMINDER: When adding new code, merge with existing sections! 
   ⚠️ Put main-content styles with other main-content styles!
   ⚠️ Avoid code bloat - organize by functional sections!
======================================== */

/* ========================================
   0. Imports
======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poiret+One&family=Exo+2:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poiret+One&family=Rubik+Glitch&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Agu+Display&family=Poiret+One&family=Rubik+Glitch&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Agu+Display&family=Micro+5&family=Poiret+One&family=Rubik+Glitch&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik+Glitch&family=Agu+Display&family=Micro+5&family=Orbitron:wght@700&display=swap');


/* ========================================
   1. FONTS & BASE STYLES
======================================== */

#layerNeko0 {
  /* Z-INDEX 2200: Draggable UI, always above panels */
  z-index: 2200;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.rubik-glitch-regular {
  font-family: "Rubik Glitch", system-ui;
  font-weight: 400;
  font-style: normal;
}

.agu-display-normal {
  font-family: "Agu Display", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "MORF" 0;
}

.micro-5-regular {
  font-family: "Micro 5", sans-serif;
  font-weight: 400;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   2. ANIMATED BACKGROUNDS - STAR SECTOR (MODULAR)
======================================== */

/* Modular starfield effect with adjustable variables */
.star-sector {
  --star-size: 1.5px;
  --star-density: 8;
  --star-tiling: 400px;
  /* Only 4 color options for performance and style */
  --star-color-1: #fff;
  --star-color-2: #8be9fdcc;
  --star-color-3: #ff79c6cc;
  --star-color-4: #a14affcc;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Z-INDEX 0: Starfield background, always at the bottom */
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  background:
    radial-gradient(var(--star-size) var(--star-size) at 20px 40px, var(--star-color-1), transparent 60%),
    radial-gradient(calc(var(--star-size) * 1.2) calc(var(--star-size) * 1.2) at 120px 80px, var(--star-color-2), transparent 60%),
    radial-gradient(calc(var(--star-size) * 0.8) calc(var(--star-size) * 0.8) at 200px 160px, var(--star-color-3), transparent 60%),
    radial-gradient(calc(var(--star-size) * 1.5) calc(var(--star-size) * 1.5) at 300px 200px, var(--star-color-4), transparent 60%),
    radial-gradient(var(--star-size) var(--star-size) at 350px 100px, var(--star-color-2), transparent 60%),
    radial-gradient(calc(var(--star-size) * 1.1) calc(var(--star-size) * 1.1) at 80px 300px, var(--star-color-3), transparent 60%),
    radial-gradient(calc(var(--star-size) * 0.9) calc(var(--star-size) * 0.9) at 250px 250px, var(--star-color-4), transparent 60%),
    radial-gradient(calc(var(--star-size) * 1.3) calc(var(--star-size) * 1.3) at 180px 320px, var(--star-color-1), transparent 60%);
  background-repeat: repeat;
  background-size: var(--star-tiling) var(--star-tiling);
  animation: starfield-move 25s linear infinite;
}

@keyframes starfield-move {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-50px); }
  100% { transform: translateY(0px); }
}



/* ========================================
   3.COSMIC BACKGROUND WRAPPER - .cosmos
======================================== */
.cosmos {
  font-family: 'Exo 2', 'Segoe UI', Arial, sans-serif;
  background: 
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(255, 0, 255, 0.18) 0%, transparent 80%),
    radial-gradient(ellipse 50% 30% at 30% 60%, rgba(0, 255, 255, 0.15) 0%, transparent 80%),
    radial-gradient(ellipse 40% 60% at 60% 70%, rgba(255, 255, 0, 0.10) 0%, transparent 80%),
    radial-gradient(ellipse 30% 40% at 80% 80%, rgba(255, 0, 0, 0.10) 0%, transparent 80%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0, 0, 64, 0.7) 0%, transparent 100%),
    linear-gradient(120deg, #0a0a1e 0%, #1a1a2e 100%);
  background-blend-mode: lighten, lighten, lighten, lighten, normal, normal;
  background-size: cover;
  color: #ffffff;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  min-width: 100vw;
  z-index: -10;
}


/* ========================================
   4. Navigational Tablet - Sidebar
======================================== */
.sidebar {
  position: fixed;
  top: 10vh;

  width: 40vw;
  right: 35px;
  max-width: 600px;
  min-width: 320px;
  height: 80vh;

  background-color: rgba(26, 15, 46, var(--cosmic-global-opacity));
  backdrop-filter: blur(var(--cosmic-global-blur));


  border-radius: 28px 0 0 28px;
  border: 4px solid rgba(255,255,255,0.12);
  box-shadow:
    -8px 0 35px rgba(0,0,0,0.5),
    0 0 40px 8px rgba(139,233,253,0.10),
    0 0 0 8px rgba(255,255,255,0.08) inset,
    inset 0 0 24px 2px rgba(139,233,253,0.10);
  
  overflow: visible; /* So the border effect is not clipped */

  /* Z-INDEX 1000: Sidebar navigation */
  z-index: 1000;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
  /* Grip handle positioning context */
  overflow: visible;
}

/* Second sidebar grip for additional functionality */
.sidebar-grip-2 {
  position: fixed;
  top: 10vh;
  right: -3vw;
  width: 9vw;
  height: 80vh;
  border-radius: 28px 0 0 28px;
  border: 4px solid rgba(255,255,255,0.12);
  background: linear-gradient(120deg, #232a3a 60%, #001d24 100%);
  /* Z-INDEX 1100: Sidebar open/close handles */
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: transform 0.3s, opacity 0.3s;

  box-shadow: 0 0 18px 4px #8be9fd88, 0 0 0 2px #ff79c6 inset;
  animation: grip2-glow 2.5s linear infinite;
}
@keyframes grip2-glow {
  0%, 100% { box-shadow: 0 0 18px 4px #8be9fd88, 0 0 0 2px #ff79c6 inset; }
  50% { box-shadow: 0 0 32px 8px #ff79c6cc, 0 0 0 4px #8be9fd inset; }
}
.sidebar-grip-2::after {
  content: "Open the Cosmic Tablet!";
  position: absolute;
  left: 110%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,30,40,0.95);
  color: #8be9fd;
  font-size: 1rem;
  padding: 6px 14px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 12px #0008;
  transition: opacity 0.3s, left 0.3s;
  z-index: 9999;
}
.sidebar-grip-2:hover::after {
  opacity: 1;
  left: 120%;
}
.sidebar-grip-2:hover {
  transform: translateX(-3vw);
  opacity: 1;
}
.sidebar-grip-2.open {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-9vh); /* or whatever your out-of-view animation is */
}

/* === Futuristic Tablet Grip/Handle === */
.sidebar-grip {
  position: absolute;
  top: 50%;
  right: -60px; /* sticks out further from sidebar edge */
  width: 60px;
  height: 102%; /* slightly bigger than sidebar */
  transform: translateY(-50%);
  background: linear-gradient(120deg, #232a3a 60%, #8be9fd 100%);
  border-radius: 0 28px 28px 0;
  box-shadow: 2px 0 24px 6px #8be9fd55, 0 0 0 2px #fff2 inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  /* Z-INDEX 1100: Sidebar open/close handles */
  z-index: 1100;
  border-left: 2px solid #8be9fd88;
  box-shadow: 0 0 18px 4px #8be9fd88, 0 0 0 2px #ff79c6 inset;
  animation: grip2-glow 2.5s linear infinite;
}

.sidebar-grip::before {
  content: '';
  display: block;
  width: 18px;
  height: 60px;
  margin-top: 18px;
  border-radius: 8px;
  background: repeating-linear-gradient(
    to bottom,
    #8be9fd33 0 8px,
    transparent 8px 16px
  );
  opacity: 0.7;
}

.sidebar-model {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #8be9fd;
  font-family: 'Exo 2', 'Poiret One', monospace;
  margin-bottom: 18px;
  opacity: 0.85;
  text-shadow: 0 0 8px #8be9fd88, 0 0 2px #fff;
  user-select: none;
}


.sidebar::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(120deg, #8be9fdcc, #ff79c6cc);
  border-radius: 8px;
  box-shadow: 0 0 8px #8be9fd88;
}
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #8be9fdcc #222;
}

.sidebar.closed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

.sidebar:not(.closed) {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sidebar::after {
  content: '';
  position: absolute;
  left: 8px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 60px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.12) 8px,
    transparent 8px,
    transparent 12px
  );
  opacity: 0.7;
  z-index: 2;
}

/* Sidebar inner wrapper to prevent content from overlapping border effect */

.sidebar-inner {
  padding: 22px; /* Match or slightly exceed border + ::before padding */
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  position: relative;
  z-index: 3;
}



.sidebar-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 30, 40, 0.65);
  /* Z-INDEX 900: Sidebar overlay, below sidebar */
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/*CosmicCat's Navigational Tablet*/
.sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #ff79c6, #8be9fd, #50fa7b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.9));
  animation: gradient-text 4s ease infinite;
  font-family: 'Exo 2', sans-serif;
}

@keyframes gradient-text {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}



.sidebar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 0;
  width: 100%;
  opacity: 0;
}

.sidebar-section.open {
  max-height: 200px; /* Adjust as needed */
  opacity: 1;
}

.sidebar-category {
  margin: 10px;
  padding: 6px;

  border-radius: 5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.sidebar-category:hover {
  transform: scale(1.02);
}

/* Category Themes */
.sidebar-category.cosmic-portal {
  background: linear-gradient(135deg, 
    rgba(139, 233, 253, 0.3) 0%, 
    rgba(139, 233, 253, 0.2) 50%, 
    rgba(139, 233, 253, 0.15) 100%);
  border-color: rgba(139, 233, 253, 0.5);
  box-shadow: 
    0 8px 25px rgba(139, 233, 253, 0.25),
    inset 0 1px 0 rgba(139, 233, 253, 0.4);
}
.sidebar-category.fire {
  background: linear-gradient(135deg, 
    rgba(255, 69, 0, 0.4) 0%, 
    rgba(220, 20, 60, 0.5) 50%, 
    rgba(255, 140, 0, 0.3) 100%);
  border-color: rgba(255, 69, 0, 0.6);
  box-shadow: 
    0 8px 25px rgba(255, 69, 0, 0.2),
    inset 0 1px 0 rgba(255, 140, 0, 0.3);
}
.sidebar-category.matrix {
  background: linear-gradient(135deg, 
    rgba(0, 255, 0, 0.25) 0%, 
    rgba(0, 200, 0, 0.35) 50%, 
    rgba(0, 150, 0, 0.2) 100%);
  border-color: rgba(0, 255, 0, 0.5);
  box-shadow: 
    0 8px 25px rgba(0, 255, 0, 0.15),
    inset 0 1px 0 rgba(0, 255, 0, 0.3);
}
.sidebar-category.synthwave {
  background: linear-gradient(135deg, 
    rgba(255, 0, 110, 0.4) 0%, 
    rgba(131, 56, 236, 0.5) 50%, 
    rgba(255, 20, 147, 0.3) 100%);
  border-color: rgba(255, 0, 110, 0.6);
  box-shadow: 
    0 8px 25px rgba(255, 0, 110, 0.2),
    inset 0 1px 0 rgba(255, 20, 147, 0.3);
}

.sidebar h3 {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  user-select: none;
  pointer-events: none;
  background: linear-gradient(90deg, #fff, #ff79c6, #8be9fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  font-family: 'Poiret One', sans-serif;
  width: 100%;
  font-family: 'Exo 2', sans-serif;

}

.sidebar a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 4px 0;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 90%;
  text-align: center;
  font-family: 'Exo 2', sans-serif;
}

.sidebar a:hover {
  background: rgba(139, 233, 253, 0.2);
  transform: scale(1.02);
  border-color: rgba(139, 233, 253, 0.4);
}

.sidebar a.active {
  background: rgba(255, 121, 198, 0.25);
  font-weight: 600;
  border-color: rgba(255, 121, 198, 0.5);
}

@media (max-width: 768px) {
  .sidebar {
    width: 90%;
    max-width: 320px;
  }
}


/* ========================================
   5. IFRAME & CONTENT AREA
======================================== */

/*Main Content Loader*/
.content-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  z-index: 1;

  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  background: transparent;
}

.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  color: #8be9fd;
}

.cosmic-spinner {
  font-size: 2rem;
  animation: spin 2s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Literal iframe */
.content-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  transition: opacity 0.3s ease;
}

/* ========================================
  5 Flexbox Layouts / Inside Iframes
======================================== */

.main-content-column {
  /*cross axis is vertical in row, horizontal in column*/
  display: flex;
  flex-direction: column;
  flex-wrap: wrap; /*allows the content to wrap if it exceeds the width*/

  justify-content: flex-start; /*Main Axis; Vertical start*/
  align-items: center; /*Cross Axis; Horizontal Center, center, end etc*/

  align-content: center; /*Controls spacing of rows/columns when flex-wrap is used and there are multiple lines*/
  margin-top: 100px;
  margin-bottom: 100px;
  gap: 48px;
}

.content-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;


  justify-content: center; /*when row becomes column, horizontal center*/
  align-items: stretch; /*because this is row, you are choosing if the boxes are sticked to top, bottom, or centered (perhaps streched)*/
  
  align-content: stretch; /*when there is space, this is how you want to fill it, center, start, end, space-between etc*/

  gap:32px;
}

.sub-content-column {
  max-width: 600px;
  width: 100%;
  gap: 32px;

  display: flex;
  flex-direction: column;
  flex-wrap: wrap;

  justify-content: flex-start;
  align-items: center;

  align-content: space-evenly;

  overflow-x: hidden;
  box-sizing: border-box;


  flex-grow: 1;
  flex-basis:auto;
  flex-shrink: 1;
}

@media (max-width: 1100px) {
  .content-row {
    max-width: 95%;

    gap: 6vh;
  }
    
  .sub-content-column {
    gap: 3vh;
  }

}


/* ========================================
   Main Content & Sub Content
======================================== */

.main-content,
.sub-content {
  padding: 30px;
  max-width: 600px;
  width: 100%;
  border-radius: 25px;

  transition: all 0.4s ease;
  backdrop-filter: blur(var(--cosmic-global-blur, 6px));
}

.main-content {
  background: linear-gradient(45deg, 
    rgba(26, 15, 46, var(--cosmic-global-opacity, 0.3)) 0%, 
    rgba(45, 27, 105, var(--cosmic-global-opacity, 0.3)) 15%, 
    rgba(255, 0, 110, var(--cosmic-global-opacity, 0.3)) 30%, 
    rgba(131, 56, 236, var(--cosmic-global-opacity, 0.3)) 45%, 
    rgba(58, 134, 255, var(--cosmic-global-opacity, 0.3)) 60%, 
    rgba(6, 255, 165, var(--cosmic-global-opacity, 0.3)) 75%, 
    rgba(255, 190, 11, var(--cosmic-global-opacity, 0.3)) 90%, 
    rgba(251, 86, 7, var(--cosmic-global-opacity, 0.3)) 100%);
  background-size: 400% 400%;

  animation: cosmic-galaxy 15s ease infinite;
  position: relative;
}

.main-content::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Z-INDEX -1: Decorative borders, always below content but above background */
  z-index: -1;
  border-radius: 25px;
  padding: 5px; /* border thickness */
  background: linear-gradient(45deg, 
    rgb(234, 0, 255), 
    rgb(6, 209, 255), 
    rgb(200, 255, 0),
    rgb(234, 0, 255)
  );
  background-size: 400% 400%;
  animation: border-colors-move 8s linear infinite;
  /* Mask for Chrome/Safari */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  /* Standard mask for Firefox/others */
  mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
@keyframes border-colors-move {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.sub-content {
  background: linear-gradient(135deg, 
    rgba(26, 15, 46, var(--cosmic-global-opacity, 0.3)) 0%, 
    rgba(45, 27, 105, var(--cosmic-global-opacity, 0.3)) 15%, 
    rgba(255, 0, 110, var(--cosmic-global-opacity, 0.3)) 30%, 
    rgba(131, 56, 236, var(--cosmic-global-opacity, 0.3)) 45%, 
    rgba(58, 134, 255, var(--cosmic-global-opacity, 0.3)) 60%, 
    rgba(6, 255, 165, var(--cosmic-global-opacity, 0.3)) 75%, 
    rgba(255, 190, 11, var(--cosmic-global-opacity, 0.3)) 90%, 
    rgba(251, 86, 7, var(--cosmic-global-opacity, 0.3)) 100%);
  background-size: 400% 400%;
  animation: cosmic-galaxy 15s ease infinite;
  border: 2px solid rgba(139, 233, 253, 0.25);
  position: relative;
}


@keyframes cosmic-galaxy {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}


.sub-content:hover, .main-content:hover {
  transform:scale(0.99);
}


/*coding2go https://www.youtube.com/watch?v=44FTAS-qT8Q&t=399s*/

.sub-content::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Z-INDEX -1: Decorative borders, always below content but above background */
  z-index: -1;
  border-radius: 25px;
  padding: 5px;
  background: conic-gradient(from var(--angle), #ffffff, #1d0053 50%, #ffffff 100%);
  background-size: 100% 100%;
  /* Mask for Chrome/Safari */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  /* Standard mask for Firefox/others */
  mask:
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: spin-border 2s linear infinite;
}

/* Border color variations for sub-content (modifier classes) */
.sub-content.scw-1::before {
  background: conic-gradient(from var(--angle), #00cfff, #000b6d, #00cfff 100%);
}
.sub-content.scw-2::before {
  background: conic-gradient(from var(--angle), #ffb347, #ff5e62, #ffb347 100%);
}
.sub-content.scw-3::before {
  background: conic-gradient(from var(--angle), #a8ff78, #ffecd2, #a8ff78 100%);
}
.sub-content.scw-4::before {
  background: conic-gradient(from var(--angle), #39ff14, #ff005a, #39ff14 100%);
}
.sub-content.scw-5::before {
  background: conic-gradient(from var(--angle), #fcb7ff, #b7fff6, #fcb7ff 100%);
}

@keyframes spin-border {
  from { --angle: 0deg; }
  to   { --angle: 360deg; }
}

/* Ensure content doesn't overflow sidebar area */

body.sidebar-open .sub-content {
  box-shadow: 0 0 60px 0 rgba(0,0,0,0.18), 0 0 0 8px rgba(139,233,253,0.06);
  transition: box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}




/* ========================================
   RESPONSIVE IFRAME CONTAINERS - AUTO-SIZING
======================================== */

/* Video container - auto-resizes based on content */
.video {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 20px 0;
  position: relative;
}

.video iframe {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 200px;
  height: auto !important;
  box-sizing: border-box;
  border-radius: 12px;
}

/* Survey container - properly sized for forms and longer content */
.survey {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 20px 0;
  position: relative;
  background: rgba(26, 15, 46, 0.1);
  border-radius: 15px;
  padding: 10px;
  border: 1px solid rgba(139, 233, 253, 0.2);
}

/* Make iframe a true window: no background, border, or effects */
.content-frame {
  position: fixed;
  top: 5vh;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  border: none;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* Fix text wrapping issues */
p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.content-item {
  margin: 0;
  padding: 40px 30px;
  background: linear-gradient(135deg, 
    rgba(26, 15, 46, 0.1) 0%, 
    rgba(45, 27, 105, 0.1) 15%, 
    rgba(255, 0, 110, 0.1) 30%, 
    rgba(251, 86, 7, 0.1) 100%);
  background-size: 400% 400%;
  animation: cosmic-galaxy 15s ease infinite;
  border: 2px solid rgba(139, 233, 253, 0.25);
  border-radius: 25px;
  box-shadow: 
    0 0 40px rgba(139, 233, 253, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
}

/* ========================================
   8. TYPOGRAPHY & CONTENT STYLES - ENHANCED PADDING
======================================== */
h1, h2, h3 {
  text-align: center;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ff79c6, #8be9fd, #50fa7b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(139, 233, 253, 0.4));
  animation: gradient-text 6s ease-in-out infinite;
  font-family: 'Poiret One', sans-serif;
  padding: 20px 0;
}

h1 { font-size: 3.8rem;}
h2 { font-size: 2.2rem;}
h3 { font-size: 1.6rem;; }

p {
  margin-bottom: 1.5em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 4px rgba(139, 233, 253, 0.2);
  line-height: 1.8;
}

.subtitle {
  font-size: 1.2rem;
  color: #8be9fd;
  margin-bottom: 2em;
  text-align: center;
  padding: 15px 0;
}

/* Enhanced small text styling for status messages */
.small1 {
  font-size: 0.9rem;
  color: rgba(255, 185, 108, 0.9);
  text-align: center;
  padding: 8px 16px;
  margin: 2em 2em;
  background: rgba(255, 185, 108, 0.1);
  border-radius: 12px;
  margin: 15px auto;
  max-width: 600px;
  border: 1px solid rgba(255, 185, 108, 0.2);
  box-shadow: 0 2px 10px rgba(255, 185, 108, 0.1);
}

.normal-dense {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 0px 10px 0px;
  border-radius: 8px;
}

.myMusic {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 0px 10px 0px;
  border-radius: 8px;
}

/* Enhanced italic text styling */
i {
  color: #f1abd3;
  font-style: italic;
  text-shadow: 0 0 3px rgba(241, 171, 211, 0.3);
}

/* Enhanced cosmic image styling - merged with existing */
.cosmic-image {
  max-width: 100%;
  border: 3px solid transparent;
  border-radius: 20px;
  background: linear-gradient(45deg, #ff79c6, #8be9fd, #50fa7b);
  background-size: 300% 300%;
  animation: cosmic-border 4s ease infinite;
  background-clip: padding-box;
  padding: 4px;
  margin: 2.5rem auto;
  display: block;
  text-align: center;
  box-shadow: 
    0 8px 25px rgba(139, 233, 253, 0.2),
    0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

@keyframes cosmic-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cosmic-image:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(139, 233, 253, 0.3),
    0 25px 50px rgba(0, 0, 0, 0.15);
}

.cosmic-image img,
.cosmic-image iframe {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.cosmic-image iframe {
  min-height: 315px;
}

.tooltip {
  position: relative;
  display: block;
  width: 100%;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 220px;
  background-color: #222;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  bottom: 110%; /* Position above the image */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.95em;
  display: block;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

hr {
  display: block;
  margin: 2em 2em;
  content: "";
}

.hr-fancy {
  display: block;
  margin: 2em 0;
  border-bottom: 2px dashed #8be9fd;
  height: 0;
  content: "";
}

.toggle-paragraph {
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.toggle-header {
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: baseline;
  margin-left: -1.2rem; /* Align with other list items */
  margin-bottom:12.800px ;
}

.toggle-header:hover {
  color: #8be9fd;
}

.toggle-arrow {
  font-size: 0.8rem;
  margin-right: 0.3rem;
  transition: transform 0.2s ease;
  color: #8be9fd;
  display: inline-block;
  width: 0.8rem; /* Fixed width for consistent alignment */
  text-align: center;
}

.toggle-header.open .toggle-arrow {
  transform: rotate(90deg);
}

.toggle-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 0; /* Align with toggle header content */
}

.toggle-content.open {
  max-height: 2000px; /* Very high limit instead of none for smooth animation */
}

/* ========================================
   9. EASTER EGGS & SPECIAL MODES
======================================== */

/* MLG Mode */
.mlg-background {
  background: linear-gradient(45deg, red, lime, blue, red);
  background-size: 400% 400%;
  animation: mlg-background 0.2s linear infinite;
}
.mlg-screen-shake {
  animation: mlg-shake 0.1s linear infinite;
}
@keyframes mlg-background {
  50% { background-position: 100% 100%; }
}
@keyframes mlg-shake {
  25% { transform: translate(2px, 2px) rotate(0.5deg); }
  75% { transform: translate(-3px, 1px) rotate(-0.5deg); }
}



/* ========================================
   11. UTILITIES & PRINT
======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.hidden {
  display: none !important;
}
@media print {
  .sidebar, .menu-toggle, /* .cat-cursor, */ .orbit-stars, .cosmic-marquee {
    display: none;
  }
  
  .main-content, .sub-content {
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    background: white;
    color: black;
  }
  
  body {
    background: white;
    color: black;
  }
}


/* Turkey link styles */
.turkey-link {
  color: #e74c3c;
  text-decoration: underline;
  font-weight: bold;
  transition: all 0.3s ease;
}

.turkey-link:hover {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16" viewBox="0 0 24 16"><rect width="24" height="16" fill="%23e30a17"/><circle cx="7" cy="8" r="4" fill="white"/><circle cx="8.5" cy="8" r="3" fill="%23e30a17"/><polygon points="11,5 12,7 14,7 12.5,8.5 13,10 11,9 9,10 9.5,8.5 8,7 10,7" fill="white"/></svg>') 12 8, pointer !important;
  color: #c0392b;
  text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

/* ========================================
   IFRAME NAVIGATION SYSTEM
======================================== */


/* ========================================
   CONTENT FRAME BASE STYLES - CONSISTENT SIZING & ENHANCED DESIGN
======================================== */
/* Applied to all iframe content pages for consistent sizing */

@keyframes cosmic-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cosmic-image:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 
    0 15px 40px rgba(139, 233, 253, 0.3),
    0 25px 50px rgba(0, 0, 0, 0.15);
}

.cosmic-image img,
.cosmic-image iframe {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.cosmic-image iframe {
  min-height: 315px;
}

/* Enhanced list styling */
ul, ol {
  margin: 1.5em 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.8em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  position: relative;
}

ul li::before {
  content: "★";
  color: #8be9fd;
  position: absolute;
  left: -1.5rem;
  font-size: 1.1rem;
  text-shadow: 0 0 6px rgba(139, 233, 253, 0.5);
}

ol li {
  counter-increment: cosmic-counter;
}

ol {
  counter-reset: cosmic-counter;
}

ol li::before {
  content: counter(cosmic-counter) ".";
  color: #50fa7b;
  position: absolute;
  left: -1.8rem;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(80, 250, 123, 0.5);
}

/* Enhanced link styling */
a {
  color: #8be9fd;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: #ff79c6;
  border-bottom-color: rgba(255, 121, 198, 0.5);
  text-shadow: 0 0 8px rgba(255, 121, 198, 0.4);
}

a:not(.turkey-link):hover::after {
  content: " ✨";
  animation: sparkle 0.6s ease-in-out;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1); }
}

#mydiv {
  position: absolute;
  top: 10vh;
  left: 0;
  padding: 200px;
  z-index: 9;
  text-align: center;
}
#mydiv img {
  width: 100px;       /* Set image width */
  height: 100px;      /* Set image height */
  object-fit: contain; /* Keeps aspect ratio, prevents stretching */
  display: block;
  margin: 0 auto;    /* Center the image */
}

/* Z-INDEX 3000+: Alerts, tooltips, and other overlays (future-proof) */
.alert, .tooltip, .overlay {
  z-index: 3000;
}


/* ========================================
   2. Marquee
======================================== */

.cosmic-marquee {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5vh;
  background: linear-gradient(90deg, 
  rgba(26,26,46,var(--cosmic-global-opacity)) 0%, 
  rgba(255,121,198,var(--cosmic-global-opacity)) 25%, 
  rgba(139,233,253,var(--cosmic-global-opacity)) 50%, 
  rgba(80,250,123,var(--cosmic-global-opacity)) 75%, 
  rgba(26,26,46,var(--cosmic-global-opacity)) 100%);
  /* Z-INDEX 1200: Top fixed marquee */
  z-index: 1200;
  overflow: hidden;
  border-bottom: 2px solid rgba(139, 233, 253, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.marquee-track {
  display: flex;
  width: 300%;
  height: 100%;
  animation: seamless-scroll 20s linear infinite;
}
@keyframes seamless-scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-33.3333%); }
}
.marquee-content {
  line-height: 50px;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  font-family: 'Poiret One', sans-serif;
  letter-spacing: 2px;
  flex: 0 0 33.3333%;
  min-width: 33.3333%;
  max-width: 33.3333%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}
.marquee-crazy .marquee-track {
  animation-duration: 2s !important;
}
.marquee-crazy .marquee-content {
  animation: crazy-colors 0.3s ease infinite;
}
@keyframes crazy-colors {
  0% { color: #ff0000; text-shadow: 0 0 10px #ff0000; }
  25% { color: #00ff00; text-shadow: 0 0 10px #00ff00; }
  50% { color: #0000ff; text-shadow: 0 0 10px #0000ff; }
  75% { color: #ffff00; text-shadow: 0 0 10px #ffff00; }
  100% { color: #ff00ff; text-shadow: 0 0 10px #ff00ff; }
}
.marquee-shake {
  animation: marquee-shake 0.2s ease-in-out 2;
}
@keyframes marquee-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
.marquee-teleport {
  animation: marquee-teleport 1.5s ease-in-out forwards;
}
@keyframes marquee-teleport {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
}


/* ========================================
3. TIMECHURCH FONT & FEATURE TOGGLE MENU
======================================== */

/* TimeChurch special font */
.timechurch-font {
  font-family: 'Orbitron', 'Exo 2', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Feature Toggle Menu Styles */
#feature-toggle-menu {
  margin-top: 18px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 12px;
}
.feature-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid #8be9fd;
  background: rgba(30,30,40,0.7);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  outline: none;
}
.feature-toggle-btn:hover, .feature-toggle-btn.active {
  background: #8be9fd;
  color: #222;
  border-color: #ff79c6;
}

/* Sound System Button Special Animation */
.feature-toggle-btn.active#toggle-feature-4 {
  animation: soundButtonPulse 3s ease-in-out infinite;
}

@keyframes soundButtonPulse {
  0%, 100% { 
    box-shadow: 0 0 8px rgba(139, 233, 253, 0.3);
  }
  50% { 
    box-shadow: 0 0 15px rgba(139, 233, 253, 0.6), 0 0 25px rgba(139, 233, 253, 0.3);
  }
}

/* ========================================
   COSMIC SOUND SYSTEM STYLES
======================================== */
.cosmic-sound-panel {
  position: fixed;
  top: 260px;
  right: 20px;
  width: 280px;
  background: linear-gradient(135deg, rgba(30,30,40,0.97), rgba(50,50,70,0.97));
  backdrop-filter: blur(12px);
  border: 2px solid #8be9fd;
  border-radius: 14px;
  padding: 10px;
  z-index: 2100;
  box-shadow: 0 0 24px rgba(139, 233, 253, 0.35), 0 0 40px rgba(139, 233, 253, 0.12);
  transition: opacity 0.3s, transform 0.3s;
  font-family: 'Exo 2', sans-serif;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sound-panel-drag-handle {
  width: 90%;
  height: 30px;
  margin: 10px;
  cursor: move;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  border-bottom: none;
  box-shadow: none;

  font-size: 1.2rem;
  color: #8be9fdcc;
}

.sound-icon {
  font-size: 1.7rem;
  margin-bottom: 2px;
  animation: soundPulse 2s ease-in-out infinite;
}

@keyframes soundPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.sound-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.volume-label {
  font-size: 1.2rem;
  min-width: 20px;
  margin-right: 2px;
}

.cosmic-volume-slider {
  flex: 1 1 70%;
  min-width: 120px;
  max-width: 170px;
  height: 7px;
  border-radius: 4px;
  background: rgba(139, 233, 253, 0.22);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin: 0 6px;
}

.cosmic-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(45deg, #8be9fd, #ff79c6);
  box-shadow: 0 0 10px rgba(139, 233, 253, 0.6);
  cursor: pointer;
  transition: transform 0.2s;
}

.cosmic-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 0 14px rgba(139, 233, 253, 0.85);
}

.cosmic-volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(45deg, #8be9fd, #ff79c6);
  border: none;
  box-shadow: 0 0 10px rgba(139, 233, 253, 0.6);
  cursor: pointer;
}

.volume-percentage {
  color: #8be9fd;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.sound-toggle-row {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  justify-content: center;
}

.sound-mute-btn, .sound-test-btn {
  flex: 1 1 45%;
  padding: 10px 0;
  border: 1.5px solid #8be9fd;
  border-radius: 7px;
  background: rgba(139, 233, 253, 0.13);
  color: #8be9fd;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(139,233,253,0.07);
  letter-spacing: 0.2px;
}

.sound-mute-btn:hover, .sound-test-btn:hover {
  background: rgba(139, 233, 253, 0.22);
  border-color: #ff79c6;
  color: #ff79c6;
  transform: translateY(-2px) scale(1.04);
}

.sound-mute-btn.muted {
  background: rgba(255, 121, 198, 0.18);
  border-color: #ff79c6;
  color: #ff79c6;
}

/* ===============================
   COSMIC CUSTOMIZATION PANEL
=============================== */
.cosmic-customization-panel {
  position: fixed;
  top: 180px;
  right: 20px;
  width: 320px;
  background: linear-gradient(135deg, rgba(30,30,40,0.97), rgba(50,50,70,0.97));
  backdrop-filter: blur(10px);
  border: 2px solid #ff79c6;
  border-radius: 12px;
  padding: 18px 18px 16px 18px;
  /* Z-INDEX 2000: Customization modal/panel */
  z-index: 2000;
  box-shadow: 0 0 20px rgba(255, 121, 198, 0.25), 0 0 40px rgba(139, 233, 253, 0.08);
  transition: opacity 0.3s, transform 0.3s, left 0.2s, top 0.2s;
  font-family: 'Exo 2', sans-serif;
  cursor: default;
  user-select: none;
}
.customization-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #ff79c6;
  font-weight: 600;
  font-size: 1.1rem;
  justify-content: space-between;
}
.customization-icon {
  font-size: 1.4rem;
  animation: soundPulse 2s ease-in-out infinite;
}
.customization-close-btn {
  background: none;
  border: none;
  color: #ff79c6;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.customization-close-btn:hover {
  background: rgba(255, 121, 198, 0.12);
}
.customization-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.slider-row label {
  min-width: 90px;
  color: #8be9fd;
  font-size: 1rem;
}
.cosmic-custom-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 121, 198, 0.18);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.cosmic-custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff79c6, #8be9fd);
  box-shadow: 0 0 8px rgba(255, 121, 198, 0.5);
  cursor: pointer;
  transition: transform 0.2s;
}
.cosmic-custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 121, 198, 0.8);
}
.cosmic-custom-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff79c6, #8be9fd);
  border: none;
  box-shadow: 0 0 8px rgba(255, 121, 198, 0.5);
  cursor: pointer;
}
.slider-row span {
  color: #ff79c6;
  font-weight: 600;
  min-width: 38px;
  text-align: right;
  font-size: 0.95rem;
}
.preset-row {
  display: flex;
  width: 100%;
  overflow-y: hidden;
  overflow-x: scroll;
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  gap: 12px;
  margin-bottom: 2px;
}
.preset-btn {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #8be9fd;
  border-radius: 6px;
  background: rgba(139, 233, 253, 0.08);
  color: #8be9fd;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.preset-btn:hover {
  background: rgba(255, 121, 198, 0.18);
  border-color: #ff79c6;
  color: #ff79c6;
}
.action-row {
  display: flex;
  gap: 8px;
}
.reset-btn, .random-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ff79c6;
  border-radius: 6px;
  background: rgba(255, 121, 198, 0.08);
  color: #ff79c6;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.reset-btn:hover, .random-btn:hover {
  background: rgba(139, 233, 253, 0.18);
  border-color: #8be9fd;
  color: #8be9fd;
}