@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  
  --bg-color: #030308;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.4);
  
  --color-accent: #00e5ff;
  --color-purple: #bd00ff;
  --color-glow: rgba(0, 229, 255, 0.15);
  
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.25s ease;
}

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

html {
  background-color: var(--bg-color);
}

body {
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: transparent;
}

/* Background Canvas */
#galaxy-canvas {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at center, #0a0a23 0%, #030308 100%);
}

#nebula-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 25%, rgba(189, 0, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(0, 229, 255, 0.04) 0%, transparent 50%);
  filter: blur(40px);
}

/* Main Container */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Navigation Bar */
.contact-nav {
  position: sticky;
  top: 0;
  padding: 1rem 0;
  margin-bottom: 2.5rem;
  z-index: 100;
  background: rgba(3, 3, 8, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.back-link svg {
  fill: currentColor;
  transition: var(--transition-fast);
}

.back-link:hover {
  color: var(--color-accent);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* Header */
.contact-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-header h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 2.5rem;
  letter-spacing: 0.25em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Main Content & Form Card */
.contact-main {
  display: flex;
  justify-content: center;
  width: 100%;
}

.contact-card {
  width: 100%;
  background: rgba(10, 10, 22, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(189, 0, 255, 0.05),
    0 0 60px rgba(0, 229, 255, 0.03);
  transition: var(--transition-smooth);
}

.contact-card:hover {
  border-color: rgba(0, 229, 255, 0.15);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(189, 0, 255, 0.1),
    0 0 60px rgba(0, 229, 255, 0.06);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  background: rgba(3, 3, 8, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  background: rgba(3, 3, 8, 0.8);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Submit Button */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-purple));
  border: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.2);
  margin-top: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 25px rgba(0, 229, 255, 0.35),
    0 0 15px rgba(189, 0, 255, 0.2);
}

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

.submit-btn svg {
  fill: currentColor;
  transition: var(--transition-fast);
}

.submit-btn:hover svg {
  transform: translateX(4px) scale(1.1);
}

/* Button Loading State */
.submit-btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.submit-btn.loading svg {
  animation: spin 1s linear infinite;
}

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

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(3, 3, 8, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background: rgba(10, 10, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(0, 229, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
}

.modal-icon.success {
  background: rgba(0, 229, 255, 0.1);
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.modal-icon.error {
  background: rgba(255, 0, 85, 0.1);
  border: 2px solid #ff0055;
  color: #ff0055;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.15);
}

.modal-icon svg {
  fill: currentColor;
}

.modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.modal-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.subject-tag {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  display: inline-block;
  margin-bottom: 1.8rem;
  text-transform: uppercase;
}

.modal-btn {
  display: inline-block;
  width: 100%;
  padding: 0.9rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Footer styling */
.contact-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  padding: 3rem 1.5rem 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 4rem;
}

.footer-mail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-decoration: none;
}

.footer-mail-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.footer-mail-link:hover,
.footer-mail-link.active {
  color: var(--color-accent);
  transform: translateY(-3px) scale(1.15);
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.6));
}

/* Mobile Breakpoints */
@media (max-width: 600px) {
  .contact-container {
    padding: 1.5rem 1rem 3rem 1rem;
  }
  
  .contact-header h1 {
    font-size: 2rem;
  }
  
  .contact-card {
    padding: 1.8rem 1.2rem;
  }
  
  .submit-btn {
    width: 100%;
  }
}
