/* ===== CSS Variables ===== */
:root {
  --bg-primary: #050508;
  --bg-secondary: #0a0a12;
  --bg-card: rgba(15, 15, 25, 0.7);
  --bg-card-hover: rgba(25, 25, 45, 0.8);
  
  --accent-pink: #ff007a;
  --accent-purple: #7000ff;
  --accent-cyan: #00f2ff;
  --accent-orange: #ff5c00;
  --accent-green: #00ff66;
  --accent-yellow: #f0ff00;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-hover: rgba(255, 255, 255, 0.2);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, #101020 0%, #050508 100%);
}

/* ===== Theme Switcher ===== */
.theme-switcher {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 50;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
  transform: translateY(-2px);
}

.theme-btn svg {
  width: 20px;
  height: 20px;
}

.hidden {
  display: none !important;
}

/* ===== Light Theme Overrides ===== */
body.light-theme {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-muted: #6b7280;
  
  --border-color: rgba(0, 0, 0, 0.1);
  --border-color-hover: rgba(0, 0, 0, 0.2);
}

body.light-theme #bg-canvas {
  background: radial-gradient(circle at center, #ffffff 0%, #e0e7ff 100%);
}

body.light-theme .main-glass {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

body.light-theme .input-glow-wrapper {
  background: rgba(255, 255, 255, 0.9);
}

body.light-theme .status-pulse {
  background: rgba(255, 255, 255, 0.8);
  color: #1a1a2e;
}

body.light-theme .feature-card {
  background: rgba(255, 255, 255, 0.7);
}

body.light-theme .info-card {
  background: rgba(255, 255, 255, 0.7);
}

body.light-theme .caption-box {
  background: rgba(255, 255, 255, 0.7);
}

body.light-theme .btn-rainbow .btn-content {
  background: #ffffff;
  color: #1a1a2e;
}

body.light-theme .btn-copy {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a2e;
}

/* Synced with lang-btn */

/* ===== Container ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header-float {
  text-align: center;
  margin-bottom: 30px;
  animation: slideDown 0.8s ease;
}

@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.logo-pulse {
  width: 70px;
  height: 70px;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(240, 148, 51, 0.5)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 40px rgba(240, 148, 51, 0.8)); }
}

.logo-pulse svg {
  width: 100%;
  height: 100%;
}

/* Glitch Effect */
.glitch {
  font-size: 2.5rem;
  font-weight: 800;
  position: relative;
  animation: glitchText 3s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch1 2s infinite linear alternate-reverse;
  color: var(--accent-pink);
  z-index: -1;
}

.glitch::after {
  animation: glitch2 3s infinite linear alternate-reverse;
  color: var(--accent-cyan);
  z-index: -2;
}

@keyframes glitchText {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 2px); }
  94% { transform: translate(2px, -2px); }
  96% { transform: translate(-2px, -2px); }
  98% { transform: translate(2px, 2px); }
}

@keyframes glitch1 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 3px); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(3px, -3px); }
  60% { clip-path: inset(60% 0 20% 0); transform: translate(-3px, -3px); }
  80% { clip-path: inset(80% 0 0% 0); transform: translate(3px, 3px); }
}

@keyframes glitch2 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(60% 0 20% 0); transform: translate(3px, -3px); }
  40% { clip-path: inset(40% 0 40% 0); transform: translate(-3px, 3px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(3px, 3px); }
  80% { clip-path: inset(0% 0 80% 0); transform: translate(-3px, -3px); }
}

.subtitle-wave {
  font-size: 1rem;
  color: var(--text-muted);
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ===== Language Switcher ===== */
.language-switcher {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 50;
  animation: none;
  transform: none;
}

@media (max-width: 640px) {
  .language-switcher {
    top: 10px;
    right: 10px;
  }
  
  .theme-switcher {
    top: 10px;
    left: 10px;
  }

  .lang-btn, .theme-btn {
    height: 42px;
    min-width: 42px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .theme-btn {
    width: 42px;
    padding: 0;
  }
  
  .lang-flag {
    font-size: 1.1rem;
  }
  
  .lang-dropdown {
    min-width: 140px;
    right: 0;
    left: auto;
  }

  .btn-magnetic {
    padding: 8px 14px;
    font-size: 0.85rem;
    gap: 4px;
    height: 40px;
  }

  .input-glow-wrapper {
    padding: 4px;
  }

  .input-glow-wrapper input {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lang-btn, .theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  height: 52px; /* Synced height */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  min-width: 52px;
}

.theme-btn {
  width: 52px; /* Square for theme toggle */
  padding: 0;
}

.lang-btn:hover, .theme-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.lang-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.lang-btn.active svg {
  transform: rotate(180deg);
}

.lang-flag {
  font-size: 1.3rem;
}

.lang-text {
  font-weight: 600;
  min-width: 25px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.lang-option:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: translateX(-3px);
}

.lang-option.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ===== Features Menu ===== */
.features-menu {
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.3s both;
}

.menu-title {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 15px;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255, 45, 146, 0.1),
    rgba(139, 92, 246, 0.1),
    rgba(0, 212, 255, 0.1)
  );
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 40px rgba(0, 242, 255, 0.2);
  background: var(--bg-card-hover);
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

.bounce {
  animation: cardBounce 0.6s ease both;
}

@keyframes cardBounce {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.feature-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Main Glass Card ===== */
.main-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: glassAppear 1s ease 0.5s both;
}

@keyframes glassAppear {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===== Input Section ===== */
.input-float {
  animation: slideUp 0.8s ease 0.7s both;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.input-glow-wrapper {
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
}

.input-glow-wrapper:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 
    0 0 30px rgba(0, 242, 255, 0.2),
    inset 0 0 20px rgba(0, 242, 255, 0.05);
}

.input-glow-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.input-glow-wrapper input::placeholder {
  color: var(--text-muted);
}

/* Magnetic Button */
.btn-magnetic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-base);
}

.btn-ripple {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
    rgba(255, 255, 255, 0.4) 0%, 
    transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-magnetic:hover .btn-ripple {
  opacity: 1;
}

.btn-magnetic {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Specific styling for the Get button inside the form to avoid white lines/artifacts */
.input-glow-wrapper .btn-magnetic {
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-clip: padding-box;
}

.btn-magnetic:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 0, 122, 0.4);
}

.btn-magnetic:active {
  transform: scale(0.98);
}

.btn-magnetic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.btn-magnetic:hover::before {
  transform: translateX(100%);
}

/* Advanced Ripple Effect */
.btn-ripple-effect {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
  from { width: 0; height: 0; opacity: 0.5; }
  to { width: 500px; height: 500px; opacity: 0; }
}

/* Smooth Entrance Animations */
.main-glass {
  animation: glassEntrance 1.2s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes glassEntrance {
  0% { transform: translateY(60px) scale(0.9); opacity: 0; filter: blur(10px); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}

.feature-card {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.06) rotateX(10deg) rotateY(10deg);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 20px var(--accent-cyan);
  background: var(--bg-card-hover);
}

/* Floating Animation for result cards */
.result-animate {
  animation: floatResult 3s ease-in-out infinite;
}

@keyframes floatResult {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Input Glow Pulse */
.input-glow-wrapper:focus-within {
  animation: inputPulse 2s infinite;
}

@keyframes inputPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 242, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 242, 255, 0.4); }
}


/* ===== Immersive Download Overlay (Faster & Cleaner) ===== */
.download-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(20px);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dl-cancel-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3001;
}

.dl-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  transform: rotate(90deg);
}

.dl-cancel-btn svg {
  width: 24px;
  height: 24px;
}

.dl-loader {
  width: 150px;
  height: 150px;
  position: relative;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-rings {
  position: absolute;
  inset: 0;
}

.dl-ring {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  animation: dl-ring-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.dl-ring:nth-child(1) { border-top-color: var(--accent-cyan); animation-delay: -0.4s; }
.dl-ring:nth-child(2) { border-top-color: var(--accent-purple); animation-delay: -0.2s; }
.dl-ring:nth-child(3) { border-top-color: var(--accent-pink); }

.dl-pulse-core {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 50%;
  box-shadow: 0 0 30px var(--accent-cyan);
  animation: dl-core-pulse 1s ease-in-out infinite;
}

@keyframes dl-ring-spin {
  to { transform: rotate(360deg); }
}

@keyframes dl-core-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

.dl-text {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--accent-cyan), #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dl-text-shine 2s linear infinite;
  text-align: center;
}

@keyframes dl-text-shine {
  to { background-position: 200% center; }
}

.dl-progress-container {
  width: 280px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-top: 25px;
  overflow: hidden;
  position: relative;
}

.dl-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  border-radius: 10px;
  transform: translateX(-100%);
  animation: dl-fast-progress 1.5s infinite;
}

@keyframes dl-fast-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}



/* ===== Status ===== */
.status-float {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.status-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.9rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.link-type-badge {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: badgePop 0.5s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ===== Loader ===== */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  animation: fadeIn 0.5s ease;
}

.loader-orbit {
  position: relative;
  width: 100px;
  height: 100px;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-pink);
  animation: orbitRotate 2s linear infinite;
}

.orbit-ring.ring-2 {
  inset: 15px;
  border-top-color: var(--accent-purple);
  animation-duration: 2.5s;
  animation-direction: reverse;
}

.orbit-ring.ring-3 {
  inset: 30px;
  border-top-color: var(--accent-cyan);
  animation-duration: 3s;
}

@keyframes orbitRotate {
  to { transform: rotate(360deg); }
}

.loader-text-float {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dots-wave span {
  display: inline-block;
  animation: dotWave 1.4s ease-in-out infinite;
}

.dots-wave span:nth-child(2) { animation-delay: 0.2s; }
.dots-wave span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotWave {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-10px); opacity: 1; }
}

/* ===== Error ===== */
.error-shake {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  animation: shake 0.6s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.error-icon-bounce {
  font-size: 1.5rem;
  animation: iconBounce 1s ease infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===== Profile Card ===== */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  margin-top: 20px;
  position: relative;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.profile-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
  border-radius: calc(var(--radius-xl) + 2px);
  z-index: -1;
  opacity: 0.5;
  filter: blur(10px);
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

.profile-image-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
}

.profile-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
              linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan)) border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-pink);
  border-right-color: var(--accent-purple);
  animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.profile-handle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

/* ===== Media Card ===== */
.media-card {
  margin-top: 20px;
  animation: slideUp 0.5s ease;
}

.video-wrapper-3d {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.video-glow-layer {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0.5;
  filter: blur(15px);
  animation: glowRotate 5s linear infinite;
}

@keyframes glowRotate {
  0% { filter: blur(15px) hue-rotate(0deg); }
  100% { filter: blur(15px) hue-rotate(360deg); }
}

.video-wrapper-3d video {
  width: 100%;
  max-height: 65vh;
  min-height: 300px;
  border-radius: var(--radius-lg);
  display: block;
  object-fit: cover;
}

/* Video poster colorful thin border */
.video-wrapper-3d video[poster] {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
              linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan), var(--accent-green)) border-box;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3), 0 0 30px rgba(255, 45, 146, 0.2);
}

/* Spacing between video and download button */
.btn-rainbow {
  margin-top: 25px;
}

.video-overlay-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.video-wrapper-3d:hover .video-overlay-play {
  opacity: 1;
  pointer-events: auto;
}

.play-btn-3d {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateZ(50px);
  transition: all var(--transition-base);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
  0%, 100% { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 45, 146, 0.4); }
  50% { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 30px rgba(255, 45, 146, 0); }
}

.play-btn-3d:hover {
  transform: translateZ(50px) scale(1.15);
}

.play-btn-3d svg {
  width: 35px;
  height: 35px;
  color: var(--bg-primary);
  margin-right: -4px;
}

.media-info-float {
  text-align: center;
  margin: 20px 0;
}

.media-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.media-author {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.quality-badge {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== Rainbow Download Button ===== */
.btn-rainbow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
}

.rainbow-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    #ff0000, #ff7f00, #ffff00, #00ff00, 
    #0000ff, #4b0082, #9400d3, #ff0000);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: rainbowMove 3s linear infinite;
}

@keyframes rainbowMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.btn-rainbow .btn-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: calc(100% - 4px);
  padding: 14px 30px;
  background: var(--bg-secondary);
  border-radius: calc(var(--radius-lg) - 2px);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-rainbow:hover .btn-content {
  background: rgba(0, 0, 0, 0.8);
}

/* Professional click animation - wave effect */
.btn-rainbow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
    rgba(255, 255, 255, 0.6) 0%, 
    rgba(255, 255, 255, 0.2) 40%, 
    transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.btn-rainbow:active::before {
  opacity: 1;
  transform: scale(2.5);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.btn-rainbow .btn-content {
  transition: transform 0.15s ease, background 0.3s ease;
}

.btn-rainbow:active .btn-content {
  transform: scale(0.98);
}

.btn-rainbow svg {
  width: 22px;
  height: 22px;
}

/* ===== Glow Button ===== */
.btn-glow {
  position: relative;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-base);
  animation: glowButton 3s ease-in-out infinite;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s;
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 45, 146, 0.5);
}

/* Professional click animation for glow button */
.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
    rgba(255, 255, 255, 0.5) 0%, 
    rgba(255, 255, 255, 0.2) 40%, 
    transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.btn-glow:active::before {
  opacity: 1;
  transform: scale(2.5);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.btn-glow:active {
  transform: translateY(-1px) scale(0.98);
  transition: transform 0.15s ease;
}

/* ===== Image Card ===== */
.image-card {
  margin-top: 20px;
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.image-wrapper-3d {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.image-glow {
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: calc(var(--radius-lg) + 3px);
  z-index: -1;
  opacity: 0.5;
  filter: blur(10px);
}

.result-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.image-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.image-author {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ===== Caption Box ===== */
.caption-box {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: slideUp 0.5s ease;
}

.caption-header-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(255, 45, 146, 0.1));
  border-bottom: 1px solid var(--border-color);
}

.caption-icon {
  font-size: 1.2rem;
}

.caption-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.btn-copy svg {
  width: 16px;
  height: 16px;
}

.caption-content {
  padding: 18px;
  max-height: 200px;
  overflow-y: auto;
}

/* ===== Story Badge ===== */
.story-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 25px;
  background: linear-gradient(135deg, rgba(255, 45, 146, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid var(--accent-pink);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  animation: storyPulse 2s ease-in-out infinite;
}

@keyframes storyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 45, 146, 0.4); }
  50% { box-shadow: 0 0 20px 5px rgba(255, 45, 146, 0.2); }
}

.story-icon {
  font-size: 1.5rem;
  animation: cameraFlash 1.5s ease-in-out infinite;
}

@keyframes cameraFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Premium Footer ===== */
.footer-premium {
  margin-top: auto;
  padding: 40px 0 20px;
  width: 100%;
  animation: fadeInUp 1s ease 1s both;
}

.footer-content {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 25px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.brand-text .accent-text {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all var(--transition-base);
}

.footer-link:hover {
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.footer-dot {
  width: 4px;
  height: 4px;
  background: var(--border-color);
  border-radius: 50%;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.copyright-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.copyright-text .highlight {
  color: var(--text-primary);
  font-weight: 600;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 102, 0.05);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 102, 0.2);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: dotPulse 2s infinite;
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .footer-top, .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
  
  .footer-content {
    padding: 20px;
  }
}

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  padding: 30px;
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-card:not(.hidden) {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-base);
}

.modal-close:hover {
  color: var(--accent-pink);
  transform: rotate(90deg);
}

.modal-body {
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal-list {
  list-style: none;
  padding: 0;
}

.modal-list li {
  position: relative;
  padding-right: 25px;
  margin-bottom: 15px;
}

.modal-list li::before {
  content: '✦';
  position: absolute;
  right: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}

.support-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 25px 0;
}

.support-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  text-align: center;
  transition: all var(--transition-base);
}

.support-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-purple);
  transform: translateY(-5px);
}

.support-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

.support-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.support-btn {
  width: 100%;
  display: block;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 640px) {
  .modal-card {
    padding: 20px;
  }
}

.info-section {
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.8s both;
}

.info-title {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 25px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.slide-up {
  animation: slideUp 0.6s ease both;
}

.info-step {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border-radius: 50%;
  font-weight: 700;
  margin: 0 auto 15px;
  animation: stepBounce 2s ease-in-out infinite;
}

@keyframes stepBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tips-box {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 107, 53, 0.1));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.tips-box h4 {
  margin-bottom: 15px;
  color: var(--accent-yellow);
}

.tips-box ul {
  list-style: none;
}

.tips-box li {
  padding: 8px 0;
  padding-right: 25px;
  position: relative;
  color: var(--text-secondary);
}

.tips-box li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--accent-green);
  font-weight: bold;
}

/* ===== Footer ===== */
.footer-float {
  text-align: center;
  margin-top: auto;
  padding: 30px 0;
  color: var(--text-muted);
  animation: fadeIn 1s ease 1s both;
}

.heart-beat {
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ===== Utilities ===== */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  .container {
    padding: 10px;
    max-width: 100%;
  }
  
  .glitch {
    font-size: 1.5rem;
  }
  
  .subtitle-wave {
    font-size: 0.85rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .feature-card {
    padding: 12px 8px;
  }
  
  .feature-icon {
    font-size: 1.3rem;
  }
  
  .feature-name {
    font-size: 0.75rem;
  }
  
  .feature-desc {
    font-size: 0.65rem;
  }
  
  .main-glass {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .input-glow-wrapper {
    flex-direction: column;
    gap: 8px;
  }
  
  .input-glow-wrapper input {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  
  .btn-magnetic {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
  }
  
  .info-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .info-card {
    padding: 15px;
  }
  
  .profile-image-wrapper {
    width: 100px;
    height: 100px;
  }
  
  .video-wrapper-3d video {
    max-height: 50vh;
    min-height: 200px;
  }
  
  .result-img {
    max-height: 40vh;
  }
  
  .caption-box {
    margin-top: 20px;
  }
  
  .caption-content {
    padding: 20px;
    max-height: 250px;
    min-height: 150px;
  }
  
  .caption-text {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .btn-rainbow {
    margin-top: 15px;
  }
  
  .btn-rainbow .btn-content {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .btn-glow {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
  
  .gradient-orb {
    opacity: 0.2;
  }
  
  .orb-1 { width: 150px; height: 150px; }
  .orb-2 { width: 100px; height: 100px; }
  .orb-3 { width: 120px; height: 120px; }
  .orb-4 { width: 80px; height: 80px; }
  .orb-5 { width: 100px; height: 100px; }
  
  .tips-box {
    padding: 15px;
  }
  
  .tips-box li {
    padding: 6px 0;
    padding-right: 20px;
    font-size: 0.85rem;
  }
  
  .story-badge {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .footer-float {
    padding: 20px 0;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 8px;
  }
  
  .glitch {
    font-size: 1.2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  .feature-card {
    padding: 10px 6px;
  }
  
  .feature-icon {
    font-size: 1.1rem;
  }
  
  .feature-name {
    font-size: 0.7rem;
  }
  
  .main-glass {
    padding: 12px;
  }
  
  .video-wrapper-3d video {
    max-height: 45vh;
    min-height: 180px;
  }
}

/* ===== Telegram Floating Button - New Design ===== */
.telegram-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  z-index: 1000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  text-decoration: none;
  background: linear-gradient(135deg, #0088cc, #00a8e6);
  box-shadow: 
    0 10px 30px rgba(0, 136, 204, 0.4),
    0 0 0 4px rgba(0, 136, 204, 0.1);
  animation: telegramFloat 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

/* For LTR (English/Arabic) - position on left */
html[dir="ltr"] .telegram-float {
  right: auto;
  left: 25px;
}

.telegram-float:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 
    0 15px 40px rgba(0, 136, 204, 0.5),
    0 0 0 8px rgba(0, 136, 204, 0.15);
  animation-play-state: paused;
}

.telegram-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  filter: brightness(1.1);
}

/* Ring pulse effect */
.telegram-float::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid #0088cc;
  opacity: 0;
  animation: ringPulse 2s ease-out infinite;
}

.telegram-float::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid #00a8e6;
  opacity: 0;
  animation: ringPulse 2s ease-out infinite 0.5s;
}

/* Floating animation */
@keyframes telegramFloat {
  0%, 100% { 
    transform: translateY(0) rotate(0deg);
    box-shadow: 
      0 10px 30px rgba(0, 136, 204, 0.4),
      0 0 0 4px rgba(0, 136, 204, 0.1);
  }
  25% { 
    transform: translateY(-10px) rotate(2deg);
    box-shadow: 
      0 20px 40px rgba(0, 136, 204, 0.5),
      0 0 0 4px rgba(0, 136, 204, 0.15);
  }
  50% { 
    transform: translateY(-15px) rotate(0deg);
    box-shadow: 
      0 25px 50px rgba(0, 136, 204, 0.6),
      0 0 0 6px rgba(0, 136, 204, 0.2);
  }
  75% { 
    transform: translateY(-5px) rotate(-2deg);
    box-shadow: 
      0 15px 35px rgba(0, 136, 204, 0.45),
      0 0 0 4px rgba(0, 136, 204, 0.1);
  }
}

/* Ring pulse animation */
@keyframes ringPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Click animation */
.telegram-float:active {
  transform: scale(0.95);
  box-shadow: 
    0 5px 20px rgba(0, 136, 204, 0.3),
    0 0 0 12px rgba(0, 136, 204, 0.1);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .telegram-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }
  
  html[dir="ltr"] .telegram-float {
    right: auto;
    left: 20px;
  }
  
  .telegram-icon {
    width: 32px;
    height: 32px;
  }
  
  .telegram-float::before,
  .telegram-float::after {
    inset: -6px;
    border-width: 2px;
  }
}

@media (max-width: 380px) {
  .telegram-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }
  
  html[dir="ltr"] .telegram-float {
    right: auto;
    left: 15px;
  }
  
  .telegram-icon {
    width: 28px;
    height: 28px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-purple), var(--accent-pink));
  border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
  background: var(--accent-pink);
  color: white;
}
