/* ===== CSS Variables ===== */
:root {
  --bg: #121212;
  --bg-secondary: #1e1e1e;
  --txt: #f5f5f5;
  --txt-secondary: #bbb;
  --accent: #3354ff;
  --accent-hover: #4a6aff;
  --grad-start: #3354ff;
  --grad-end: #2033b3;
  --card: #1e1e1e;
  --div: #333;
  --success: #4caf50;
  --error: #f44336;
  --warning: #ff9800;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 20px rgba(0,0,0,0.4);
  --shadow-xl: 0 12px 28px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

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

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

/* ===== Utility Classes ===== */
.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.fade-in-up {
  animation: fadeInUp var(--transition-slow) ease-out;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* ===== Navigation ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--div);
  transition: all var(--transition-base);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--txt) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-links a {
  color: var(--txt);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.active {
  color: var(--accent);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--txt);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  transition: color var(--transition-fast);
}

.mobile-menu-btn:hover {
  color: var(--accent);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-xl);
  transition: right var(--transition-base);
  z-index: 2000;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--div);
}

.mobile-menu-header .nav-logo {
  background: linear-gradient(135deg, var(--txt) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--txt);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  gap: var(--space-lg);
}

.mobile-menu-links a {
  color: var(--txt);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  color: var(--accent);
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 1500;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: translateX(0);
}

/* ===== Forms ===== */
.form-group {
  position: relative;
  margin-bottom: var(--space-xl);
}

.form-label {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  color: var(--txt-secondary);
  font-weight: 600;
  transition: all var(--transition-fast);
  pointer-events: none;
  background: var(--bg-secondary);
  padding: 0 var(--space-xs);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-md);
  background: transparent;
  border: 2px solid var(--div);
  border-radius: 8px;
  color: var(--txt);
  font-size: 1rem;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label,
.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label {
  top: -10px;
  left: 10px;
  font-size: 0.875rem;
  color: var(--accent);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-xs);
  display: none;
}

.form-group.error .form-input,
.form-group.error .form-textarea {
  border-color: var(--error);
}

.form-group.error .form-error {
  display: block;
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--div);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* ===== Footer ===== */
footer {
  margin-top: auto;
  padding: var(--space-2xl) var(--space-lg);
  border-top: 1px solid var(--div);
  text-align: center;
  background: var(--bg-secondary);
}

footer p {
  margin-bottom: var(--space-lg);
  color: var(--txt-secondary);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.foot-nav a {
  color: var(--txt);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
  position: relative;
}

.foot-nav a:hover {
  color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .container {
    padding: var(--space-lg) var(--space-md);
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
} 