/* ========================================
   Figma Light Minimalistic Design
   ======================================== */

/* Root Variables */
:root {
  --transition-speed: 0.3s;
  --border-radius-large: 24px;
  --border-radius-medium: 12px;
  --shadow-glass: 0px 4px 94px rgba(0, 0, 0, 0.05);
  --cream: #FFF0D9;
  --light-bg: #F9F9F9;
  --glass-white: rgba(255, 255, 255, 0.58);
  --text-black: #1E1E1E;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Body Base Styling */
body {
  font-family: 'Pathway Extreme', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--light-bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Main Container */
.container {
  position: relative;
  z-index: 1;
}

/* Modern Card Styling */
.modern-card {
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) ease;
}

.modern-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 212, 255, 0.3);
}

/* Modern Input Fields */
.modern-input {
  background: rgba(26, 31, 58, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #e5e7eb;
  font-size: 14px;
  transition: all var(--transition-speed) ease;
  width: 100%;
}

.modern-input:focus {
  outline: none;
  border-color: #00d4ff;
  background: rgba(26, 31, 58, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.modern-input::placeholder {
  color: rgba(229, 231, 235, 0.4);
}

/* Modern Label */
.modern-label {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
}

/* Modern Button */
.modern-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed) ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.modern-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.modern-btn:hover::before {
  width: 300px;
  height: 300px;
}

.modern-btn span {
  position: relative;
  z-index: 1;
}

/* Primary Button */
.btn-primary {
  background: #00d4ff;
  color: #0a0e27;
}

.btn-primary:hover {
  background: #00b8e6;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

/* Success Button */
.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Secondary Button */
.btn-secondary {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
  border: 1px solid #8b5cf6;
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Modern Link */
.modern-link {
  color: #00d4ff;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  position: relative;
  font-weight: 500;
}

.modern-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: #00d4ff;
  transition: width var(--transition-speed) ease;
}

.modern-link:hover::after {
  width: 100%;
}

.modern-link:hover {
  color: #00b8e6;
}

/* Auth Code Display */
.code-display {
  background: rgba(26, 31, 58, 0.5);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 16px 24px;
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #00d4ff;
  text-align: center;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  transition: all var(--transition-speed) ease;
}

.code-display:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
  transform: scale(1.02);
}

/* Auth Item Card */
.auth-item {
  background: rgba(26, 31, 58, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.auth-item:hover {
  background: rgba(26, 31, 58, 0.8);
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateX(4px);
  box-shadow: -4px 0 0 #00d4ff, 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Icon Avatar */
.icon-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Progress Timer Bar */
.timer-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.timer-progress {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff 0%, #10b981 100%);
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  border-radius: 12px;
  padding: 12px 16px;
  color: #dc2626;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 14px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
  border-radius: 12px;
  padding: 12px 16px;
  color: #059669;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 14px;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid #3b82f6;
  border-radius: 12px;
  padding: 12px 16px;
  color: #2563eb;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 14px;
}

/* Header Title */
.page-title {
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 800;
  background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

/* QR Scanner Modal */
.qr-modal {
  backdrop-filter: blur(8px);
  background: rgba(249, 249, 249, 0.95);
}

.qr-video-container {
  border-radius: 12px;
  overflow: hidden;
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #00d4ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  .code-display {
    font-size: 24px;
    letter-spacing: 2px;
    padding: 12px 16px;
  }
  
  .auth-item {
    padding: 16px;
  }
  
  .icon-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 31, 58, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.7);
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid #00d4ff;
  outline-offset: 2px;
}

/* Disabled State */
.modern-btn:disabled,
.modern-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* No Select for certain elements */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Hide Scrollbar but keep functionality */
.scrollbar-hidden {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Additional Figma-specific buttons for add_auth page */
.figma-btn-scan {
  background: #0EC7C0;
  border: 3px solid #0EC7C0;
  border-radius: 16px;
  padding: 16px 24px;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.figma-btn-scan:hover {
  background: #0DB3A8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.figma-btn-cancel {
  background: #FFA7A7;
  border: 3px solid #FFA7A7;
  border-radius: 16px;
  padding: 16px 24px;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1E1E1E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.figma-btn-cancel:hover {
  background: #ff9090;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.figma-btn-camera {
  background: #FFD9F2;
  border: 3px solid #FFD9F2;
  border-radius: 16px;
  padding: 16px 24px;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1E1E1E;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.figma-btn-camera:hover {
  background: #ffc4e6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Figma Design Specific Styles
   ======================================== */

/* Glass Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0px 4px 94px rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  border: 3px solid #0EC7C0;
  transition: all 0.3s ease;
}

/* Top Navigation Bar */
.top-nav {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  height: 72px;
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

/* Desktop Navigation Buttons Container */
.nav-desktop-buttons {
  display: none;
  gap: 12px;
}

/* Mobile Menu Button */
.nav-menu-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 8px;
}

/* Mobile Icon Button */
.nav-icon-btn {
  background: #FFF0D9;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Desktop Styles - Hide Mobile, Show Desktop Nav */
@media (min-width: 768px) {
  .nav-desktop-buttons {
    display: flex;
    align-items: center;
  }
  
  .nav-menu-btn,
  .nav-icon-btn {
    display: none !important;
  }
  
  .app-title {
    position: static;
    transform: none;
  }
}

/* Mobile Styles - Center the title */
@media (max-width: 767px) {
  .app-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .nav-desktop-buttons {
    display: none;
  }
}

.nav-menu-btn:hover {
  background: rgba(255, 240, 217, 0.5);
}

.nav-menu-btn:active {
  transform: scale(0.95);
}

.nav-icon-btn:hover {
  background: #ffe8c2;
  transform: translateY(-1px);
}

.nav-icon-btn:active {
  transform: translateY(0);
}

/* Mobile Menu Dropdown */
.mobile-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid #FFF0D9;
}

.mobile-menu.menu-open {
  transform: translateY(0);
}

/* App Title Responsive */
.app-title {
  font-family: 'Piazzolla', serif;
  font-size: 20px;
  font-weight: 600;
  color: #1E1E1E;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.3s ease;
}

.app-title:hover {
  color: #4A4A4A;
}

@media (min-width: 768px) {
  .app-title {
    font-size: 24px;
  }
}

/* Search Bar */
.search-bar-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-bar {
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0px 4px 94px rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  border: 1px solid #FFF0D9;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  position: relative;
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  border-color: #D9D9D9;
  box-shadow: 0px 4px 94px rgba(0, 0, 0, 0.1);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Piazzolla', serif;
  font-size: 20px;
  font-weight: 500;
  color: #1E1E1E;
  width: 100%;
}

.search-input::placeholder {
  color: rgba(0, 0, 0, 0.2);
}

.search-icon {
  flex-shrink: 0;
}

.clear-search {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.clear-search:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1E1E1E;
}

.clear-search.hidden {
  display: none;
}

/* Figma Button Styles */
.figma-btn {
  padding: 8px 20px;
  border-radius: 16px;
  font-family: 'Play', sans-serif;
  font-size: 16px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .figma-btn {
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 18px;
    gap: 10px;
  }
}

.figma-btn-primary {
  background: #0EC7C0;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.figma-btn-primary:hover {
  background: #0DB3A8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.figma-btn-primary:active {
  transform: translateY(0);
}

.figma-btn-danger {
  background: #FFA7A7;
  color: #1E1E1E;
}

.figma-btn-danger:hover {
  background: #ff8f8f;
}

.figma-btn-pink {
  background: #FFD9F2;
  color: #1E1E1E;
  font-size: 10.75px;
  padding: 4.3px 12.9px;
  border-radius: 12.9px;
  gap: 6.45px;
}

/* Action Buttons */
.action-btn {
  padding: 10px 24px;
  background: #F0F0F0;
  border-radius: 12px;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  color: #315DCB;
  white-space: nowrap;
  min-width: 110px;
}

.action-btn:hover {
  background: #E0E0E0;
  transform: translateY(-1px);
}

.action-btn img {
  flex-shrink: 0;
}

.action-btn .copy-feedback {
  display: none;
}

.action-btn .copy-feedback:not(.hidden) {
  display: flex;
  align-items: center;
}

/* Code Display - Figma Style */
.figma-code {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 48px;
  font-weight: 600;
  color: #1E1E1E;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* Service Name */
.service-name {
  font-family: 'Piazzolla', serif;
  font-size: 24px;
  font-weight: 500;
  color: #1E1E1E;
  text-align: center;
  line-height: 1.3;
}

/* Red Indicator Dot */
.indicator-dot {
  width: 12px;
  height: 12px;
  background: #FF6B6B;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Auth Item Container - Figma Style */
.auth-item-figma {
  padding: 24px 0;
  border-bottom: 1px solid rgba(217, 217, 217, 0.3);
}

.auth-item-figma:first-child {
  padding-top: 0;
}

.auth-item-figma:last-child {
  border-bottom: none;
}

/* Circular Timer Progress */
.timer-circle-wrapper {
  width: 36px;
  height: 36px;
  position: relative;
}

.timer-circle {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: rgba(217, 217, 217, 0.3);
  stroke-width: 3;
}

.timer-circle-progress {
  fill: none;
  stroke: #0EC7C0;
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
  stroke-linecap: round;
}

/* Input Field - Figma Style */
.figma-input {
  padding: 12px 19px;
  border-radius: 24px;
  border: 1px solid #0EC7C0;
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1E1E1E;
  background: transparent;
  width: 100%;
  transition: all 0.3s ease;
}

.figma-input::placeholder {
  color: #B4B4B4;
}

.figma-input:focus {
  outline: none;
  border-color: #0EC7C0;
  border-width: 2px;
}

/* Label - Figma Style */
.figma-label {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1E1E1E;
  padding-left: 19px;
}

/* Helper Text */
.helper-text {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 8px;
  font-weight: 300;
  color: #B4B4B4;
  padding-left: 19px;
}

/* Tip Text */
.tip-text {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #1E1E1E;
  text-align: center;
}

/* Page Title - Figma Style */
.page-title-figma {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1E1E1E;
  text-align: center;
}

/* Page Subtitle */
.page-subtitle {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #1E1E1E;
  text-align: center;
}

/* App Title */
.app-title {
  font-family: 'Pathway Extreme', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #1E1E1E;
}

/* Responsive adjustments for Figma design */
@media (max-width: 768px) {
  .figma-code {
    font-size: 36px;
  }
  
  .service-name {
    font-size: 20px;
  }
  
  .action-btn {
    padding: 10px 24px;
    font-size: 18px;
  }
  
  .search-bar {
    padding: 12px 24px;
  }
}