/* Стили для панели управления (panel.html) */

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(6px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* Panel specific card */
.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 22px;
  transition: all 0.2s ease;
}

h2 {
  color: var(--accent1);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

/* Button accent for panel */
.btn-accent {
  background: linear-gradient(90deg, #5b46ff, #6a5aff);
  border: none;
  color: #fff;
}

/* VPN Status */
#vpnStatus {
  transition: all 0.3s ease;
}

#vpnPulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Server Selection */
.server-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(91, 70, 255, 0.15);
}

.server-btn.active {
  border-color: rgba(91, 70, 255, 0.5) !important;
  background: rgba(91, 70, 255, 0.05);
}

/* Progress Bar */
.progress-bar {
  transition: width 0.5s ease;
}

/* Copy Button Feedback */
.copy-btn {
  transition: all 0.2s ease;
}

/* Device Status Indicator */
.device-active {
  animation: pulse 2s infinite;
}

/* Horizontal Navigation Styles */
nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 70, 255, 0.3) transparent;
}

nav::-webkit-scrollbar {
  height: 4px;
}

nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

nav::-webkit-scrollbar-thumb {
  background: rgba(91, 70, 255, 0.3);
  border-radius: 10px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 1rem;
}

.nav-group-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: #e9e8ef;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(91, 70, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-item:hover::before {
  left: 100%;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  transition: width 0.3s ease;
}

.nav-item:hover {
  background: rgba(91, 70, 255, 0.1);
  border-color: rgba(91, 70, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 70, 255, 0.2);
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(91, 70, 255, 0.15), rgba(91, 70, 255, 0.08));
  border-color: rgba(91, 70, 255, 0.4);
  box-shadow: 0 0 20px rgba(91, 70, 255, 0.3);
}

.nav-item.active::after {
  width: 100%;
}

.nav-icon {
  font-size: 1.125rem;
  transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
  transform: scale(1.2) rotate(5deg);
}

.nav-text {
  transition: color 0.3s ease;
}

.nav-item:hover .nav-text {
  color: var(--accent1);
}

.nav-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.nav-item:hover .nav-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.nav-divider {
  width: 1px;
  height: 2rem;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 0 0.5rem;
}

.nav-item-telegram {
  background: linear-gradient(135deg, rgba(37, 150, 190, 0.1), rgba(37, 150, 190, 0.05));
  border-color: rgba(37, 150, 190, 0.2);
}

.nav-item-telegram:hover {
  background: linear-gradient(135deg, rgba(37, 150, 190, 0.2), rgba(37, 150, 190, 0.1));
  border-color: rgba(37, 150, 190, 0.4);
  box-shadow: 0 4px 12px rgba(37, 150, 190, 0.2);
}

.nav-item-telegram::after {
  background: linear-gradient(90deg, #2596be, #1e7a9e);
}

.nav-item-telegram.active {
  background: linear-gradient(135deg, rgba(37, 150, 190, 0.2), rgba(37, 150, 190, 0.1));
  border-color: rgba(37, 150, 190, 0.4);
  box-shadow: 0 0 20px rgba(37, 150, 190, 0.3);
}

/* Navigation Animations */
.nav-group {
  animation: slideInFromTop 0.5s ease-out;
}

.nav-group:nth-child(1) {
  animation-delay: 0.1s;
}

.nav-group:nth-child(3) {
  animation-delay: 0.2s;
}

.nav-group:nth-child(5) {
  animation-delay: 0.3s;
}

.nav-item {
  animation: scaleIn 0.4s ease-out backwards;
}

.nav-item:nth-child(1) {
  animation-delay: 0.1s;
}

.nav-item:nth-child(2) {
  animation-delay: 0.15s;
}

.nav-item.active {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease-out;
}

/* Chat Styles */
.chat-messages {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(91, 70, 255, 0.3);
  border-radius: 10px;
}

.message {
  animation: slideUp 0.3s ease-out;
}

.message.user .glass {
  background: rgba(91, 70, 255, 0.08);
  border-color: rgba(91, 70, 255, 0.2);
}

.message.support .glass {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

.ticket-item.active {
  border-color: rgba(91, 70, 255, 0.5) !important;
  background: rgba(91, 70, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid.lg\\:grid-cols-4 {
    grid-template-columns: 1fr;
  }

  aside {
    order: -1;
  }

  aside .glass {
    margin-bottom: 1rem;
  }

  .modal-content {
    max-width: 100%;
    margin: 20px;
  }
}

@media (max-width: 768px) {
  .card {
    padding: 16px;
  }

  #vpnStatus {
    width: 48px;
    height: 48px;
  }

  #vpnStatus .w-8 {
    width: 24px;
    height: 24px;
  }

  .sidebar-item {
    padding: 12px 16px;
  }

  aside .glass {
    padding: 1rem;
  }
}

