/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #00ffff;
  --primary-dark: #00cccc;
  --secondary: #0066ff;
  --dark-bg: #000000;
  --dark-card: rgba(10, 10, 30, 0.9);
  --text: #ffffff;
  --text-muted: #88ffff;
  --success: #00ff88;
  --warning: #ffaa00;
  --danger: #ff5555;
  --border: rgba(0, 255, 255, 0.3);
  --shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

body {
  font-family: 'Orbitron', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #000000 0%, #0a0a2a 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(0, 255, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(0, 102, 255, 0.1) 0%, transparent 20%);
  animation: float 20s infinite linear;
}

.glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  animation: glowMove 15s infinite alternate ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-50px, -50px) rotate(360deg); }
}

@keyframes glowMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  color: var(--primary);
  font-size: 18px;
  animation: pulse 2s infinite;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 255, 255, 0.1), transparent);
  animation: shine 3s infinite;
}

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

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo i {
  font-size: 40px;
  color: var(--primary);
  animation: pulse 2s infinite;
}

.logo h1 {
  font-size: 28px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.version {
  display: inline-block;
  background: var(--primary);
  color: var(--dark-bg);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

/* Card */
.card {
  background: var(--dark-card);
  border-radius: 20px;
  border: 2px solid var(--border);
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-header {
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.1), rgba(0, 102, 255, 0.1));
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  color: var(--primary);
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 5px;
}

.card-body {
  padding: 25px;
}

/* Form Groups */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--primary);
}

.form-group label i {
  font-size: 18px;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.country-select {
  flex: 0 0 200px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

.country-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

input[type="tel"],
input[type="email"] {
  flex: 1;
  padding: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  transition: all 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  opacity: 0.8;
}

/* Radio Group */
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.radio-option {
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
}

.radio-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.radio-content i {
  font-size: 24px;
  color: var(--primary);
}

.radio-option input:checked + .radio-content {
  background: rgba(0, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin: 10px 0;
}

.preview-btn {
  background: rgba(0, 102, 255, 0.2);
  color: var(--primary);
  border: 2px solid var(--secondary);
}

.preview-btn:hover {
  background: rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 102, 255, 0.4);
}

.generate-btn {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: var(--dark-bg);
  border: none;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 255, 255, 0.5);
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-item i {
  color: var(--success);
  font-size: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--dark-card);
  border-radius: 20px;
  border: 2px solid var(--primary);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlide 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 255, 255, 0.1);
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 30px;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--primary);
}

.modal-body {
  padding: 20px;
}

.message-preview {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.copy-btn, .email-btn {
  flex: 1;
  padding: 12px;
}

.copy-btn {
  background: rgba(0, 255, 136, 0.1);
  color: var(--success);
  border: 2px solid var(--success);
}

.copy-btn:hover {
  background: rgba(0, 255, 136, 0.3);
}

.email-btn {
  background: rgba(255, 170, 0, 0.1);
  color: var(--warning);
  border: 2px solid var(--warning);
}

.email-btn:hover {
  background: rgba(255, 170, 0, 0.3);
}

/* Instructions */
.instructions {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 15px;
  border-left: 4px solid var(--primary);
  margin-bottom: 30px;
}

.instructions h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  margin-bottom: 15px;
}

.instructions ol {
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 10px;
  line-height: 1.5;
}

.instructions code {
  background: rgba(0, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--primary);
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  padding: 30px;
  margin-top: 40px;
  border-top: 2px solid var(--border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  margin-bottom: 10px;
}

.footer-section p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.community-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
background: rgb(0,0,128);
background: linear-gradient(159deg, rgba(0,0,128,1) 0%, rgba(0,191,255,1) 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  margin-top: 10px;
}

.community-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.credits {
  margin-top: 10px;
  opacity: 0.8;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background: var(--dark-card);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1001;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .logo h1 {
    font-size: 22px;
  }
  
  .radio-group {
    grid-template-columns: 1fr;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .stats {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    text-align: center;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .country-select {
    width: 100%;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
}