.glass { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.05); }
.glass-panel { background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); }

.editor-container { position: relative; overflow: hidden; height: 100%; width: 100%; }
.code-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    margin: 0 !important; padding: 20px 16px !important;
    border: none; box-sizing: border-box;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    letter-spacing: 0px !important;
    word-spacing: 0px !important;
    font-variant-ligatures: none !important;
    font-feature-settings: "liga" 0, "calt" 0 !important;
    text-rendering: geometricPrecision !important;
    white-space: pre !important;
    overflow: auto !important;
    tab-size: 4 !important;
}
textarea.code-layer { z-index: 10; color: transparent; background: transparent; caret-color: #64ffda; resize: none; outline: none; }
pre.code-layer { z-index: 5; pointer-events: none; background: transparent !important; }
/* Force all syntax tokens to have same font-weight to prevent caret drift */
pre.code-layer *,
pre.code-layer code,
pre.code-layer .token {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    letter-spacing: 0px !important;
    word-spacing: 0px !important;
    font-variant-ligatures: none !important;
    font-feature-settings: "liga" 0, "calt" 0 !important;
    text-rendering: geometricPrecision !important;
    text-shadow: none !important;
}
code[class*="language-"], pre[class*="language-"] {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
    line-height: 24px !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

/* Fix selection font weight - prevent bold tokens from growing when selected */
textarea.code-layer::selection { background: rgba(100, 255, 218, 0.3); color: transparent; }
pre.code-layer *::selection { background: rgba(100, 255, 218, 0.3); font-weight: 400 !important; }

.remote-cursor { position: absolute; width: 2px; height: 24px; z-index: 20; pointer-events: none; will-change: transform; }
.remote-cursor-label { position: absolute; top: -18px; left: 0; padding: 2px 4px; border-radius: 4px; font-size: 10px; font-weight: bold; white-space: nowrap; color: #0a192f; z-index: 21; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a192f; }
::-webkit-scrollbar-thumb { background: rgba(100, 255, 218, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 255, 218, 0.4); }

.ambient-light { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(100, 255, 218, 0.05) 0%, rgba(10, 25, 47, 0) 70%); border-radius: 50%; pointer-events: none; z-index: 0; animation: float 20s infinite ease-in-out; }
@keyframes float { 0% { transform: translate(0, 0); } 50% { transform: translate(100px, 50px); } 100% { transform: translate(0, 0); } }

.cursor-pen { cursor: crosshair; }
.cursor-move { cursor: default; }
.cursor-grabbing { cursor: grabbing; }
.cursor-eraser-obj { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ff5f56" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>') 12 12, auto; }
.cursor-eraser-mask { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%23ffffff" stroke="%230a192f" stroke-width="1"><circle cx="12" cy="12" r="8" fill-opacity="0.5"/></svg>') 12 12, auto; }

.animate-fade-in { animation: fade-in 200ms ease-in-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.animate-fadeIn { animation: fadeIn 150ms ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in-out { animation: fade-in-out 500ms ease-in-out forwards; }
@keyframes fade-in-out {
  0% { opacity: 0; transform: translateY(8px) scale(0.95); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  75% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-4px) scale(0.95); }
}

/* Language Switcher Animations */
.animate-float-in {
  animation: float-in 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes float-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-dropdown-in {
  animation: dropdown-in 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: top center;
}
@keyframes dropdown-in {
  0% { opacity: 0; transform: translateY(-8px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Language option hover effect */
.lang-option-hover {
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-option-hover:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

/* Glass shimmer effect for buttons */
.glass-shimmer {
  position: relative;
  overflow: hidden;
}
.glass-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 255, 218, 0.1),
    transparent
  );
  transition: left 500ms ease;
}
.glass-shimmer:hover::before {
  left: 100%;
}

/* Pulse animation for language indicator */
.lang-pulse {
  animation: lang-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes lang-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

