/* ============================================================
   CROWN CREATIVES — MASTER CSS
   Global layout, gradients, header, footer, ticker, backgrounds
============================================================ */

/* ------------------------------------------------------------
   1. GLOBAL RESET + BASE
------------------------------------------------------------ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  color: white;
  background: black;
}

/* Smooth transitions for theme switching */
body, .day-background, .night-background,
.day-clouds, .night-nebula {
  transition: opacity 1.5s ease, filter 1.5s ease;
}

/* ------------------------------------------------------------
   2. GLOBAL BACKGROUND GRADIENTS
------------------------------------------------------------ */

/* DAY: pink → orange → red */
.day-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 1;
  background: linear-gradient(
    135deg,
    #ff8ad6 0%,
    #ff6f4e 40%,
    #ff2e2e 100%
  );
}

/* NIGHT: blue → purple → black */
.night-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: linear-gradient(
    135deg,
    #1a2cff 0%,
    #6a00ff 40%,
    #000000 100%
  );
}

/* Theme switching */
body.dark-mode .day-background { opacity: 0; }
body.dark-mode .night-background { opacity: 1; }

/* ------------------------------------------------------------
   3. CLOUD / NEBULA OVERLAYS
------------------------------------------------------------ */

.day-clouds,
.night-nebula {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 0.5;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}

/* Optional overlays (you can replace with PNGs or gradients) */
.day-clouds {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 70%);
}

.night-nebula {
  background: radial-gradient(circle at 70% 40%, rgba(255,0,255,0.25), transparent 70%);
  opacity: 0;
}

body.dark-mode .day-clouds { opacity: 0; }
body.dark-mode .night-nebula { opacity: 0.5; }

/* ------------------------------------------------------------
   4. GLOBAL HEADER
------------------------------------------------------------ */

#cc-header {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 20px 0;
}

.cc-header-inner {
  max-width: 1400px;
  margin: auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-logo {
  width: 60px;
  height: auto;
}

.cc-nav {
  display: flex;
  gap: 30px;
}

.cc-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.cc-nav a:hover {
  opacity: 0.7;
}

.cc-toggles {
  display: flex;
  gap: 20px;
}

.theme-toggle,
.sound-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

.theme-toggle img,
.sound-toggle img {
  width: 32px;
  height: 32px;
}

/* ------------------------------------------------------------
   5. PAGE CONTENT WRAPPER
------------------------------------------------------------ */

#cc-page-content {
  position: relative;
  z-index: 5;
  padding-top: 40px;
  padding-bottom: 120px;
  min-height: 60vh;
}

/* ------------------------------------------------------------
   6. GLOBAL TICKER
------------------------------------------------------------ */

#cc-ticker {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 8;
  margin-top: 40px;
}

.cc-ticker-track {
  white-space: nowrap;
  display: inline-block;
  animation: ticker-scroll 20s linear infinite;
  font-size: 1.2rem;
  opacity: 0.8;
}

@keyframes ticker-scroll {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

/* ------------------------------------------------------------
   7. GLOBAL FOOTER
------------------------------------------------------------ */

#cc-footer {
  position: relative;
  z-index: 10;
  padding: 40px 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}

.cc-footer-inner {
  max-width: 1400px;
  margin: auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-footer-text {
  font-size: 0.9rem;
  opacity: 0.8;
}

.cc-footer-icons {
  display: flex;
  gap: 20px;
}

.footer-icon {
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.footer-icon:hover {
  opacity: 0.6;
}

/* Back to top */
.cc-back-to-top {
  background: none;
  border: none;
  cursor: pointer;
}

/* ------------------------------------------------------------
   8. RESPONSIVE
------------------------------------------------------------ */

@media (max-width: 900px) {
  .cc-header-inner {
    flex-direction: column;
    gap: 20px;
  }

  .cc-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  #cc-page-content {
    padding: 20px;
  }
}
/* ============================================================
   HEADER — TRANSPARENT + GLOWING (LEGACY STYLE TRANSPOSED)
   ============================================================ */

/* Transparent header */
#cc-header {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Inner layout (centred brand block) */
.cc-header-inner {
  justify-content: center;
  background: transparent !important;
}

/* Glowing white text for magical backgrounds */
#cc-header *,
.cc-nav a {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255,255,255,0.9);
  font-weight: 600;
  font-family: 'Cinzel Decorative', serif;
}

/* Navigation links */
.cc-nav {
  display: flex;
  gap: 28px;
}

.cc-nav a {
  text-decoration: none;
  font-size: 17px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

body.dark-mode .cc-nav a {
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* ============================================================
   THEME TOGGLE — SUN/MOON (UPDATED FOR NEW STRUCTURE)
   ============================================================ */

.cc-toggles {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 20px;
}

.theme-toggle {
  width: 64px;
  height: 64px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cc-theme-icon {
  width: 64px;
  height: 64px;
  transition: transform 0.35s ease, filter 0.6s ease, opacity 0.6s ease;
  filter: drop-shadow(0 0 14px rgba(255,255,255,0.85));
}

/* Hover pulse */
.theme-toggle:hover .cc-theme-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 0 22px rgba(255,255,255,1));
}

/* Night mode glow */
body.dark-mode .cc-theme-icon {
  filter: drop-shadow(0 0 22px rgba(180,120,255,1));
}
/* ============================================================
   HEADER ICONS — TRANSPARENT + GLOW
   ============================================================ */

.cc-header-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.85));
  transition: transform 0.3s ease, filter 0.4s ease;
}

.cc-header-icon:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 0 18px rgba(255,255,255,1));
}

/* Night mode glow */
body.dark-mode .cc-header-icon {
  filter: drop-shadow(0 0 18px rgba(180,120,255,1));
}
