/* Modern CSS Reset & General Styling */
:root {
  --bg-primary: #0a0813;
  --bg-card: rgba(20, 16, 38, 0.65);
  --border-glass: rgba(255, 255, 255, 0.07);
  --text-primary: #ffffff;
  --text-secondary: #a0a0ba;
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.4);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-danger: #ef4444;
  --accent-success: #10b981;
  --font-family-title: 'Outfit', 'Inter', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Stars and Glowing Spheres */
.stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px);
  background-size: 550px 550px, 350px 350px, 250px 250px;
  background-position: 0 0, 40px 60px, 130px 270px;
  opacity: 0.25;
  z-index: -2;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
}

.sphere-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-purple-glow), transparent 70%);
  top: 10%;
  left: 5%;
}

.sphere-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan-glow), transparent 70%);
  bottom: 10%;
  right: 5%;
}

/* Header & Footer */
.app-header {
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .app-header {
    padding: 1.5rem 1.5rem;
    justify-content: center;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-title);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.8rem;
  animation: float 3s ease-in-out infinite;
}

.accent-text {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Container */
.app-container {
  flex: 1;
  width: 1200px;
  max-width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  padding-bottom: 4rem;
}

@media (max-width: 992px) {
  .app-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
  }
}

/* Glassmorphism Card styling */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.5rem;
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.glass-card.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.card-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2.5rem;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-family-title);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  box-shadow: 0 0 10px var(--accent-purple-glow);
}

/* Form Controls & Inputs */
.card-content form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-group input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-family-body);
  transition: var(--transition-smooth);
  width: 100%;
  outline: none;
}

.input-group input:focus {
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

/* Floating Label Logic */
.input-group label {
  position: absolute;
  left: 1.2rem;
  top: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -0.65rem;
  left: 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 0.4rem;
  color: var(--accent-cyan);
  background: #110d24;
  border-radius: 4px;
}

.input-group.hidden {
  display: none;
}

/* OTP Group (Split Input + Button) */
.otp-group {
  flex-direction: row !important;
  gap: 1rem;
  align-items: center;
}

.otp-input-wrapper {
  position: relative;
  flex: 1;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-family-title);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px var(--accent-purple-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5), 0 0 10px rgba(6, 182, 212, 0.3);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-family-title);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-secondary);
}

/* Loader Spinner */
.loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

.loader.hidden {
  display: none;
}

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

/* Dashboard Panel (Logged In Details) */
.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-large {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: float 4s ease-in-out infinite;
}

#welcome-title {
  font-family: var(--font-family-title);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.dashboard-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.8rem;
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.btn-danger {
  width: 100%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-danger);
  border-radius: 12px;
  padding: 1.1rem;
  font-family: var(--font-family-title);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Smartphone Mock Simulator Section */
.simulator-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mock {
  width: 320px;
  height: 600px;
  border: 12px solid #222;
  border-radius: 40px;
  background: #000;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.phone-notch {
  width: 140px;
  height: 25px;
  background: #222;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #12101b;
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  position: relative;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 5;
}

.phone-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: 1rem;
  overflow: hidden;
}

.sim-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.sim-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.sim-placeholder h3 {
  font-family: var(--font-family-title);
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.sim-placeholder p {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* SMS Inbox & Bubble list */
.sms-inbox {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  padding: 0.5rem 0;
  justify-content: flex-start;
}

/* Custom Scrollbar for Phone Inbox */
.sms-inbox::-webkit-scrollbar {
  width: 4px;
}
.sms-inbox::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.sms-bubble {
  background: #1f1a3a;
  border-left: 3px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  animation: slideInUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sms-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sms-time {
  color: rgba(255, 255, 255, 0.3);
}

.sms-content {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.sms-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.sms-code-display {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

.btn-sms-copy {
  background: var(--accent-cyan);
  border: none;
  border-radius: 6px;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-sms-copy:hover {
  background: #00ffd5;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* Toast Notifications styling */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.toast {
  background: rgba(18, 14, 33, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: #fff;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateX(-120%);
  animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.success {
  border-left: 4px solid var(--accent-success);
}

.toast.error {
  border-left: 4px solid var(--accent-danger);
}

.toast.info {
  border-left: 4px solid var(--accent-purple);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  to { transform: translateX(0); }
}

.toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to {
    transform: translateX(-120%);
    opacity: 0;
  }
}

/* Footer structure */
.app-footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: auto;
}
