/*
==================================
  Modern Auth & Server Cards CSS
  Stunning visual upgrade
==================================
*/

/* ===== LOGIN & REGISTER PAGES ===== */

/* Full-page auth layout */
.form-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 2rem 1rem;
  background: transparent !important;
}

/* Make main container transparent on auth pages - no border */
.main-container:has(.form-page),
.container:has(.form-page),
body.auth-page .main-container,
body.auth-page .container,
body.auth-page .main-content,
.auth-page .main-container,
.auth-page .container,
.main-content.form-page {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: none !important;
  border-color: transparent !important;
}

.form-page .widget {
  width: 100%;
  max-width: 1050px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 255, 255, 0.1),
    0 0 30px rgba(0, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  padding: 0;
  animation: authCardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authCardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Solid cyan border */
.form-page .widget::before {
  content: none;
}

/* Floating particles effect */
.form-page .widget::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: particleFloat 20s linear infinite;
  pointer-events: none;
}

@keyframes particleFloat {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, 30px); }
}

/* Widget Header */
.form-page .widget-header {
  background: rgba(0, 255, 255, 0.06);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.form-page .widget-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.form-page .widget-header h2 {
  margin: 0;
  color: #00ffff;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.form-page .widget-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: #00ffff;
  margin: 0.75rem auto 0;
  border-radius: 0;
  animation: headerUnderline 1s ease-out forwards;
}

@keyframes headerUnderline {
  from { width: 0; opacity: 0; }
  to { width: 60px; opacity: 1; }
}

/* Widget Content */
.form-page .widget-content {
  padding: 1.75rem 2rem 2rem;
  position: relative;
  z-index: 1;
}

/* Password toggle wrapper */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3rem !important;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: #00ffff;
}

/* Modern Form Styling */
.form-styled .form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-styled .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #00ffff;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-styled .form-group input[type="text"],
.form-styled .form-group input[type="email"],
.form-styled .form-group input[type="password"],
.form-styled .form-group input[type="number"],
.form-styled .form-group select,
.form-styled .form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(0, 255, 255, 0.2);
  background: rgba(10, 10, 15, 0.8);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  color: #e0e0e0 !important;
}

.form-styled .form-group select {
  color-scheme: dark;
}

.form-styled .form-group select option {
  background: #111118;
  color: #e0e0e0;
}

.form-styled .form-group input:focus,
.form-styled .form-group select:focus,
.form-styled .form-group textarea:focus {
  outline: none;
  border-color: #00ffff;
  background: rgba(10, 10, 15, 0.9);
  color: #e0e0e0 !important;
  box-shadow: 
    0 0 0 4px rgba(0, 255, 255, 0.1),
    0 0 15px rgba(0, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Placeholder styling */
.form-styled .form-group input::placeholder,
.form-styled .form-group textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.form-styled .form-group input:hover:not(:focus) {
  border-color: rgba(0, 255, 255, 0.4);
}

/* Submit Button */
.form-styled .btn-primary.btn-block {
  width: 100%;
  padding: 1.1rem 2rem;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: #00ffff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.2);
  margin-top: 0.5rem;
}

.form-styled .btn-primary.btn-block::before {
  content: none;
}

.form-styled .btn-primary.btn-block:hover {
  background: rgba(0, 255, 255, 0.08);
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 12px rgba(0, 255, 255, 0.05);
  transform: none;
}

.form-styled .btn-primary.btn-block:active {
  transform: none;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.15);
}

/* Form Footer */
.form-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 255, 255, 0.1);
  text-align: center;
}

.form-footer p {
  margin: 0.5rem 0;
  color: #aaa;
  font-size: 0.9rem;
}

.form-footer a {
  color: #00ffff;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.form-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #00ffff;
  transition: width 0.3s ease;
}

.form-footer a:hover {
  color: #00ffff;
}

.form-footer a:hover::after {
  width: 100%;
}

/* Role Selection (Register Page) */
.role-selection {
  margin: 1.5rem 0;
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(0, 255, 255, 0.15);
  background: rgba(0, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.radio-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.radio-option:hover {
  border-color: #00ffff;
  transform: translateX(5px);
}

.radio-option:hover::before {
  opacity: 1;
}

/* Selected state - using :has() and class fallback */
.radio-option:has(input:checked),
.radio-option.selected {
  border: 1px solid #00ffff !important;
  background: rgba(0, 255, 255, 0.08) !important;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.2) !important;
}

.radio-option:has(input:checked) .option-label,
.radio-option:has(input:checked) .option-description,
.radio-option.selected .option-label,
.radio-option.selected .option-description {
  color: #00ffff !important;
}

.radio-option:has(input:checked) .option-label i,
.radio-option.selected .option-label i {
  color: #00ffff !important;
}

/* Unselected state */
.radio-option:not(:has(input:checked)):not(.selected) {
  background: rgba(10, 10, 15, 0.8) !important;
  border: 2px solid rgba(0, 255, 255, 0.15) !important;
}

.radio-option:not(:has(input:checked)):not(.selected) .option-label {
  color: #e0e0e0 !important;
}

.radio-option:not(:has(input:checked)):not(.selected) .option-description {
  color: #aaa !important;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.option-label {
  font-weight: 800;
  color: #e0e0e0;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.option-label i {
  color: #00ffff;
  margin-right: 0.5rem;
}

.option-description {
  font-size: 0.9rem;
  color: #aaa;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
  font-weight: 500;
}

/* Alerts */
.form-page .alert {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: none;
  position: relative;
  animation: alertSlide 0.4s ease-out;
}

@keyframes alertSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-page .alert-danger {
  background: rgba(255, 50, 50, 0.1);
  color: #ff4444;
  border-left: 2px solid #ff4444;
}

.form-page .alert-success {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border-left: 2px solid #00ff88;
}

/* Captcha styling */
.form-styled .form-group:has(input[name="captcha"]) label {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.15);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  display: block;
  font-weight: 600;
  color: #00ffff;
}


/* ===== ENHANCED SERVER CARDS ===== */

.server-item {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.06), rgba(255, 0, 255, 0.03));
  border: 1px solid rgba(0, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Gradient accent line */
.server-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00ffff, #ff00ff, #00cccc);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

/* Shine effect */
.server-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  pointer-events: none;
}

.server-item:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 
    0 20px 40px rgba(0, 255, 255, 0.1),
    0 0 0 1px rgba(0, 255, 255, 0.1);
}

.server-item:hover::before {
  transform: scaleX(1);
  animation: gradientSlide 2s linear infinite;
}

.server-item:hover::after {
  left: 100%;
}

@keyframes gradientSlide {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Server name link */
.server-item h3 a {
  background: linear-gradient(135deg, #e0e0e0, #00ffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  position: relative;
}

.server-item h3 a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  transition: width 0.3s ease;
}

.server-item:hover h3 a {
  background: linear-gradient(135deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.server-item:hover h3 a::after {
  width: 100%;
}

/* Enhanced Badges */
.server-badges .badge,
.server-badges .badge-votes,
.server-badges .badge-views,
.server-badges .badge-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.875rem;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.server-badges .badge-votes,
.server-badges .badge-views,
.server-badges .badge-rating {
  background: transparent !important;
  color: #00ffff !important;
  border: 1px solid rgba(0, 255, 255, 0.25) !important;
  box-shadow: none !important;
}

.server-badges .badge-votes:hover,
.server-badges .badge-views:hover,
.server-badges .badge-rating:hover {
  background: rgba(0, 255, 255, 0.08) !important;
  border-color: rgba(0, 255, 255, 0.5) !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15), inset 0 0 12px rgba(0, 255, 255, 0.05) !important;
  transform: none;
}

/* Category Badge */
.category-badge {
  background: transparent !important;
  color: #ff00ff !important;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 0, 255, 0.25);
  transition: all 0.25s ease;
}

.category-badge:hover {
  background: rgba(255, 0, 255, 0.08) !important;
  color: #ff00ff !important;
  transform: none;
  box-shadow: 0 0 12px rgba(255, 0, 255, 0.15);
}

/* Vote Button — transparent neon outline */
.server-actions .btn-vote,
.server-item .btn-vote {
  background: transparent !important;
  color: #00ffff !important;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  border: 1px solid rgba(0, 255, 255, 0.25) !important;
  box-shadow: none !important;
}

.server-actions .btn-vote::before,
.server-item .btn-vote::before {
  content: none;
}

.server-actions .btn-vote:hover,
.server-item .btn-vote:hover {
  background: rgba(0, 255, 255, 0.08) !important;
  border-color: rgba(0, 255, 255, 0.5) !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15), inset 0 0 12px rgba(0, 255, 255, 0.05) !important;
  transform: none;
}

/* Server Description */
.server-description {
  color: #ccc;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Social buttons — transparent neon outline */
.server-actions a[title*="Discord"],
.server-actions a[title*="Facebook"],
.server-actions a[title*="Website"],
.server-actions a[title*="Visit"] {
  background: transparent !important;
  color: #00ffff !important;
  border: 1px solid rgba(0, 255, 255, 0.25) !important;
  box-shadow: none !important;
  transition: all 0.25s ease;
}

.server-actions a[title*="Discord"]:hover,
.server-actions a[title*="Facebook"]:hover,
.server-actions a[title*="Website"]:hover,
.server-actions a[title*="Visit"]:hover {
  background: rgba(0, 255, 255, 0.08) !important;
  border-color: rgba(0, 255, 255, 0.5) !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.15), inset 0 0 12px rgba(0, 255, 255, 0.05) !important;
  transform: none;
}

/* Banner hover effect */
.server-banner {
  transition: filter 0.3s ease;
}

.server-item:hover .server-banner,
.server-banner-link:hover .server-banner {
  filter: brightness(1.0) !important;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-page .widget {
    max-width: 100%;
    margin: 0 0.5rem;
  }
  
  .form-page .widget-header {
    padding: 1.5rem;
  }
  
  .form-page .widget-content {
    padding: 1.5rem;
  }
  
  .form-styled .btn-primary.btn-block {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .radio-options {
    gap: 0.5rem;
  }
  
  .radio-option {
    padding: 0.875rem 1rem;
  }
}

/* Dark mode support */
/* Dark mode is now the default — no separate media query needed */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .form-page .widget,
  .server-item,
  .server-badges .badge,
  .form-styled .btn-primary.btn-block,
  .server-actions .btn-vote {
    animation: none;
    transition: none;
  }
  
  .form-page .widget::before,
  .server-item::before,
  .server-item::after {
    animation: none;
  }
}

/* ============================================
   FORCE TRANSPARENT CONTAINER ON AUTH PAGES
   Must be at the end to override style.css
   ============================================ */
html body.auth-page .main-container,
html body.auth-page .container,
html body.auth-page .main-content,
html body .main-container:has(.form-page),
html body .container:has(.form-page),
html body main.main-content.form-page,
.container:has(.main-content.form-page),
.main-container:has(.main-content.form-page) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
