@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --primary: #00ff99;
  --primary-rgb: 0, 255, 153;
  --secondary: #6366f1;
  --secondary-rgb: 99, 102, 241;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-heavy: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.15);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(var(--primary-rgb), 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Themes */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(var(--secondary-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(var(--primary-rgb), 0.03) 0%, transparent 70%);
  transition: var(--transition);
}

body.theme-animated .bg-gradient {
  animation: bgShift 15s ease-in-out infinite;
}

body.theme-dark .bg-gradient {
  background: var(--bg-dark);
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-btn:hover {
  background: var(--bg-glass-heavy);
  border-color: var(--border-light);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.header-btn--primary {
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
  color: var(--bg-dark);
  border-color: transparent;
  font-weight: 600;
}

.header-btn--primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Main */
.main {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.hero__badge {
  padding: 0.5rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.action-btn:hover {
  background: var(--bg-glass-heavy);
  border-color: var(--border-light);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.action-btn svg {
  stroke: var(--primary);
}

/* ZigZag Container */
.zigzag__container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 2rem;
  min-height: 200px;
  align-items: center;
}

.zigzag__item {
  position: relative;
  width: 90px;
  height: 90px;
  transform: rotate(315deg);
  overflow: hidden;
  opacity: 0;
  animation: fadeInItem 0.6s ease-out forwards;
  transition: var(--transition);
}

.zigzag__space {
  width: 50px;
  height: 90px;
  transform: rotate(315deg);
  opacity: 0;
  animation: fadeInItem 0.6s ease-out forwards;
}

.zigzag__item span {
  position: absolute;
  inset: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.zigzag__item span:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.2);
}

.zigzag__item span b {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  transform: rotate(45deg);
  text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
  transition: var(--transition);
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(315deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(315deg) scale(1);
  }
}

/* Effects */
.effect-pulse .zigzag__item span {
  animation: pulse 2s infinite ease-in-out;
}

.effect-shake .zigzag__item span {
  animation: shake 0.5s infinite;
}

.effect-flip .zigzag__item span {
  animation: flip 2s infinite linear;
}

.effect-glow .zigzag__item span b {
  animation: glow 2s infinite ease-in-out;
}

.effect-wave .zigzag__item {
  animation: wave 1.5s infinite ease-in-out;
}

.effect-bounce .zigzag__item span {
  animation: bounce 0.6s infinite alternate;
}

.effect-float .zigzag__item {
  animation: float 3s infinite ease-in-out;
}

.effect-neon .zigzag__item span {
  border-color: var(--primary);
  box-shadow: 
    0 0 10px rgba(var(--primary-rgb), 0.5),
    inset 0 0 10px rgba(var(--primary-rgb), 0.1);
  animation: neonPulse 1.5s infinite alternate;
}

.effect-neon .zigzag__item span b {
  animation: neonGlow 1.5s infinite alternate;
}

.effect-matrix .zigzag__item span {
  background: rgba(0, 255, 153, 0.05);
  border-color: rgba(0, 255, 153, 0.3);
  animation: matrixFlicker 0.1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-1deg); }
  75% { transform: translateX(4px) rotate(1deg); }
}

@keyframes flip {
  0% { transform: perspective(400px) rotateY(0); }
  100% { transform: perspective(400px) rotateY(360deg); }
}

@keyframes glow {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.8), 0 0 20px rgba(var(--primary-rgb), 0.5);
    color: var(--primary);
  }
  50% { 
    text-shadow: 0 0 20px rgba(var(--secondary-rgb), 0.8), 0 0 40px rgba(var(--secondary-rgb), 0.5);
    color: var(--secondary);
  }
}

@keyframes wave {
   0%, 100% { transform: rotate(315deg) translateY(0); opacity: 1; }
   50% { transform: rotate(315deg) translateY(-10px); opacity: 1; }
}

@keyframes bounce {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.05) translateY(-5px); }
}

@keyframes float {
   0%, 100% { transform: rotate(315deg) translateY(0) rotateZ(0deg); opacity: 1; }
   33% { transform: rotate(315deg) translateY(-8px) rotateZ(2deg); opacity: 1; }
   66% { transform: rotate(315deg) translateY(4px) rotateZ(-1deg); opacity: 1; }
}

@keyframes neonPulse {
  0% { 
    box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.4), inset 0 0 5px rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
  }
  100% { 
    box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.8), 0 0 50px rgba(var(--primary-rgb), 0.4), 0 0 80px rgba(var(--primary-rgb), 0.2), inset 0 0 20px rgba(var(--primary-rgb), 0.15);
    border-color: var(--secondary);
  }
}

@keyframes neonGlow {
  0% { 
    text-shadow: 0 0 5px rgba(var(--primary-rgb), 0.8), 0 0 15px rgba(var(--primary-rgb), 0.6);
    color: var(--primary);
  }
  100% { 
    text-shadow: 0 0 15px rgba(var(--secondary-rgb), 1), 0 0 30px rgba(var(--secondary-rgb), 0.9), 0 0 45px rgba(var(--secondary-rgb), 0.7);
    color: var(--secondary);
  }
}

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

/* Controls */
.controls {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

#name-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-main);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#name-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

#name-input::placeholder {
  color: var(--text-muted);
}

.char-count {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
  color: var(--bg-dark);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn--primary:active {
  transform: translateY(0);
}

.icon-btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.icon-btn-small:hover {
  background: var(--bg-glass-heavy);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Effects Panel */
.effects-panel,
.customization-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.effect-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.effect-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  min-width: 70px;
  text-align: center;
}

.effects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

.effect-chip {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-transform: capitalize;
}

.effect-chip:hover {
  background: var(--bg-glass-heavy);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.effect-chip.active {
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
  color: var(--bg-dark);
  border-color: transparent;
  font-weight: 600;
}

/* Customization Panel */
.customization-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.custom-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.custom-item label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-item input[type="color"] {
  width: 100%;
  height: 40px;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  cursor: pointer;
  transition: var(--transition);
}

.custom-item input[type="color"]:hover {
  border-color: var(--border-light);
}

.custom-item select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.custom-item select option {
  background: #1a1a2e;
  color: #ffffff;
}

.custom-item select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Chatbot */
.chatbot-window {
  position: fixed;
  top: 100px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 520px;
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 150;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--primary-rgb), 0.1);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1);
}

.chatbot-window.hidden {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  pointer-events: none;
}

.chatbot-header {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  cursor: grab;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}

.chatbot-header:active {
  cursor: grabbing;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-dark);
}

.chatbot-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chatbot-status {
  font-size: 0.75rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chatbot-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chatbot-controls {
  display: flex;
  gap: 0.5rem;
}

.chatbot-body {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.welcome-message {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.msg-time {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.message {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  word-wrap: break-word;
  animation: messageIn 0.3s ease-out;
  position: relative;
}

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

.bot-message {
  background: rgba(var(--primary-rgb), 0.1);
  align-self: flex-start;
  border-top-left-radius: 4px;
  border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.bot-message p {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.user-message {
  background: rgba(var(--secondary-rgb), 0.15);
  align-self: flex-end;
  border-top-right-radius: 4px;
  border: 1px solid rgba(var(--secondary-rgb), 0.2);
}

.user-message p {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.message-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-align: right;
}

.message.loading {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chatbot-input-area {
  display: flex;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 var(--radius) var(--radius);
}

#chatbot-input {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: var(--transition);
}

#chatbot-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

#chatbot-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-dark);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  opacity: 1;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background: rgba(15, 15, 25, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.modal-overlay.hidden .modal {
  transform: scale(0.95);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-body {
  overflow-y: auto;
  padding-right: 0.5rem;
}

.changelog-entry {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.changelog-entry:hover {
  border-color: var(--border-light);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.changelog-entry h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.entry-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.entry-author {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.changelog-entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.changelog-entry li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.changelog-entry li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Side Panels */
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: rgba(15, 15, 25, 0.98);
  border-left: 1px solid var(--border);
  z-index: 180;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  box-shadow: var(--shadow);
}

.side-panel.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.side-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.side-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.history-item:hover {
  border-color: var(--border-light);
  background: var(--bg-glass-heavy);
}

.history-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.9rem;
}

.settings-group {
  margin-bottom: 2rem;
}

.settings-group h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.setting-item label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.setting-item input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 0.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-glass);
  cursor: pointer;
}

.setting-item select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-main);
  cursor: pointer;
  appearance: none;
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.setting-item select option {
  background: #1a1a2e;
  color: #ffffff;
}

.btn--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  width: 100%;
  margin-bottom: 0.75rem;
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn--secondary {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  width: 100%;
}

.btn--secondary:hover {
  background: var(--bg-glass-heavy);
  color: var(--text-primary);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 300;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.hidden {
  transform: translateX(-50%) translateY(100px);
}

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

.toast::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
}

/* Footer */
.footer {
  position: relative;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__credits {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__credits strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: var(--transition);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.social-links a:hover {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.1);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 0.75rem 1rem;
  }

  .header-btn span {
    display: none;
  }

  .header-btn {
    padding: 0.6rem;
  }

  .main {
    padding: 6rem 1rem 2rem;
  }

  .zigzag__item {
    width: 70px;
    height: 70px;
  }

  .zigzag__item span b {
    font-size: 1.75rem;
  }

  .zigzag__container {
    gap: 0.75rem;
    padding: 1rem;
  }

  .input-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .effects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .customization-grid {
    grid-template-columns: 1fr;
  }

  .chatbot-window {
    right: 10px;
    width: calc(100vw - 20px);
    max-width: none;
    height: 60vh;
    top: auto;
    bottom: 20px;
  }

  .side-panel {
    width: 100vw;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
  }

  .hero__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .zigzag__item {
    width: 60px;
    height: 60px;
  }

  .zigzag__item span b {
    font-size: 1.5rem;
  }

  .zigzag__container {
    gap: 0.5rem;
  }

  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* Animation speed modifiers */
.speed-slow .zigzag__item,
.speed-slow .zigzag__space {
  animation-duration: 1.2s !important;
}

.speed-fast .zigzag__item,
.speed-fast .zigzag__space {
  animation-duration: 0.3s !important;
}

.speed-slow .zigzag__item span {
  animation-duration: 3s !important;
}

.speed-fast .zigzag__item span {
  animation-duration: 0.5s !important;
}

/* Font size modifiers */
.font-small .zigzag__item span b {
  font-size: 1.5rem;
}

.font-large .zigzag__item span b {
  font-size: 2.75rem;
}

/* Glass intensity modifiers */
.glass-light .zigzag__item span,
.glass-light .chatbot-window,
.glass-light .effects-panel,
.glass-light .customization-panel {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

.glass-heavy .zigzag__item span,
.glass-heavy .chatbot-window,
.glass-heavy .effects-panel,
.glass-heavy .customization-panel {
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Selection */
::selection {
  background: rgba(var(--primary-rgb), 0.3);
  color: var(--text-primary);
}
