.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.btn-primary {
  border: none;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled),
.btn-ghost:hover:not(:disabled) {
  transform: scale(0.99);
  opacity: 0.95;
}

.btn-primary:active:not(:disabled),
.btn-ghost:active:not(:disabled) {
  transform: scale(0.97);
}

.grid {
  display: grid;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 40;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.side-menu {
  position: fixed;
  inset: 0;
  display: grid;
  justify-items: end;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
  z-index: 60;
}

.side-menu.open {
  pointer-events: auto;
  opacity: 1;
  background: rgba(0, 0, 0, 0.64);
}

.side-menu__panel {
  width: 245px;
  height: 100%;
  background: #262832;
  padding: 16px 24px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(120%);
  transition: transform 0.28s ease;
}

.side-menu.open .side-menu__panel {
  transform: translateX(0);
}

.side-menu__top {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.close {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #7d808d;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.close-icon {
  width: 14px;
  height: 14px;
  stroke: #7d808d;
  stroke-width: 1.5;
  fill: none;
}

.side-menu__links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: #ffffff;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.1s ease;
}

.link.active .link-icon,
.link.active .link-text {
  color: #ffffff;
}

.link:hover {
  transform: scale(0.99);
}

.link:active {
  transform: scale(0.98);
}

.link-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: grid;
  place-items: center;
}

.link-text {
  font-size: 16px;
  font-weight: 400;
}

.cta {
  margin-top: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background:
    linear-gradient(#262832, #262832) padding-box,
    linear-gradient(90deg, #4d329c 0%, #287f75 41%, #2a647e 73%, #194875 100%) border-box;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  position: relative;
  text-align: center;
  transition: transform 0.1s ease, background 0.2s ease, border-color 0.2s ease;
}

.cta:hover {
  transform: translateY(-1px);
  border-color: transparent;
  background:
    linear-gradient(90deg, #4d329c 0%, #287f75 41%, #2a647e 73%, #194875 100%) padding-box,
    linear-gradient(90deg, #4d329c 0%, #287f75 41%, #2a647e 73%, #194875 100%) border-box;
}

.cta:active {
  transform: translateY(0);
  box-shadow: none;
}

.side-menu__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.social-icon {
  width: 24px;
  height: 24px;
  fill: #fbfaf8;
  fill-opacity: 0.9;
}

.social-btn:hover,
.social-btn:active {
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.25);
}

.social-btn:hover .social-icon,
.social-btn:active .social-icon {
  fill-opacity: 1;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #ffffff;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease;
}

.lang-main {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 400;
}

.lang-icon {
  display: flex;
  align-items: center;
}

.lang-text {
  font-size: 14px;
  font-weight: 400;
}

.lang-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.lang-chevron.flipped {
  transform: scale(-1, -1); /* flip both axes per request */
}

.lang-menu {
  position: absolute;
  bottom: calc(100% + 8px); /* open upward instead of downward */
  right: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.lang-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 6px;
}

.lang-item.active {
  background: rgba(255, 255, 255, 0.06);
}

.lang-item-text {
  font-size: 14px;
  font-weight: 500;
}

.lang-check {
  display: none;
  align-items: center;
  justify-content: center;
}

.lang-item.active .lang-check {
  display: inline-flex;
}
