/* 
由www.emojiku.cn出品，当前版本v20260501
海东工作室
作者QQ：200886866，微信：yaohaidong
*/
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #a855f7 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --text-primary: #333;
  --text-secondary: #666;
  --search-bg: #f8f9fa;
  --emoji-card-bg: #f8f9fa;
  --emoji-card-hover: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

body.dark-mode {
  --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --card-bg: rgba(30, 30, 30, 0.95);
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --search-bg: #2a2a2a;
  --emoji-card-bg: #2a2a2a;
  --emoji-card-hover: #3a3a3a;
}

.header {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box { flex: 1; max-width: 500px; position: relative; }

.search-box input {
  width: 100%;
  padding: 14px 22px 14px 50px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  background: var(--search-bg);
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
  background: var(--emoji-card-hover);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.emoji-count {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 10px 20px;
  background: var(--search-bg);
  border-radius: 20px;
  font-weight: 600;
}

.dark-toggle {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dark-toggle:hover { transform: translateY(-2px); }

.category-dropdown {
  position: relative;
}

.category-select {
  padding: 10px 40px 10px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  border: 2px solid transparent;
  border-radius: 20px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  appearance: none;
  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='%23666' 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 14px center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-select:hover {
  background: linear-gradient(135deg, #fff 0%, #f0f4f8 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.category-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-mode .category-select {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #e2e8f0;
  border-color: #4a5568;
}

body.dark-mode .category-select:hover {
  background: linear-gradient(135deg, #3d4a5c 0%, #2d3748 100%);
}

body.dark-mode .category-select option {
  background: #1a202c;
  color: #e2e8f0;
}

.main-content { padding: 32px 0; }

.categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  justify-content: center;
  padding: 18px;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.category-btn {
  padding: 10px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 22px;
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.category-btn:hover, .category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 3px 14px rgba(102,126,234,0.4);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
  padding: 32px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.emoji-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  background: var(--emoji-card-bg);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  min-width: 0;
}

.emoji-card:hover {
  background: var(--emoji-card-hover);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.emoji-symbol {
  font-size: 72px;
  line-height: 1.2;
  margin-bottom: 12px;
  word-break: normal;
  word-wrap: normal;
  display: inline-block;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", EmojiSymbols, sans-serif;
}

.emoji-name {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.emoji-card.copied {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: pulse 0.5s ease;
}

.emoji-card.copied .emoji-name { color: #fff; }

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

.toast {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(102,126,234,0.4);
}

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

.footer {
  text-align: center;
  padding: 28px;
  background: var(--card-bg);
  margin-top: 36px;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
}

.footer p {
  color: var(--text-secondary);
  margin: 6px 0;
  font-size: 14px;
}

.footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #764ba2;
  transform: scale(1.05);
}

.footer a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.3s ease;
}

.footer a:hover::after {
  width: 100%;
}

.footer a:active {
  transform: scale(0.95);
  animation: linkClick 0.3s ease;
}

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

.section-title {
  font-size: 1.5rem;
  margin-bottom: 18px;
  color: #fff;
  padding-left: 14px;
  border-left: 5px solid rgba(255,255,255,0.6);
  font-weight: 700;
}

.no-results {
  text-align: center;
  padding: 70px;
  color: rgba(255,255,255,0.85);
  font-size: 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 18px;
}

.floating-buttons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.floating-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 40px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-btn:hover { transform: translateY(-3px); }

.floating-btn:active { transform: scale(0.95); }

@media (max-width: 1200px) {
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
}

@media (max-width: 900px) {
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; padding: 24px; }
  .emoji-symbol {
    font-size: 64px;
    word-break: normal;
    word-wrap: normal;
    white-space: nowrap;
  }
  .emoji-card { padding: 24px 16px; }
}

@media (max-width: 768px) {
  .header-content { flex-direction: column; }
  .search-box { width: 100%; max-width: none; }
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; padding: 20px; }
  .emoji-card { padding: 20px 14px; }
  .emoji-symbol {
    font-size: 58px;
    word-break: normal;
    word-wrap: normal;
    white-space: nowrap;
  }
  .categories { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding: 14px; }
  .category-btn { flex-shrink: 0; }
}

@media (max-width: 680px) {
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; padding: 16px; }
  .emoji-symbol {
    font-size: 52px;
    word-break: normal;
    word-wrap: normal;
    white-space: nowrap;
  }
  .emoji-card { padding: 18px 12px; }
}

@media (max-width: 480px) {
  .emoji-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 14px; }
  .emoji-symbol {
    font-size: 48px;
    word-break: normal;
    word-wrap: normal;
    white-space: nowrap;
  }
  .emoji-card { padding: 16px 10px; }
  .floating-buttons { right: 10px; bottom: 10px; }
  .floating-btn { width: 45px; height: 45px; font-size: 20px; }
}
