/* ===== NECRONOMICA - MODERN CREATIVE ARTS WEBSITE ===== */

/* CSS Custom Properties for consistent theming */
:root {
  --primary-bg: #0a0015;
  --secondary-bg: #1a0b2e;
  --tertiary-bg: #2d1b43;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-pink: #ec4899;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-accent: #c8b6ff;
  --border-subtle: rgba(139, 92, 246, 0.2);
  --border-strong: rgba(139, 92, 246, 0.4);
  --glass-bg: rgba(26, 11, 46, 0.6);
  --glass-border: rgba(200, 182, 255, 0.1);
  --shadow-soft: 0 4px 20px rgba(139, 92, 246, 0.1);
  --shadow-strong: 0 8px 40px rgba(139, 92, 246, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  --gradient-secondary: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  --font-mono: 'Space Mono', 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', 'SF Pro Display', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Enhanced background with animated gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
  z-index: -2;
  animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Improved typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--text-accent);
  margin-bottom: 1rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ===== PORTAL SCREEN STYLES ===== */
#portal {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  background: 
    radial-gradient(circle at center, var(--primary-bg) 0%, #000 100%);
  transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#portal.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

#blackholeCanvas {
  position: absolute;
  inset: 0;
  cursor: pointer;
  transition: filter 0.3s ease;
}

#blackholeCanvas:hover {
  filter: brightness(1.1) contrast(1.05);
}

#portal-message {
  position: relative;
  z-index: 1001;
  color: var(--text-primary);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-family: var(--font-mono);
  margin-top: 50vh;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  opacity: 0;
  animation: portalMessageFade 3s ease-in-out 2s forwards;
}

@keyframes portalMessageFade {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 0.9; transform: translateY(0); }
}

/* ===== MAIN LAYOUT ===== */
#main-content {
  display: flex;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-content.visible {
  opacity: 1;
}

/* ===== SIDEBAR STYLES ===== */
#sidebar {
  width: 80px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  z-index: 100;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#sidebar:hover {
  width: 240px;
  background: rgba(26, 11, 46, 0.8);
}

#sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

#sidebar:hover::before {
  opacity: 0.05;
}

.menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1.2rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 12px 12px 0;
  margin: 0.25rem 0;
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

.menu-item:hover::before,
.menu-item.active::before {
  height: 60%;
}

.menu-item i {
  font-size: 1.4rem;
  min-width: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.menu-item span {
  margin-left: 1rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar:hover .menu-item span {
  opacity: 1;
  transform: translateX(0);
}

.menu-item:hover,
.menu-item.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
  transform: translateX(4px);
}

.menu-item:hover i,
.menu-item.active i {
  color: var(--accent-purple);
  transform: scale(1.1);
}

/* ===== CONTENT AREA ===== */
#content-area {
  flex: 1;
  margin-left: 80px;
  padding: 3rem;
  position: relative;
  overflow-y: auto;
  height: 100vh;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
#content-area::-webkit-scrollbar {
  width: 8px;
}

#content-area::-webkit-scrollbar-track {
  background: var(--secondary-bg);
}

#content-area::-webkit-scrollbar-thumb {
  background: var(--accent-purple);
  border-radius: 4px;
}

#content-area::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue);
}

/* ===== CANVAS CONTAINER ===== */
#canvas-container {
  z-index: -1; /* Keep behind content */
}

#sigilCanvas,
#hydraCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.4; /* Adjust opacity as needed */
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Ensure content stays above canvases */
#content-area {
  position: relative;
  z-index: 1;
}
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Prevent interaction */
}
#canvas-container canvas {
  width: 100%;
  height: 100%;
  pointer-events: none; /* Prevent interaction */
  mix-blend-mode: screen; /* Blend with background */
  opacity: 0.5; /* Adjust opacity as needed */
  transition: opacity 0.3s ease; /* Smooth transition */
}
#canvas-container canvas:hover {
  opacity: 0.8; /* Increase opacity on hover */
  cursor: pointer; /* Change cursor on hover */
}
#canvas-container canvas:active {
  opacity: 1; /* Full opacity on click */
  transform: scale(1.05); /* Slightly enlarge on click */
  transition: transform 0.1s ease; /* Quick transition */
}
#canvas-container canvas:active {
  transform: scale(1); /* Reset scale on release */
  transition: transform 0.1s ease; /* Quick transition */
}
#canvas-container canvas:active {
  opacity: 0.5; /* Reset opacity on release */
  transform: scale(1); /* Reset scale on release */
  transition: transform 0.1s ease; /* Quick transition */
}
#canvas-container canvas:hover {
  opacity: 0.8; /* Increase opacity on hover */
  cursor: pointer; /* Change cursor on hover */
  transition: opacity 0.3s ease; /* Smooth transition */
  transform: scale(1.05); /* Slightly enlarge on hover */
  transition: transform 0.3s ease; /* Smooth transition */
}
    /* Base Styles */
    body, html {
      margin: 0;
      padding: 0;
      font-family: 'Space Mono', monospace;
      color: #c8b6ff;
      background-color: #07001d;
      height: 100%;
      overflow-x: hidden;
    }
    
    /* Portal Screen */
    #portal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      background-color: #07001d;
      transition: opacity 1s ease-in-out;
    }
    
    #portal.hidden {
      opacity: 0;
      pointer-events: none;
    }
    
    #blackholeCanvas {
      position: absolute;
      width: 100%;
      height: 100%;
      cursor: pointer;
    }
    
    #portal-message {
      position: relative;
      z-index: 1001;
      color: #ffffff;
      font-size: 1.5rem;
      margin-top: 60vh;
      text-shadow: 0 0 10px rgba(200, 182, 255, 0.8);
      opacity: 0.8;
      animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
      0% { opacity: 0.5; }
      50% { opacity: 1; }
      100% { opacity: 0.5; }
    }
    
    /* Main Content */
    #main-content {
      position: relative;
      display: flex;
      height: 100vh;
      width: 100%;
      opacity: 0;
      transition: opacity 1s ease-in-out;
    }
    
    #main-content.visible {
      opacity: 1;
    }
    
    /* Sidebar */
    #sidebar {
      width: 80px;
      height: 100vh;
      background-color: rgba(20, 10, 40, 0.8);
      position: fixed;
      top: 0;
      left: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding-top: 2rem;
      transition: width 0.3s;
      z-index: 100;
      backdrop-filter: blur(5px);
    }
    
    #sidebar:hover {
      width: 200px;
    }
    
    .menu-item {
      display: flex;
      align-items: center;
      width: 100%;
      padding: 1rem;
      color: #c8b6ff;
      text-decoration: none;
      transition: background-color 0.3s;
      overflow: hidden;
    }
    
    .menu-item i {
      font-size: 1.5rem;
      min-width: 2rem;
      text-align: center;
    }
    
    .menu-item span {
      margin-left: 1rem;
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.3s;
    }
    
    #sidebar:hover .menu-item span {
      opacity: 1;
    }
    
    .menu-item:hover, .menu-item.active {
      background-color: rgba(200, 182, 255, 0.2);
    }
    
    /* Content Area */
    #content-area {
      flex: 1;
      margin-left: 80px;
      padding: 2rem;
      position: relative;
      overflow-y: auto;
      height: 100vh;
      box-sizing: border-box;
    }
    
    /* Canvas Container */
    #canvas-container {
      position: fixed;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: -1;
    }
    
    #sigilCanvas {
      width: 100%;
      height: 100%;
    }
    
    /* Section Styles */
    .section {
      display: none;
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .section.active-section {
      display: block;
    }
    
    h1 {
      font-size: 3rem;
      margin-bottom: 2rem;
      text-shadow: 0 0 10px rgba(200, 182, 255, 0.8);
    }
    
    h2 {
      font-size: 1.8rem;
      margin-top: 0;
    }
    
    /* Card Styles */
    .card {
      background-color: rgba(20, 10, 40, 0.7);
      border: 1px solid rgba(200, 182, 255, 0.3);
      padding: 2rem;
      border-radius: 5px;
      margin-bottom: 2rem;
      backdrop-filter: blur(10px);
    }
    
    /* Gallery Grid */
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 2rem;
    }
    
    .gallery-item {
      height: 250px;
      background-color: rgba(20, 10, 40, 0.5);
      border: 1px solid rgba(200, 182, 255, 0.3);
      position: relative;
      overflow: hidden;
      border-radius: 5px;
      cursor: pointer;
      transition: transform 0.3s;
    }
    
    .gallery-item:nth-child(1) {
      background: linear-gradient(45deg, #1a0b2e, #301934);
    }
    
    .gallery-item:nth-child(2) {
      background: linear-gradient(45deg, #0b1a2e, #341930);
    }
    
    .gallery-item:nth-child(3) {
      background: linear-gradient(45deg, #2e0b1a, #193034);
    }
    
    .gallery-item:hover {
      transform: scale(1.03);
    }
    
    .gallery-item .overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 1rem;
      background-color: rgba(10, 5, 20, 0.8);
      color: #c8b6ff;
    }
    
    /* Audio Controls */
    #audio-controls {
      position: fixed;
      bottom: 0;
      left: 80px;
      right: 0;
      height: 60px;
      background-color: rgba(10, 5, 20, 0.8);
      display: flex;
      align-items: center;
      padding: 0 2rem;
      backdrop-filter: blur(10px);
      z-index: 90;
    }
    
    .control-button {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: rgba(200, 182, 255, 0.2);
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      margin-right: 1rem;
      transition: background-color 0.3s;
    }
    
    .control-button:hover {
      background-color: rgba(200, 182, 255, 0.4);
    }
    
    #volume-slider {
      flex: 1;
      margin: 0 1rem;
      max-width: 200px;
      -webkit-appearance: none;
      height: 5px;
      background: rgba(200, 182, 255, 0.3);
      border-radius: 5px;
    }
    
    #volume-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      background: #c8b6ff;
      cursor: pointer;
    }
    
    /* Generative Canvas */
    #generativeCanvas {
      width: 100%;
      height: 400px;
      border-radius: 5px;
      cursor: pointer;
    }
    
    .visualizer-controls {
      margin-top: 2rem;
      display: flex;
      gap: 1rem;
    }
    
    .visualizer-controls button {
      background-color: rgba(200, 182, 255, 0.2);
      border: 1px solid rgba(200, 182, 255, 0.5);
      color: #c8b6ff;
      padding: 0.5rem 1rem;
      border-radius: 3px;
      cursor: pointer;
      transition: background-color 0.3s;
    }
    
    .visualizer-controls button:hover {
      background-color: rgba(200, 182, 255, 0.4);
    }
  </style>

/* ===== SECTION STYLES ===== */
.section {
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: sectionReveal 0.8s ease-out forwards;
}

.section.active-section {
  display: block;
}

@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CARD STYLES ===== */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.6;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--border-strong);
}

/* Enhanced cards with different accents */
.card:nth-child(odd) {
  border-left: 2px solid var(--accent-purple);
}

.card:nth-child(even) {
  border-left: 2px solid var(--accent-blue);
}

/* ===== GALLERY STYLES ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  height: 280px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 0.1;
}

.gallery-item:nth-child(1) {
  background: 
    linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1)),
    var(--secondary-bg);
}

.gallery-item:nth-child(2) {
  background: 
    linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(236, 72, 153, 0.1)),
    var(--secondary-bg);
}

.gallery-item:nth-child(3) {
  background: 
    linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.1)),
    var(--secondary-bg);
}

.gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-strong);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(10, 0, 21, 0.9));
  color: var(--text-primary);
  font-weight: 600;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
  opacity: 1;
}

/* ===== AUDIO CONTROLS ===== */
#audio-controls {
  position: fixed;
  bottom: 0;
  left: 80px;
  right: 0;
  height: 80px;
  background: rgba(10, 0, 21, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 3rem;
  z-index: 90;
  gap: 1.5rem;
}

.control-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

.control-button:hover {
  background: var(--accent-purple);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.control-button:active {
  transform: scale(0.95);
}

#volume-slider {
  flex: 1;
  max-width: 200px;
  height: 6px;
  background: var(--secondary-bg);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

#volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-blue);
}

#volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  border: none;
}

/* ===== GENERATIVE CANVAS ===== */
#generativeCanvas {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--secondary-bg);
}

#generativeCanvas:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}

/* ===== VISUALIZER CONTROLS ===== */
.visualizer-controls {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.visualizer-controls button {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.visualizer-controls button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.3s ease;
  z-index: -1;
}

.visualizer-controls button:hover::before {
  left: 0;
}

.visualizer-controls button:hover {
  color: white;
  border-color: var(--accent-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.visualizer-controls button:active {
  transform: translateY(0);
}

/* ===== INTERACTIVE ELEMENTS ===== */
.interactive-element {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  animation: interactiveFloat 1.5s ease-out forwards;
}

@keyframes interactiveFloat {
  0% {
    opacity: 0.7;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  #content-area {
    padding: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    bottom: 0;
    top: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 1rem 0;
    z-index: 200;
  }
  
  #sidebar:hover {
    width: 100%;
  }
  
  .menu-item {
    flex-direction: column;
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0;
    text-align: center;
  }
  
  .menu-item span {
    margin-left: 0;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    opacity: 1;
    transform: none;
  }
  
  .menu-item i {
    font-size: 1.2rem;
    min-width: auto;
  }
  
  #content-area {
    margin-left: 0;
    margin-bottom: 80px;
    padding: 1.5rem;
  }
  
  #audio-controls {
    left: 0;
    padding: 0 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  h1 {
    font-size: 2.5rem;
    text-align: center;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .visualizer-controls {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #content-area {
    padding: 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  #portal-message {
    font-size: 1.2rem;
    text-align: center;
    padding: 0 1rem;
  }
  
  .visualizer-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

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

/* Focus styles for keyboard navigation */
.menu-item:focus,
.control-button:focus,
.visualizer-controls button:focus {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --border-subtle: rgba(255, 255, 255, 0.3);
    --border-strong: rgba(255, 255, 255, 0.6);
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  #sidebar,
  #audio-controls,
  #canvas-container,
  .visualizer-controls {
    display: none !important;
  }
  
  #content-area {
    margin-left: 0;
    margin-bottom: 0;
  }
  
  .card {
    break-inside: avoid;
    border: 1px solid #333;
    background: white;
    color: black;
  }
}
/* Add to style.css */
.generative-card {
  position: relative;
  height: 600px;
  background: var(--tertiary-bg);
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.generative-card canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.card-header {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to bottom, 
    rgba(10, 0, 21, 0.9) 0%,
    transparent 100%
  );
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.regenerate-btn {
  background: var(--accent-purple);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.regenerate-btn:hover {
  transform: rotate(180deg);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, 
    rgba(10, 0, 21, 0.9) 20%,
    transparent 100%
  );
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.generative-card:hover .card-overlay {
  transform: translateY(0);
}

#journal-input {
  width: 100%;
  height: 150px;
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  resize: vertical;
}

#save-entry {
  background: var(--accent-purple);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#save-entry:hover {
  background: var(--accent-blue);
}

#journal-entries {
  list-style: none;
  padding-left: 0;
  line-height: 1.6;
}

#journal-entries li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
#journal-entries li::before {
  content: '• ';
  color: var(--accent-purple);
}