/* ============================================
   TECHVYRO PREMIUM COMMON STYLES
   Import this in all pages for consistent look
   ============================================ */

/* ============ CSS VARIABLES ============ */
:root {
  --bg-dark: #020617;
  --card-bg: rgba(20, 26, 46, 0.6);
  --blue: #3b82f6;
  --blue-glow: rgba(59,130,246,0.35);
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --text-main: #e5e7eb;
  --text-muted: #9aa0b4;
  --border: rgba(255,255,255,0.08);
  --error: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
}

body.light-mode {
  --bg-dark: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.9);
  --blue: #2563eb;
  --blue-glow: rgba(37,99,235,0.35);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: rgba(0,0,0,0.1);
}

/* ============ BASE RESET ============ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ PAGE LOADER ============ */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ============ THEME TOGGLE ============ */
.theme-toggle-fixed {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  z-index: 999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.theme-toggle-fixed:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px var(--blue-glow);
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: white;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.5);
}

/* ============ LIVE USERS BADGE ============ */
.live-users-badge {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.live-users-badge .pulse {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* ============ BUTTON STYLES ============ */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--blue-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ============ RIPPLE EFFECT ============ */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}

.ripple-btn:active::after {
  transform: scale(0);
  opacity: 0.3;
  transition: 0s;
}

/* ============ CARD STYLES ============ */
.premium-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

.premium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  border-color: rgba(59,130,246,0.3);
}

/* ============ 3D CARD HOVER ============ */
.card-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(10px);
}

/* ============ GRADIENT TEXT ============ */
.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ GLOW EFFECTS ============ */
.glow-blue {
  box-shadow: 0 0 20px var(--blue-glow);
}

.glow-text {
  text-shadow: 0 0 20px var(--blue-glow);
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slide-in {
  animation: slideIn 0.5s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}

.toast.warning {
  border-color: var(--warning);
}

/* ============ INPUT STYLES ============ */
.premium-input {
  width: 100%;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.premium-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
}

body.light-mode .premium-input {
  background: rgba(255,255,255,0.8);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--purple);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .theme-toggle-fixed,
  .back-to-top {
    width: 44px;
    height: 44px;
    right: 20px;
    font-size: 20px;
  }
  
  .back-to-top {
    bottom: 80px;
  }
  
  .theme-toggle-fixed {
    bottom: 20px;
  }
  
  .live-users-badge {
    left: 20px;
    bottom: 20px;
    padding: 10px 16px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .live-users-badge {
    display: none;
  }
}

/* ============ HEADER STYLES ============ */
.premium-header {
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

body.light-mode .premium-header {
  background: rgba(248, 250, 252, 0.95);
}

.premium-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.premium-header .logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.premium-header .logo span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.premium-header .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.premium-header .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.premium-header .nav-links a:hover {
  color: var(--blue);
}

/* ============ CREDITS BADGE ============ */
.credits-badge {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============ FOOTER STYLES ============ */
.premium-footer {
  background: linear-gradient(180deg, var(--bg-dark) 0%, rgba(2,6,23,0.98) 100%);
  border-top: 1px solid var(--border);
  padding: 40px 24px 30px;
  text-align: center;
}

.premium-footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--purple), var(--cyan), transparent);
  margin-bottom: 30px;
}

.premium-footer p {
  color: var(--text-muted);
  font-size: 14px;
}

.premium-footer a {
  color: var(--blue);
  text-decoration: none;
}

.premium-footer a:hover {
  text-decoration: underline;
}
