:root {
  --primary-bg: #0f0f23;
  --secondary-bg: #1a1a2e;
  --accent-purple: #ffc107;
  --accent-blue: #74b9ff;
  --accent-green: #00b894;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-color: #333;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 8px 32px rgba(108, 92, 231, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Simplified Background for Mobile */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #0f0f23, #1a1a2e);
}

/* Disable complex animations on mobile */
@media (max-width: 768px) {
  .bg-animation {
      background: #1a1a2e;
  }

  .bg-animation::before {
      display: none;
  }
}

@media (min-width: 769px) {
  .bg-animation {
      background-size: 400% 400%;
      animation: gradientShift 15s ease infinite;
  }

  .bg-animation::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: 
          radial-gradient(circle at 20% 80%, rgba(108, 92, 231, 0.2) 0%, transparent 50%),
          radial-gradient(circle at 80% 20%, rgba(116, 185, 255, 0.2) 0%, transparent 50%);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--accent-purple);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-purple);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-purple);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background: var(--accent-purple);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Main Container */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 70px;
}

.login-form {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 3.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-glow), 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 3.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-glow), 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow), 0 25px 80px rgba(0, 0, 0, 0.4);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-green));
  background-size: 200% 100%;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo i {
  font-size: 3rem;
  color: var(--accent-purple);
  margin-bottom: 1rem;
  display: block;
}

.logo h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.logo h1 + h2 {
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 1rem 0 0.5rem 0;
}

.login-links {
  text-align: center;
  margin-top: 1.5rem;
}

.login-links a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-links a:hover {
  color: var(--accent-blue);
}

.login-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.5);
  position: relative;
  overflow: hidden;
  animation: iconPulse 3s ease-in-out infinite;
}

.login-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  animation: shimmer 2s linear infinite;
}

.login-icon img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  z-index: 2;
  position: relative;
}

@keyframes iconPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.5);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(108, 92, 231, 0.7);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.login-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
}

/* Method Toggle */
.method-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.method-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.method-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.method-btn i {
  margin-right: 8px;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-input {
  width: 100%;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text-primary);
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: inherit;
  position: relative;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15), 0 8px 25px rgba(108, 92, 231, 0.1);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'Courier New', monospace;
}

.password-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--accent-purple);
}

.form-help {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 18px 28px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.5);
  background: linear-gradient(135deg, #7c4dff, #2196f3);
}

.submit-btn:active {
  transform: translateY(-1px);
  transition: all 0.1s ease;
}

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

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

.submit-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.submit-btn:active::after {
  width: 300px;
  height: 300px;
}

/* Security Notice */
.security-notice {
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 2rem;
  text-align: center;
}

.security-title {
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.security-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Footer */
.form-footer {
  text-align: center;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.form-footer a:hover {
  color: var(--accent-blue);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .navbar {
      padding: 0.8rem 1rem;
  }

  .nav-links {
      position: fixed;
      top: 70px;
      right: -100%;
      width: 100%;
      height: calc(100vh - 70px);
      background: rgba(15, 15, 35, 0.95);
      backdrop-filter: blur(20px);
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      padding: 2rem;
      gap: 1.5rem;
      transition: right 0.3s ease;
      border-left: 1px solid var(--border-color);
  }

  .nav-links.active {
      right: 0;
  }

  .nav-links a {
      font-size: 1.1rem;
      padding: 12px 24px;
      border-radius: 12px;
      width: 80%;
      text-align: center;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hamburger {
      display: flex;
  }

  .hamburger.active .bar:nth-child(1) {
      transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active .bar:nth-child(2) {
      opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
      transform: rotate(-45deg) translate(6px, -6px);
  }

  .login-container {
      padding: 0.5rem;
      margin-top: 70px;
      min-height: calc(100vh - 70px);
  }

  .login-card {
      padding: 1.5rem;
      border-radius: 16px;
      max-width: 95%;
      width: 100%;
      margin: 0 auto;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .login-icon {
      width: 70px;
      height: 70px;
      margin-bottom: 1.5rem;
  }

  .login-icon img {
      width: 65px;
      height: 65px;
  }

  .login-title {
      font-size: 1.5rem;
      margin-bottom: 0.5rem;
  }

  .login-subtitle {
      font-size: 0.9rem;
      margin-bottom: 1.5rem;
  }

  .form-input {
      padding: 14px 16px;
      font-size: 16px;
      border-radius: 10px;
  }

  .submit-btn {
      padding: 14px 20px;
      font-size: 1rem;
      border-radius: 10px;
      margin-bottom: 1rem;
  }

  .method-btn {
      padding: 10px 16px;
      font-size: 0.9rem;
  }

  .premium-stats-showcase {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      margin-top: 1.5rem;
  }

  .premium-stat-item {
      padding: 12px 8px;
  }

  .premium-stat-icon {
      font-size: 1.4rem;
      margin-bottom: 8px;
  }

  .premium-stat-number {
      font-size: 1.3rem;
  }

  .premium-stat-label {
      font-size: 0.7rem;
  }

  .security-notice {
      margin: 15px 0;
      padding: 12px;
  }

  .security-title {
      font-size: 0.9rem;
  }

  .security-text {
      font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .login-container {
      padding: 0.3rem;
  }

  .login-card {
      padding: 1.2rem 1rem;
      border-radius: 12px;
      max-width: 100%;
      margin: 0;
  }

  .login-icon {
      width: 60px;
      height: 60px;
      margin-bottom: 1rem;
  }

  .login-icon img {
      width: 55px;
      height: 55px;
  }

  .login-title {
      font-size: 1.3rem;
      margin-bottom: 0.3rem;
  }

  .login-subtitle {
      font-size: 0.8rem;
      margin-bottom: 1rem;
  }

  .form-input {
      padding: 12px 14px;
      font-size: 16px;
      border-radius: 8px;
  }

  .submit-btn {
      padding: 12px 18px;
      font-size: 0.95rem;
      border-radius: 8px;
  }

  .premium-stats-showcase {
      grid-template-columns: 1fr;
      gap: 8px;
      margin-top: 1rem;
  }

  .premium-stat-item {
      padding: 10px 6px;
  }

  .premium-stat-icon {
      font-size: 1.2rem;
      margin-bottom: 6px;
  }

  .premium-stat-number {
      font-size: 1.1rem;
  }

  .premium-stat-label {
      font-size: 0.65rem;
  }

  .form-group {
      margin-bottom: 1rem;
  }

  .form-label {
      font-size: 0.85rem;
      margin-bottom: 6px;
  }

  .security-notice {
      margin: 10px 0;
      padding: 10px;
  }
}

@media (max-width: 360px) {
  .login-card {
      padding: 1rem 0.8rem;
      border-radius: 10px;
  }

  .login-title {
      font-size: 1.2rem;
  }

  .form-input {
      padding: 10px 12px;
      font-size: 16px;
  }

  .submit-btn {
      padding: 10px 16px;
      font-size: 0.9rem;
  }

  .premium-user-count-number {
      font-size: 1.8rem;
  }

  .premium-user-count-label {
      font-size: 0.8rem;
  }
}

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading .submit-btn {
  background: linear-gradient(135deg, #666, #888);
}

/* Success State */
.success .submit-btn {
  background: linear-gradient(135deg, var(--accent-green), #00a085);
}

/* Floating Elements - Disabled on Mobile */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  display: none;
}

@media (min-width: 769px) {
  .floating-elements {
      display: block;
  }

  .floating-element {
      position: absolute;
      width: 6px;
      height: 6px;
      background: var(--accent-purple);
      border-radius: 50%;
      opacity: 0.3;
      animation: float 20s infinite linear;
  }

  .floating-element:nth-child(2) {
      background: var(--accent-blue);
      animation-delay: -5s;
      left: 20%;
  }

  .floating-element:nth-child(3) {
      background: var(--accent-green);
      animation-delay: -10s;
      left: 40%;
  }

  @keyframes float {
      0% {
          transform: translateY(100vh) rotate(0deg);
          opacity: 0;
      }
      10% {
          opacity: 0.3;
      }
      90% {
          opacity: 0.3;
      }
      100% {
          transform: translateY(-100px) rotate(360deg);
          opacity: 0;
      }
  }
}

/* Premium Statistics */
.premium-stats-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 2rem;
  text-align: center;
}

.premium-stat-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  transition: background 0.3s ease;
}

.premium-stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.premium-stat-icon {
  font-size: 2rem;
  color: var(--accent-blue);
  margin-bottom: 10px;
}

.premium-stat-number {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.premium-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Premium User Count */
.premium-user-count {
  text-align: center;
  margin-bottom: 1.5rem;
}

.premium-user-count-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-purple);
  display: block;
  line-height: 1.2;
}

.premium-user-count-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Token Input Specific Styles */
.token-input {
  font-family: 'Courier New', monospace !important;
  font-size: 12px !important;
  line-height: 1.4;
  word-break: break-all;
  resize: vertical;
  min-height: 100px;
}

/* Token Preview Styles */
.token-preview {
  margin-top: 15px;
  background: rgba(76, 201, 196, 0.1);
  border: 1px solid rgba(76, 201, 196, 0.3);
  border-radius: 12px;
  padding: 16px;
  animation: slideDown 0.3s ease-out;
}

.token-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.token-preview-content {
  display: grid;
  gap: 8px;
}

.token-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.token-info-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.token-info-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
}

.token-status-valid {
  color: var(--accent-green) !important;
}

.token-status-expired {
  color: #ff6b6b !important;
}

.token-status-invalid {
  color: #ffa500 !important;
}

.token-status-unknown {
  color: var(--text-secondary) !important;
}

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

/* Premium Features Showcase */
.premium-features-showcase {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
}

/* SweetAlert2 Dark Theme */
.swal-dark-theme {
  background: rgba(26, 26, 46, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
}

.premium-feature-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.premium-feature-icon {
  font-size: 2rem;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.premium-feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.premium-feature-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .premium-features-showcase {
      flex-direction: column;
      align-items: center;
      gap: 8px;
  }

  .premium-stats-showcase {
      grid-template-columns: 1fr;
      gap: 15px;
      margin-top: 30px;
  }

  .premium-stat-item {
      padding: 16px;
  }

  .premium-stat-icon {
      font-size: 1.6rem;
  }

  .premium-stat-number {
      font-size: 1.5rem;
  }

  @media (max-width: 480px) {
  .premium-stat-number {
      font-size: 1.5rem;
  }

  .premium-stats-showcase {
      grid-template-columns: 1fr;
      gap: 12px;
      margin-top: 25px;
  }

  .premium-stat-item {
      padding: 15px;
      border-radius: 12px;
  }

  .premium-stat-icon {
      font-size: 1.4rem;
      margin-bottom: 8px;
  }

  .premium-stat-number {
      font-size: 1.3rem;
  }

  .premium-stat-label {
      font-size: 0.8rem;
  }
}