/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Glassmorphism container */
.bg-white.bg-opacity-10.backdrop-blur-lg {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Input and button transitions */
input, button {
  transition: all 0.2s ease-in-out;
}

input:focus {
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
  outline: none;
}

button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Modal animation */
#register-modal {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Message styles */
.text-red-400 {
  color: #f87171;
}

.text-green-400 {
  color: #34d399;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  h1, h2 {
    font-size: 1.25rem;
  }
  .p-8 {
    padding: 1.5rem;
  }
  
  /* Улучшения для выбора метода авторизации на мобильных */
  .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .auth-method-card {
    padding: 1rem;
  }
}

/* Стили для выбора метода авторизации */
.auth-method-option input[type="radio"]:checked + .auth-method-card {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-method-option input[type="radio"]:checked + .auth-method-card .text-gray-200 {
  color: #60a5fa;
}

.auth-method-card {
  transition: all 0.2s ease-in-out;
}

.auth-method-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Анимация для выбранного метода */
.auth-method-option input[type="radio"]:checked + .auth-method-card {
  animation: selectPulse 0.3s ease-in-out;
}

@keyframes selectPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Круговые индикаторы системной информации */
.system-info-widget {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.system-indicators {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.system-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(55, 65, 81, 0.5);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.system-indicator:hover {
  background: rgba(55, 65, 81, 0.7);
  transform: translateY(-1px);
}

.circular-progress {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.circular-progress::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #10b981 0deg, #10b981 var(--progress, 0deg), #e5e7eb var(--progress, 0deg), #e5e7eb 360deg);
  transition: all 0.5s ease;
}

.circular-progress::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  z-index: 1;
}

.circular-progress-value {
  position: relative;
  z-index: 2;
  color: #374151;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
}

.circular-progress.cpu::before {
  background: conic-gradient(from 0deg, #10b981 0deg, #10b981 var(--progress, 0deg), #e5e7eb var(--progress, 0deg), #e5e7eb 360deg);
}

.circular-progress.ram::before {
  background: conic-gradient(from 0deg, #f59e0b 0deg, #f59e0b var(--progress, 0deg), #e5e7eb var(--progress, 0deg), #e5e7eb 360deg);
}

.circular-progress.disk::before {
  background: conic-gradient(from 0deg, #ef4444 0deg, #ef4444 var(--progress, 0deg), #e5e7eb var(--progress, 0deg), #e5e7eb 360deg);
}

.circular-progress.swap::before {
  background: conic-gradient(from 0deg, #8b5cf6 0deg, #8b5cf6 var(--progress, 0deg), #e5e7eb var(--progress, 0deg), #e5e7eb 360deg);
}

.indicator-info {
  flex: 1;
  min-width: 0;
}

.indicator-label {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.indicator-details {
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.3;
}

.indicator-value {
  color: white;
  font-weight: 600;
}

.indicator-unit {
  color: #6b7280;
  font-size: 11px;
}

/* Анимация обновления значений */
.circular-progress.updating {
  animation: pulse 0.5s ease-in-out;
}

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

/* Новый блок системных данных */
.system-data-section {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.system-resource-card {
  background: rgba(55, 65, 81, 0.6);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.system-resource-card:hover {
  background: rgba(55, 65, 81, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.resource-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.resource-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 18px;
  color: white;
}

.cpu-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.ram-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.disk-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.swap-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.resource-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.resource-progress {
  margin-bottom: 12px;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.cpu-progress {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.ram-progress {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.disk-progress {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.swap-progress {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.progress-text {
  position: absolute;
  top: -25px;
  right: 0;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.resource-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  color: #9ca3af;
  font-size: 12px;
}

.detail-value {
  color: white;
  font-size: 12px;
  font-weight: 600;
}

/* Компактные системные ресурсы */
.compact-system-resources {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.compact-system-resources:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.compact-resource-item {
  background: rgba(55, 65, 81, 0.4);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.compact-resource-item:hover {
  background: rgba(55, 65, 81, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.resource-icon-compact {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

.cpu-icon-compact {
  background: linear-gradient(135deg, #10b981, #059669);
}

.ram-icon-compact {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.disk-icon-compact {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.swap-icon-compact {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.resource-title-compact {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.resource-percentage {
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.progress-bar-compact {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin: 8px 0;
}

.progress-fill-compact {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill-compact::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.cpu-progress-compact {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.ram-progress-compact {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.disk-progress-compact {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.swap-progress-compact {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.resource-info-compact {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Интегрированный виджет заметок */
.notes-widget-integrated {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.notes-widget-integrated:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.latest-note {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(31, 41, 55, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.latest-note:hover {
  background: linear-gradient(135deg, rgba(55, 65, 81, 0.9), rgba(31, 41, 55, 0.9));
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.empty-notes {
  background: rgba(55, 65, 81, 0.3);
  border-radius: 8px;
  border: 1px dashed rgba(156, 163, 175, 0.3);
}

/* Системные ресурсы в стиле Windows */
.windows-style-resources {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.windows-style-resources:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.resources-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resource-widget {
  background: rgba(55, 65, 81, 0.4);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.resource-widget:hover {
  background: rgba(55, 65, 81, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.resource-header-windows {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.resource-icon-windows {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  margin-right: 12px;
}

.cpu-icon-windows {
  background: linear-gradient(135deg, #10b981, #059669);
}

.ram-icon-windows {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.disk-icon-windows {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.swap-icon-windows {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.resource-info-windows {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resource-name {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.resource-value {
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.windows-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.windows-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.windows-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.cpu-progress-windows {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.ram-progress-windows {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.disk-progress-windows {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.swap-progress-windows {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.resource-details-windows {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
}

/* RGB кнопка "Назад к списку" */
.back-button-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.rgb-back-btn {
  position: relative;
  background: #1a1a1a !important;
  border: 2px solid #ff0000 !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  z-index: 10 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 120px !important;
  min-height: 40px !important;
}

/* RGB анимация как светодиодная лента */
.rgb-back-btn::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    #ff0000, #ff8000, #ffff00, #80ff00,
    #00ff00, #00ff80, #00ffff, #0080ff,
    #0000ff, #8000ff, #ff00ff, #ff0080,
    #ff0000
  );
  background-size: 300% 300%;
  border-radius: 52px;
  z-index: -1;
  animation: rgbFlow 3s ease-in-out infinite;
  opacity: 0.8;
}

.rgb-back-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  border-radius: 50px;
  z-index: -1;
}

/* Анимация RGB потока */
@keyframes rgbFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Эффекты при наведении */
.rgb-back-btn:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
  border-color: #00ff00 !important;
}

.rgb-back-btn:hover::before {
  animation-duration: 1.5s !important;
  opacity: 1 !important;
}

.rgb-back-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Содержимое кнопки */
.btn-content {
  position: relative;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-weight: 600 !important;
}

.btn-content i {
  transition: transform 0.3s ease;
}

.rgb-back-btn:hover .btn-content i {
  transform: translateX(-3px);
}

/* Дополнительный эффект свечения */
.rgb-back-btn:hover::before {
  box-shadow: 
    0 0 20px rgba(255, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 0, 0.3),
    0 0 60px rgba(0, 0, 255, 0.2);
}

/* Адаптивность */
@media (max-width: 768px) {
  .rgb-back-btn {
    padding: 10px 20px;
    font-size: 12px;
  }
  
  .back-button-container {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .rgb-back-btn {
    padding: 8px 16px;
    font-size: 11px;
  }
}
  
  .windows-style-resources {
    padding: 12px;
  }
  
  .resource-widget {
    padding: 8px;
  }
  
  .resource-icon-windows {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin-right: 8px;
  }
  
  .resource-name {
    font-size: 12px;
  }
  
  .resource-value {
    font-size: 14px;
  }
  
  .resource-details-windows {
    font-size: 10px;
  }
  
  .windows-progress-bar {
    height: 6px;
  }

/* Состояния ошибок */
.system-indicator.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.system-indicator.error .indicator-label {
  color: #fca5a5;
}

.system-indicator.error .indicator-details {
  color: #f87171;
}

/* Загрузка */
.system-indicator.loading {
  opacity: 0.6;
}

.system-indicator.loading .circular-progress {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}