/* =========================================
   🎨 CORE STYLES (Fixed & Restored)
   ========================================= */
:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --text: #1e293b;
  --muted: #64748b;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --radius: 16px;
  --font: 'Outfit', sans-serif;
}

body.dark {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Outfit', "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex; flex-direction: column; min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* NAVBAR */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 5%; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.05);
}
body.dark .navbar { background: rgba(15, 23, 42, 0.8); border-bottom: 1px solid rgba(255,255,255,0.05); }
.navbar h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.highlight { color: var(--primary); }

/* CONTROLS */
.controls { display: flex; gap: 15px; align-items: center; }
.skin-tone-selector { display: flex; gap: 5px; background: var(--card); padding: 4px; border-radius: 50px; box-shadow: var(--shadow); }
.tone-btn { background: transparent; border: none; cursor: pointer; border-radius: 50%; width: 28px; height: 28px; transition: 0.2s; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.tone-btn:hover, .tone-btn.active { background: rgba(0,0,0,0.1); transform: scale(1.1); }
#theme-toggle { background: var(--card); border: none; font-size: 18px; padding: 8px 12px; border-radius: 12px; cursor: pointer; box-shadow: var(--shadow); }

/* MAIN LAYOUT */
.main-wrapper { max-width: 1200px; margin: 0 auto; padding: 20px; width: 100%; flex: 1; }
.content-box { max-width: 800px; margin: 40px auto; background: var(--card); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* SEARCH */
.search-container { position: relative; margin: 30px 0; }
#search-input { width: 100%; padding: 18px 50px 18px 20px; font-size: 18px; border-radius: var(--radius); border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow); color: var(--text); transition: 0.3s; }
#search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
.search-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

/* CATEGORY FILTERS */
.category-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.category-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 20px; border-radius: 50px; border: 1px solid rgba(0,0,0,0.08);
  background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; font-size: 15px;
  transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.category-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-color: var(--primary); }
.category-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3); }
.cat-icon { font-size: 18px; line-height: 1; }

/* Scrollbar Styles */
#category-filters::-webkit-scrollbar { height: 6px; }
#category-filters::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 10px; }

/* EMOJI GRID */
#emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; margin-top: 20px; }
.emoji-item {
  background: var(--card); border-radius: var(--radius); padding: 15px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  cursor: pointer; box-shadow: var(--shadow); transition: box-shadow 0.2s, border 0.2s;
  position: relative; overflow: hidden; height: 120px;
}
.emoji-item:hover { box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2); border: 2px solid var(--primary); }
.emoji-char { font-size: 42px; line-height: 1.2; }

/* 🔥 RECENTLY COPIED (FIXED: Horizontal & Small) */
#recently-copied-container { margin-bottom: 20px; }
#recently-copied-list { display: flex; flex-wrap: wrap; gap: 10px; } /* Flex Wrap wapas aa gaya */
.recently-copied .emoji-item { 
    width: 50px; height: 50px; padding: 0; justify-content: center; 
    font-size: 24px; min-width: 50px; /* Force square */
}
.recently-copied .download-btn { display: none; } /* Recent me button nahi chahiye */
.recently-copied .emoji-char { font-size: 24px; }

/* BUTTONS */
.download-btn {
  background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px; padding: 6px 0; width: 100%; font-size: 12px; font-weight: 700; cursor: pointer; margin-top: auto;
}
.download-btn:hover { background: var(--primary); color: white; }

/* 🔥 DOCK (FIXED: Position & Layout) */
.floating-dock {
  position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: white; padding: 12px 24px; border-radius: 50px;
  display: flex; gap: 15px; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 9999; min-width: 300px; max-width: 90%;
}
.floating-dock.visible { bottom: 30px; }

.dock-content { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.dock-item { 
    display: inline-flex; align-items: center; 
    background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px; border-radius: 20px; white-space: nowrap; animation: pop 0.2s;
}
.dock-remove { margin-left: 8px; cursor: pointer; color: #ff6b6b; font-weight: bold; }
.dock-actions { display: flex; gap: 10px; }
#dock-copy-btn { background: #6366f1; color: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; white-space: nowrap; }
#dock-clear-btn { background: rgba(255,255,255,0.2); color: white; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* TOAST & FOOTER */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--text); color: var(--bg); padding: 10px 24px; border-radius: 50px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.2); transition: 0.4s; z-index: 2000; }
.toast.show { transform: translateX(-50%) translateY(0); }
@keyframes pop { 50% { transform: scale(1.4); } }

.footer { margin-top: 50px; padding: 30px; text-align: center; border-top: 1px solid rgba(0,0,0,0.05); background: var(--card); color: var(--muted); }
.author-name { color: var(--primary); font-weight: 700; cursor: pointer; }

/* Contact Form Specifics (Agar wahan use ho raha hai) */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text); }
input, textarea { width: 100%; padding: 12px; border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; background: var(--bg); color: var(--text); font-family: inherit; }
.submit-btn { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.back-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background: var(--primary); color: white; text-decoration: none; border-radius: 50px; font-weight: bold; }

/* =========================================
   🚀 FLYING EMOJI ANIMATION (Bahar Nikalne Wala Effect)
   ========================================= */

/* =========================================
   🚀 SUPER POP ANIMATION (Game Style)
   ========================================= */

.floating-emoji {
  position: fixed;
  font-size: 30px; /* Start size */
  pointer-events: none; /* Click through */
  z-index: 10000;
  
  /* Ye magic line hai - Elastic Bounce effect degi */
  animation: superPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  
  text-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Thoda 3D look */
}

@keyframes superPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2.5) rotate(-15deg); /* Ekdum bada hoga (Blast) */
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150px) scale(1) rotate(45deg); /* Upar jaake gayab */
  }
} */

/* Original Card Press Effect */
.emoji-item:active .emoji-char {
  transform: scale(0.8) !important;
  transition: transform 0.1s;
}

/* =========================================
   🌀 PRO-SPIRAL ANIMATION (Saim Special)
   ========================================= */

.spiral-emoji {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  font-size: 35px;
  transition: all 1.2s cubic-bezier(0.42, 0, 0.58, 1);
}

/* Hawa me aada-tedha ghumne wala effect */
@keyframes emojiRotate {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.5); }
  100% { transform: rotate(720deg) scale(0.2); }
}

.rotating {
  animation: emojiRotate 1.2s linear forwards;
}

/* assets/css/style.css */



/* Ghumne wala effect */
@keyframes superSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(1080deg); } /* 3 baar ghumega */
}

.super-spin {
  animation: superSpin 1.2s linear forwards;
}


/* Greet Animation Styles */
.greet-emoji {
  position: fixed;
  font-size: 35px; /* Pehle 50 tha, 35-40 clear lagega */
  z-index: 100000;
  pointer-events: none;
  animation: greetPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes greetPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.5) rotate(10deg); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.greet-fade-out {
  animation: greetFade 0.5s ease forwards;
}

@keyframes greetFade {
  to { transform: translateY(-50px) scale(0.5); opacity: 0; }
}

/* =========================================
   🔥 FIRE BORDER ANIMATION (HI Focus)
   ========================================= */

.greet-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; /* HI ki width ke hisaab se */
  height: 400px; /* HI ki height ke hisaab se */
  z-index: 99998;
  pointer-events: none;
  border-radius: 30px;
  
  /* 🔥 Aag wala Glowing Border Effect */
  border: 4px solid #ff4500;
  box-shadow: 0 0 20px #ff4500, 
              0 0 40px #ff8c00, 
              inset 0 0 20px #ff4500;
              
  animation: firePulse 1.5s ease-in-out infinite alternate;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.greet-container.show {
  opacity: 1;
}

@keyframes firePulse {
  0% { 
    box-shadow: 0 0 20px #ff4500, 0 0 40px #ff8c00;
    border-color: #ff4500;
  }
  100% { 
    box-shadow: 0 0 40px #ff0000, 0 0 80px #ff4500;
    border-color: #ff8c00;
    transform: translate(-50%, -50%) scale(1.05); /* Thoda sa dhadkega */
  }
}
/* =========================================
   🌑 HI GREETING & FOCUS (Cleaned)
   ========================================= */
/* =========================================
   🌑 HI GREETING & FOCUS (Cleaned)
   ========================================= */
/* =========================================
   🚀 GREETING & BLUR (Final Clean)
   ========================================= */

/* Background Blur */
.greet-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 99997;
  opacity: 0;
  transition: all 0.8s ease;
  pointer-events: none;
}
.greet-overlay.show { opacity: 1; }

/* Welcome Text */
.welcome-text {
  position: fixed;
  top: calc(50% + 200px); /* HI ke thoda niche */
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: #ff4500;
  font-size: 34px;
  font-weight: 800;
  z-index: 100001;
  text-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}
.welcome-text.show { transform: translate(-50%, -50%) scale(1); }

/* Greet Emoji Base */
.greet-emoji {
  position: fixed;
  font-size: 38px;
  z-index: 100000;
  pointer-events: none;
  transition: all 0.6s ease;
  animation: greetPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Exit Logic (Scatter ki jagah smooth fade) */
.greet-exit {
  opacity: 0 !important;
  transform: translate(-50%, -80px) scale(0) !important;
  transition: all 0.7s ease !important;
}

@keyframes greetPop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

/* Duplicates Hata Diye Hain, Core Styles Wahi Hain */

/* =========================================
   ✨ EMOJI MOUSE TRAIL (Magic Effect)
   ========================================= */

.trail-emoji {
    position: fixed;
    top: 0; left: 0;
    font-size: 20px;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) translateY(-40px); }
}

/* =========================================
   🃏 3D EMOJI TILT EFFECT (Pro Look)
   ========================================= */

.emoji-grid {
    /* Perspective zaroori hai 3D effect ke liye */
    perspective: 1000px;
}

.emoji-item {
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    transform-style: preserve-3d;
    will-change: transform; /* Performance boost */
}

/* Hover pe thoda shadow badha dete hain */
.emoji-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 10;
}