:root {
  --primary: #27ae60;         /* fresh green */
  --primary-dark: #219150;    /* darker green */
  --background: #fff;
  --card-bg: #f7f7fb;
  --text: #23263a;
  --text-muted: #6c6f85;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 16px;
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  width: 100%;
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--primary);
}

.logo-icon {
  font-size: 2rem;
  margin-right: 8px;
}

.nav-desktop {
  display: flex;
  gap: 24px;
}

.nav-desktop a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-desktop a.active,
.nav-desktop a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  margin-left: 16px;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 16px rgba(0,0,0,0.08);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 32px 24px 24px 24px;
  transition: right var(--transition);
  pointer-events: none;
  opacity: 0;
}
.sidebar.active {
  right: 0;
  pointer-events: auto;
  opacity: 1;
  transition: right var(--transition), opacity var(--transition);
}
.close-sidebar {
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  align-self: flex-end;
  cursor: pointer;
  margin-bottom: 32px;
}
.nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nav-mobile a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 10px 0;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-mobile a.active,
.nav-mobile a:hover {
  background: var(--primary);
  color: #fff;
}

.main-content {
  flex: 1 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 70vh;
  padding: 32px 12px 64px 12px;
  width: 100%;
  box-sizing: border-box;
}

.nicknames-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 18px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  animation: fadeIn 1s;
  box-sizing: border-box;
}

.nicknames-title {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nicknames-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.nickname-search {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 28px auto;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 1.08rem;
  outline: none;
  transition: border 0.2s;
  color: var(--text);
  background: #fafbfc;
  box-sizing: border-box;
  display: block;
}
.nickname-search:focus {
  border-color: var(--primary);
  background: #fff;
}

.nicknames-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.nicknames-list,
.nickname-item,
.nickname-text,
.nickname-badge {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}
.nicknames-list {
  -webkit-touch-callout: none;
}
.nicknames-list {
  pointer-events: auto;
}
.nicknames-list ::selection,
.nickname-item ::selection,
.nickname-text ::selection {
  background: transparent;
}
.nickname-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  font-size: 1.08rem;
  border-bottom: 1px solid #f0f0f0;
  background: #f7f7fb;
  transition: background 0.18s;
  position: relative;
  cursor: pointer;
}
.nickname-item:nth-child(even) {
  background: #eafaf1;
}
.nickname-item:hover:not(.soldout) {
  background: var(--primary);
  color: #fff;
}
.nickname-item .nickname-icon {
  margin-right: 12px;
  font-size: 1.2em;
}
.nickname-item .nickname-text {
  flex: 1;
  text-align: left;
  font-weight: 600;
  color: inherit;
  letter-spacing: 0.5px;
}
.nickname-item .nickname-badge {
  font-size: 0.85em;
  padding: 3px 14px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 12px;
  transition: background 0.18s, color 0.18s;
}
.nickname-badge.available {
  background: #eafaf1;
  color: var(--primary-dark);
  border: 1px solid #b6e9c9;
}
.nickname-badge.sold {
  background: #ff4d4f;
  color: #fff;
  border: 1px solid #ff4d4f;
}
.nickname-item.soldout {
  background: #f3f3f3 !important;
  color: #bbb !important;
  pointer-events: none;
  opacity: 0.7;
  cursor: default;
}
.nickname-item.soldout .nickname-badge {
  background: #ff4d4f;
  color: #fff;
  border: 1px solid #ff4d4f;
}
.nickname-item.soldout .nickname-icon {
  color: #ff4d4f;
}
.nickname-item.soldout .nickname-text {
  text-decoration: line-through;
}

.nickname-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
  font-size: 1rem;
}
.last-update {
  color: var(--text-muted);
  background: #f7f7fb;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.97em;
}
.contact-info {
  color: var(--text-muted);
  background: #f7f7fb;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 0.97em;
}
.contact-link {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  margin: 0 2px;
  transition: color 0.18s;
}
.contact-link.telegram:hover {
  color: #229ed9;
}
.contact-link.camfrog:hover {
  color: #27ae60;
}

.footer {
  width: 100%;
  background: #fff;
  color: var(--text-muted);
  text-align: center;
  padding: 18px 0;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px);}
  to { opacity: 1; transform: translateY(0);}
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.32);
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
  transition: opacity 0.28s cubic-bezier(.4,0,.2,1), transform 0.28s cubic-bezier(.4,0,.2,1);
}
.modal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.modal-content {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 32px 24px 24px 24px;
  max-width: 340px;
  width: 92vw;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s;
  transition: box-shadow 0.22s, transform 0.22s;
  transform: scale(0.98);
}
.modal.show .modal-content {
  box-shadow: 0 12px 40px rgba(39,174,96,0.16);
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 2.1rem;
  color: #bbb;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.18s;
  z-index: 2;
  line-height: 1;
}
.modal-close:hover {
  color: #ff4d4f;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.modal-icon img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f7f7fb;
  box-shadow: 0 2px 8px rgba(39,174,96,0.10);
  display: block;
}
.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #23263a;
  margin: 0 0 2px 0;
  letter-spacing: 0.5px;
}
.modal-subtitle {
  font-size: 1.01rem;
  color: #6c6f85;
  margin: 0;
  font-weight: 500;
}

.modern-nickname {
  font-size: 1.13rem;
  font-weight: 600;
  color: #219150;
  background: #f7f7fb;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 24px 0;
  letter-spacing: 0.5px;
  text-align: center;
  border: 1px solid #eaeaea;
}

.modern-actions {
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  margin-bottom: 0;
}
.modern-btn {
  background: #fff;
  border: 1.5px solid #222;
  color: #23263a;
  border-radius: 12px;
  padding: 0 18px 0 10px;
  height: 48px;
  min-width: 120px;
  font-size: 1.04rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
  text-decoration: none;
  transition: background 0.18s, border 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
}
.modern-btn:hover {
  background: #f7f7fb;
  border-color: #219150;
  color: #219150;
  box-shadow: 0 4px 16px rgba(39,174,96,0.09);
}
.modern-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f7f7fb;
  margin-right: 2px;
}
.modern-btn-label {
  font-size: 1.01em;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: inherit;
}

/* Responsive for modal */
@media (max-width: 500px) {
  .modern-modal {
    padding: 16px 4vw 18px 4vw;
    max-width: 99vw;
  }
  .modal-header {
    gap: 10px;
  }
  .modern-btn {
    min-width: 90px;
    font-size: 0.98rem;
    padding: 0 10px 0 6px;
    height: 40px;
  }
  .modern-btn-icon {
    width: 22px;
    height: 22px;
  }
  .modern-nickname {
    font-size: 1.01rem;
    padding: 7px 6px;
  }
}

/* Responsive Styles */
@media (max-width: 900px) {
  .header-inner {
    max-width: 98vw;
    padding: 14px 10px;
  }
  .main-content {
    padding: 18px 2vw 48px 2vw;
  }
  .nicknames-section {
    padding: 22px 6px;
    max-width: 98vw;
  }
  .nicknames-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 700px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .main-content {
    padding: 8px 0 32px 0;
  }
  .sidebar {
    padding-top: 24px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nicknames-title {
    font-size: 1.3rem;
  }
  .nicknames-section {
    padding: 10px 2px;
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
  }
  .nicknames-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nickname-card {
    font-size: 1rem;
    padding: 12px 4px;
  }
  .footer {
    font-size: 0.95rem;
    padding: 12px 0;
  }
  .nickname-meta {
    flex-direction: column;
    gap: 6px;
    font-size: 0.97rem;
  }
  .last-update,
  .contact-info {
    padding: 4px 8px;
    font-size: 0.97em;
  }
}

#abjad-filter {
  display: inline-block;
  margin-bottom: 18px;
  margin-right: 0;
  margin-left: 0;
  padding: 8px 18px 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  font-size: 1.04em;
  font-family: inherit;
  background: #fafbfc;
  color: #23263a;
  outline: none;
  box-shadow: 0 2px 8px rgba(44,62,80,0.04);
  transition: border 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-width: 120px;
}
#abjad-filter:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 4px 16px rgba(39,174,96,0.09);
}
@media (max-width: 600px) {
  #abjad-filter {
    font-size: 0.98em;
    padding: 7px 10px 7px 8px;
    min-width: 90px;
  }
}

.nickname-badge.new-badge {
  background: #ffe066;
  color: #b8860b;
  border: 1px solid #ffe066;
  margin-left: 7px;
  font-size: 0.73em;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 2px 8px 2px 8px;
  border-radius: 8px;
  vertical-align: middle;
  text-transform: none;
  animation: newBadgePulse 0.8s infinite alternate;
  box-shadow: 0 0 0 0 #ffe06655;
  display: inline-block;
  position: relative;
  top: -1px;
}
@keyframes newBadgePulse {
  from { box-shadow: 0 0 0 0 #ffe06655; }
  to   { box-shadow: 0 0 8px 2px #ffe06699; }
}

.nickname-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  margin-bottom: 18px;
}
.nickname-loading .spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #eafaf1;
  border-top: 4px solid #27ae60;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
  transition: border-color 0.18s;
}
.nickname-loading .loading-text {
  color: #27ae60;
  font-size: 1.05em;
  font-weight: 600;
  letter-spacing: 0.2px;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 32px;
  z-index: 999;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(39,174,96,0.13);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, box-shadow 0.18s, opacity 0.18s;
  opacity: 0.92;
}
#back-to-top:hover {
  background: #219150;
  opacity: 1;
}
@media (max-width: 600px) {
  #back-to-top {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
    right: 12px;
    bottom: 18px;
  }
}
