
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-gradient-start: #f8f9fa;
  --bg-gradient-end: #e9ecef;
  --accent-gradient-1: #94a3b8;
  --accent-gradient-2: #64748b;
  --accent-gradient-3: #475569;
  --accent-gradient-4: #94a3b8;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(148, 163, 184, 0.15);
  --shadow-glow: 0 8px 32px 0 rgba(148, 163, 184, 0.2);
}

body.dark-mode {
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(148, 163, 184, 0.2);
  --shadow-glow: 0 8px 32px 0 rgba(148, 163, 184, 0.3);
}

body:not(.dark-mode) {
  --bg-gradient-start: #f8f9fa;
  --bg-gradient-end: #e9ecef;
}

html, body {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-primary);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.08) 0%, transparent 50%);
  animation: rotate 30s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 40px;
  margin-bottom: 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-glow);
  animation: slideDown 0.6s ease-out;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(148, 163, 184, 0.5));
  animation: pulse 3s ease-in-out infinite;
}

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

.logo-text {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.discord-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.discord-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.discord-btn:hover::before {
  left: 100%;
}

.add-server {
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-2));
  box-shadow: 0 4px 15px rgba(148, 163, 184, 0.4);
}

.add-server:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(148, 163, 184, 0.6);
}

.support-server {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.4);
}

.support-server:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(100, 116, 139, 0.6);
}

.theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 15px rgba(148, 163, 184, 0.3);
}

.hero {
  text-align: center;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-gradient-3), var(--accent-gradient-4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 0 40px rgba(148, 163, 184, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
}

.bypass-box {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow-glow);
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.bypass-box::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent-gradient-1), var(--accent-gradient-2), var(--accent-gradient-3), var(--accent-gradient-4));
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.bypass-box:hover::before {
  opacity: 0.3;
}

#urlInput {
  width: 100%;
  padding: 20px 24px;
  font-size: 17px;
  font-family: 'Inter', sans-serif;
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

#urlInput:focus {
  outline: none;
  border-color: var(--accent-gradient-1);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.button-group button {
  padding: 18px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: white;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.button-group button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.button-group button:hover::before {
  width: 300px;
  height: 300px;
}

#bypassBtn {
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-2));
  box-shadow: 0 4px 20px rgba(148, 163, 184, 0.4);
}

#bypassBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(148, 163, 184, 0.6);
}

#bypassBtn:active {
  transform: translateY(-1px);
}

#bypassBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

#pasteBtn {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 4px 20px rgba(100, 116, 139, 0.4);
}

#pasteBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(100, 116, 139, 0.6);
}

#pasteBtn:active {
  transform: translateY(-1px);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-gradient-1);
}

.supported-section {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 50px;
  box-shadow: var(--shadow-glow);
  max-width: 900px;
  margin: 50px auto;
  animation: fadeInUp 1.2s ease-out 0.6s both;
}

.supported-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}

.supported-header h2 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-2));
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(148, 163, 184, 0.3);
}

.supported-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.bypass-tag {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.bypass-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.3), transparent);
  transition: left 0.5s;
}

.bypass-tag:hover::before {
  left: 100%;
}

.bypass-tag:hover {
  border-color: var(--accent-gradient-1);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.2), rgba(100, 116, 139, 0.2));
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 20px rgba(148, 163, 184, 0.3);
}

.loading-text {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 30px;
  font-weight: 500;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.popup-content {
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  padding: 45px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.popup-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.popup-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #10b981;
}

.success-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(148, 163, 184, 0.4);
}

.error-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ef4444;
}

.error-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.result-item label {
  display: block;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-size: 15px;
}

.url-box {
  display: flex;
  gap: 12px;
}

.url-box input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.copy-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-gradient-1), var(--accent-gradient-2));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(148, 163, 184, 0.3);
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(148, 163, 184, 0.5);
}

.time-value {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 600;
}

.error-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-weight: 500;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.1);
  border-top: 5px solid var(--accent-gradient-1);
  border-radius: 50%;
  margin: 0 auto 25px;
  animation: spin 1s linear infinite;
}

#loadingPopup p {
  color: var(--text-secondary);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 20px;
    padding: 25px;
  }
  
  .header-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .discord-btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .bypass-box, .supported-section {
    padding: 30px;
    border-radius: 25px;
  }
  
  .button-group {
    grid-template-columns: 1fr;
  }
  
  .url-box {
    flex-direction: column;
  }
  
  .copy-btn {
    width: 100%;
  }
  
  .popup-content {
    padding: 30px;
    border-radius: 25px;
  }
  
  .supported-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
