/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #1a1f2e 0%, #1e2838 50%, #1a2530 100%);
  min-height: 100vh;
  color: #f5f5f5;
  direction: rtl;
  overflow-x: hidden;
}

/* Container */
.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

/* Animated background elements */
.bg-elements {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-circle {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(80px);
  animation: pulse 4s ease-in-out infinite;
}

.bg-circle-1 {
  top: 25%;
  right: 25%;
  background: rgba(0, 255, 0, 0.1);
}

.bg-circle-2 {
  bottom: 25%;
  left: 25%;
  background: rgba(0, 102, 204, 0.1);
  animation-delay: 1s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Glass card */
.glass-card {
  background: rgba(32, 38, 50, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 28rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3), 0 0 20px rgba(0, 102, 204, 0.2), inset 0 0 10px rgba(0, 255, 0, 0.1), 0 8px
    32px 0 rgba(0, 255, 0, 0.1);
  animation: fadeIn 0.6s ease-out;
}

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

/* Logo */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.success-card .logo-container {
  margin-top: -3rem; /* move logo up */
  margin-bottom: 1.5rem; /* optional: keep spacing tighter */
}

.logo {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.2));
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.4));
  }
}

/* Title section */
.title-section {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.875rem;
  color: #b0b0b0;
  line-height: 1.5;
}

/* Form styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f5f5f5;
}

.form-input {
  width: 100%;
  height: 3rem;            
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
  border: 1px solid rgba(0, 255, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  font-size: 1rem;
  font-family: "Vazirmatn", sans-serif;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;  
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 0, 0.4);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .form-input {
  padding-right: 3rem; 
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%); 
  width: 2rem;
  height: 2rem;
  border: none;
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.toggle-password:hover {
  box-shadow: 0 0 10px rgba(0,255,0,0.4);
}

.eye-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.hidden {
  display: none;
}


/* Error message box */
.error-message {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  color: #ff6666;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, #00ff00 0%, #00cc00 100%);
  color: #1a1f2e;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  height: 3rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Vazirmatn", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  margin: 0 auto;
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.5), 0 0 40px rgba(0, 255, 0, 0.3), 0 0 60px rgba(0, 255, 0, 0.2);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Center button in success page */
.btn-center {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-center .btn-primary {
  width: auto;
  padding: 0.75rem 2rem;
}

/* Decorative glows */
.decorative-glow {
  position: absolute;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.decorative-glow-top {
  top: -0.25rem;
  right: -0.25rem;
  background: rgba(0, 255, 0, 0.2);
}

.decorative-glow-bottom {
  bottom: -0.25rem;
  left: -0.25rem;
  background: rgba(0, 102, 204, 0.2);
}

/* Success page specific styles */
.success-card {
  animation: scaleIn 0.7s ease-out;
}

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

.success-icon-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.success-icon {
  width: 6rem;
  height: 6rem;
  color: #00ff00;
  filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.5));
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Meeting link box */
.meeting-link-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 0, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.meeting-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #b0b0b0;
  margin-bottom: 0.75rem;
}

.link-container {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.meeting-link-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #00ff00;
  font-family: "Courier New", monospace;
  outline: none;
  user-select: all;
  -webkit-user-select: all;
  -moz-user-select: all;
}

.copy-btn {
  background: rgba(0, 255, 0, 0.15);
  border: 1px solid rgba(0, 255, 0, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #00ff00;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(0, 255, 0, 0.25);
  border-color: rgba(0, 255, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-icon {
  width: 1rem;
  height: 1rem;
}

.copy-feedback {
  display: none;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.3);
  border-radius: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #00ff00;
  animation: fadeInOut 2s ease-out;
}

.copy-feedback.error {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.3);
  color: #ff6666;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ========================================= */
/* NEW: Room Statistics Box */
/* ========================================= */
.room-stats-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 0, 0.15);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #b0b0b0;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff00;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.stat-warning {
  color: #ffaa00;
  text-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

/* ========================================= */
/* NEW: Cleanup Buttons Container */
/* ========================================= */
.cleanup-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Base cleanup button style */
.btn-cleanup {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  height: 3rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: "Vazirmatn", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-cleanup:hover {
  transform: translateY(-2px);
}

.btn-cleanup:active {
  transform: translateY(0);
}

/* Cleanup old rooms button (yellow/orange theme) */
.btn-cleanup-old {
  border-color: rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

.btn-cleanup-old:hover {
  background: rgba(255, 170, 0, 0.1);
  border-color: rgba(255, 170, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.3), 0 0 30px rgba(255, 170, 0, 0.15);
}

/* Delete all rooms button (red theme) */
.btn-cleanup-all {
  border-color: rgba(255, 0, 0, 0.3);
  color: #ff6666;
}

.btn-cleanup-all:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.3), 0 0 30px rgba(255, 0, 0, 0.15);
}

/* Icon inside cleanup buttons */
.cleanup-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

/* ========================================= */
/* NEW: Cleanup Feedback Messages */
/* ========================================= */
.cleanup-feedback {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slideInFade 0.3s ease-out;
}

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

.cleanup-feedback.success {
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.3);
  color: #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.cleanup-feedback.error {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #ff6666;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

/* Responsive design */
@media (min-width: 768px) {
  .glass-card {
    padding: 3rem;
  }

  .logo {
    width: 180px;
  }
}

@media (max-width: 640px) {
  .title {
    font-size: 1.5rem;
  }

  .glass-card {
    padding: 2rem 1.5rem;
  }

  .link-container {
    flex-direction: column;
  }

  .copy-btn {
    justify-content: center;
  }

  .logo {
    width: 120px;
  }

  /* Stack statistics vertically on mobile */
  .room-stats-box {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .stat-label {
    text-align: right;
  }

  /* Smaller buttons on mobile */
  .btn-cleanup {
    font-size: 0.8rem;
    padding: 0.65rem 0.85rem;
  }

  .cleanup-icon {
    width: 0.9rem;
    height: 0.9rem;
  }
}

