:root {
  --bg-color: #030303;
  --surface-color: rgba(15, 15, 15, 0.85);
  --surface-hover: rgba(25, 25, 25, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-color: #ffffff;
  --spotify-color: #1db954;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, #151515 0%, #030303 100%);
}

.material-symbols-rounded {
  font-size: 1.2rem;
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}

.text-white {
  color: #fff !important;
}
.text-muted {
  color: var(--text-secondary);
}
.text-sm {
  font-size: 0.85rem;
}
.mt-10 {
  margin-top: 10px;
}
.mt-20 {
  margin-top: 20px;
}
.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.full-width {
  width: 100%;
}
.justify-start {
  justify-content: flex-start !important;
}
.icon-sm {
  font-size: 1rem !important;
}

.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 100px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex-grow: 1;
}

.glass-nav {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
  z-index: 500;
}
.nav-container {
  position: relative;
  display: flex;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.nav-btn {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  color: #888;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.nav-btn.active {
  color: #000;
  font-weight: 700;
}
.nav-btn:hover {
  color: #fff;
}
.nav-btn.active:hover {
  color: #000;
}
.nav-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  background: var(--accent-color);
  border-radius: 100px;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0;
}

.tab-content {
  display: none;
  animation: fadeUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tab-content.active {
  display: block;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton {
  background: linear-gradient(90deg, #181818 25%, #2a2a2a 50%, #181818 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite linear;
}
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.profile-card {
  text-align: center;
  margin-bottom: 25px;
}
.avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: #10b981;
  border: 4px solid var(--bg-color);
  border-radius: 50%;
}
h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.badge {
  font-size: 0.8rem;
  background: #e0e0e0;
  color: #111;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-3px);
  margin-left: 8px;
}
.bio {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 auto 20px;
  max-width: 400px;
}
.stack-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.spotify-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 20px;
  margin-top: 15px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.spotify-card.idle {
  background: rgba(15, 15, 15, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.spotify-card.playing {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(10, 10, 10, 0.6);
}
.spotify-card.playing::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg-img);
  background-size: cover;
  background-position: center;
  filter: blur(35px) brightness(0.5);
  opacity: 0.8;
  z-index: -1;
  transition: background-image 0.5s ease-in-out;
}
.spotify-card.playing:hover {
  background: rgba(15, 15, 15, 0.5);
  transform: translateY(-2px);
}
.sp-cover {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.sp-eq {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.spotify-card.playing .sp-eq {
  display: flex;
}
.eq-bar {
  width: 3px;
  background: var(--spotify-color);
  border-radius: 2px;
  animation: eq-bounce 1s infinite ease-in-out;
}
.eq-bar:nth-child(1) {
  animation-delay: 0s;
  height: 100%;
}
.eq-bar:nth-child(2) {
  animation-delay: 0.2s;
  height: 60%;
}
.eq-bar:nth-child(3) {
  animation-delay: 0.4s;
  height: 80%;
}
@keyframes eq-bounce {
  0%,
  100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}

.sp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.sp-header {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.spotify-card.playing .sp-header {
  color: var(--spotify-color);
  text-shadow: none;
}
.sp-track-name {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.spotify-card.idle .sp-track-name {
  color: var(--text-secondary);
  font-weight: 500;
}
.sp-artist-name {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.sp-progress-container {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.spotify-card.playing .sp-progress-container {
  display: flex;
}
.sp-time {
  font-size: 0.7rem;
  color: #ccc;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  text-shadow: none;
}
.sp-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
}
.sp-progress-fill {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 1s linear;
}

.sp-teaser {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #a855f7;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
  text-shadow: none;
}
.spotify-card.playing .sp-teaser {
  display: none;
}

.card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.card:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.15);
}
.card:active {
  transform: scale(0.98);
}
.grid-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.project {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.project.glow-blue:hover {
  box-shadow: 0 0 40px -10px rgba(59, 130, 246, 0.15);
}
.project.glow-purple:hover {
  box-shadow: 0 0 40px -10px rgba(168, 85, 247, 0.15);
}
.project.glow-gold:hover {
  box-shadow: 0 0 40px -10px rgba(250, 204, 21, 0.15);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.card-header span {
  color: var(--text-secondary);
  transition: color var(--transition);
}
.project:hover .card-header span {
  color: #fff;
}
.project p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ccc;
}
.special-order {
  grid-column: 1 / -1;
  padding: 18px 24px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 100%
  );
}
.order-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.order-icon {
  font-size: 1.5rem;
  color: #3b82f6;
}

.software-list,
.list-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.soft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  min-height: 85px;
}
.soft-left,
.link-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.soft-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.soft-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.soft-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.soft-info p,
.link-text span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.soft-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.soft-ver {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}
.soft-date {
  font-size: 0.75rem;
  color: #666;
}
.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}
.icon-box {
  font-size: 1.5rem;
  color: #fff;
}
.link-text h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.arrow {
  color: #555;
  transition: var(--transition);
}
.link:hover .arrow {
  color: #fff;
  transform: translateX(4px);
}

.cat-top-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.cat-input-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding-left: 15px;
  padding-right: 5px;
}
.cat-input-group span.search-icon {
  color: var(--text-secondary);
  font-size: 1.2rem;
}
.cat-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 14px 10px;
  font-size: 0.95rem;
  font-family: inherit;
}
.btn-search-cat {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
  flex-shrink: 0;
  margin-left: 5px;
}
.btn-search-cat:active {
  transform: scale(0.9);
}

.cat-frame {
  width: 100%;
  height: 450px;
  background: #0a0a0a;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.cat-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
}
.cat-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  display: none;
  cursor: zoom-in;
}
.cat-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #555;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
.cat-wait-icon {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.cat-terminal {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 8px 12px;
  border-radius: 10px;
  text-align: center;
}
.cat-error-overlay {
  display: none;
  position: absolute;
  z-index: 3;
  bottom: 20px;
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 20px;
  border-radius: 16px;
  border: 1px solid #ef4444;
  text-align: center;
  backdrop-filter: blur(5px);
}
.cat-error-overlay h3 {
  color: #ef4444;
  margin-bottom: 5px;
  font-size: 1.1rem;
}
.cat-error-overlay p {
  color: #ccc;
  font-size: 0.85rem;
  margin: 0;
}
.cat-source-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cat-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.btn-primary,
.btn-glass {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition:
    transform 0.1s,
    background var(--transition);
  font-family: inherit;
}
.btn-primary {
  background: #fff;
  color: #000;
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-color);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-glass:active {
  transform: scale(0.97);
}
.icon-only {
  flex: none;
  width: 50px;
  padding: 0;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  transition: border var(--transition);
}
.radio-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.radio-item input {
  display: none;
}
.radio-custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #555;
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition);
}
.radio-item input:checked ~ .radio-custom {
  border-color: #3b82f6;
}
.radio-item input:checked ~ .radio-custom::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border-radius: 50%;
}
.radio-text {
  display: flex;
  flex-direction: column;
}
.radio-text b {
  font-size: 0.95rem;
  color: #fff;
}
.radio-text span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
  touch-action: none;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Обновленная логика анимации модального окна для ПК */
.modal-window {
  background: #0e0e0e;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 500px;
  border-radius: 24px;
  padding: 25px;
  transform: translateY(100%); /* Прячется вниз по умолчанию */
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s;
  max-height: 85vh;
  display: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}
.modal-overlay.active .modal-window.show {
  transform: translateY(0);
  opacity: 1;
  display: flex;
}

.modal-drag-area {
  display: none;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  flex-shrink: 0;
}
.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-head h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.modal-ver {
  background: #fff;
  color: #000;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
}
.modal-close,
.btn-icon-text {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.modal-close:hover,
.btn-icon-text:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-icon-text {
  width: auto;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 600;
  gap: 6px;
  font-family: inherit;
}
.modal-body {
  overflow-y: auto;
  padding-right: 5px;
  flex: 1;
  touch-action: pan-y;
  padding-bottom: 20px; /* Отступ чтобы контент не прилипал к низу */
}
.modal-body h3 {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-box {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-box.tip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #ddd;
}
.new-list {
  list-style: none;
  margin-bottom: 16px;
}
.new-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.new-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #666;
  font-size: 1.2rem;
}
.new-list.green-bullets li::before {
  color: #10b981;
}

.copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.copy-box:hover {
  background: rgba(30, 30, 30, 0.9);
}
.copy-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  color: #fff;
  flex: 1;
  margin: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.full-row {
  grid-column: 1 / -1;
}

.hiddify-view {
  display: none;
  animation: slideIn 0.3s ease forwards;
  flex-direction: column;
  height: 100%;
}
.hiddify-view.active {
  display: flex;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.lightbox .modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  z-index: 3001;
  background: rgba(255, 255, 255, 0.1);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(25, 25, 25, 0.95);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4000;
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.4s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
  touch-action: none;
}
.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast span.material-symbols-rounded {
  color: #1db954;
  font-size: 1.2rem;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 40px 0 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 680px) {
  .container {
    padding: 90px 15px 15px;
  }
  .glass-nav {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    padding: 0 15px;
  }
  .nav-container {
    width: 100%;
    padding: 4px;
    overflow-x: auto;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
  }
  .nav-container::-webkit-scrollbar {
    display: none;
  }
  .nav-btn {
    flex: 0 0 auto;
    padding: 12px 20px;
    scroll-snap-align: center;
  }
  .grid-projects,
  .modal-grid-4 {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-window {
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
    padding: 15px 20px 0px;
    transition:
      transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s;
  }
  .modal-overlay.active .modal-window.show {
    transform: translateY(0);
  }
  .modal-body {
    padding-bottom: 50px; /* Доп отступ на мобилках чтобы кнопки не липли к низу */
  }

  .modal-drag-area {
    display: flex;
    width: 100%;
    height: 35px;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    z-index: 10;
  }
  .modal-drag-handle {
    width: 40px;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
  }
  .modal-head {
    padding-top: 25px;
    border-bottom: none;
  }
  .cat-frame {
    height: 350px;
  }
}
