:root {
  /* Dark‑mode color palette */
  --brand-color:    #8d6efc;   /* bright accent */
  --brand-hover:    #7a5de0;
  --bg-main:        #121212;   /* deep charcoal */
  --bg-secondary:   #121212;   /* slightly lighter */
  --bg-surface:     #272727;   /* cards, forms */
  --text-primary:   #e0e0e0;   /* light text */
  --text-secondary: #a0a0a0;   /* muted text */
  --border-color:   #3a3a3a;
  --radius:         8px;
  --transition:     0.3s;
  --spacing:        1.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
}

main {
  max-width: 1200px;
  margin: auto;
  padding: var(--spacing);
}

/* Header & Footer */
.site-header,
.site-footer {
  background-color: var(--bg-secondary);
  text-align: center;
  padding: 1rem 2rem;
}
.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Navbar & User Info */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.logo img {
  height: 160px;
  width: auto;
}
.user-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Hero Section */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-content {
  flex: 1;
  padding-right: 3rem;
}
.hero-content h1 {
  font-size: 3rem;
  margin: 0;
}
.hero-content p {
  color: var(--text-secondary);
}
.subtagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-style: italic;
  letter-spacing: 0.5px;
}
.hero-image {
  flex: 1;
  max-width: 480px;
}
.hero-image img {
  max-width: 100%;
  height: auto;
}

/* Upload Card */
.upload-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  max-width: 720px;
  margin: 3rem auto;
  box-shadow: 0 0 30px rgba(0,0,0,0.15);
}
.upload-card h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--text-primary);
}
.upload-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-fields {
  display: flex;
  gap: 1rem;
}
.form-fields input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
}
.form-fields input::placeholder {
  color: var(--text-secondary);
}
.custom-file-label {
  position: relative;
  display: block;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  transition: border var(--transition), background var(--transition);
}
.custom-file-label:hover,
.custom-file-label:focus {
  border-color: var(--brand-color);
  background: #1f1f1f;
  color: var(--text-primary);
}
.custom-file-label input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary {
  background: var(--brand-color);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand-hover);
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--bg-secondary);
  border-color: var(--brand-color);
  color: var(--brand-color);
  transform: translateY(-2px);
}
.btn-link {
  color: var(--brand-color);
  text-decoration: none;
}
.btn-link:hover,
.btn-link:focus {
  text-decoration: underline;
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  filter: brightness(0) invert(1);
}
.icon-google {
  width: 1.1rem;
  height: 1.1rem;
}

/* Profile Tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin: var(--spacing) 0;
}
.profile-tabs button {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition);
}
.profile-tabs button.active {
  color: var(--brand-color);
  border-bottom: 3px solid var(--brand-color);
}

/* Dashboard Card */
.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  max-width: 1000px;
  margin: 3rem auto;
  animation: fadeUp 0.6s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* User Summary */
.user-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.summary-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.summary-details h3 {
  margin: 0;
  font-size: 1.4rem;
}
.user-id {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* QR Card */
.qr-card {
  background: #fff;
  color: #000;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: var(--spacing);
}
.qr-card img {
  max-width: 160px;
  margin-bottom: 1rem;
}

/* Dashboard Actions */
.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.dashboard-actions .btn {
  flex: 1 1 200px;
  justify-content: center;
}

/* Enhanced Email Form */
.email-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
}
.email-input-wrapper {
  position: relative;
  flex: 1;
}
.email-input-wrapper input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  height: 44px;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1rem;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.email-input-wrapper input::placeholder {
  color: var(--text-secondary);
}
.email-input-wrapper input:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 2px var(--brand-color);
}
.email-input-wrapper::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  background: url('/media/at.svg') no-repeat center;
  background-size: contain;
  opacity: 0.6;
  pointer-events: none;
}
.email-form .btn {
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Manage / Edit Forms */
.action-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing);
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.8em 1.2em;
  background-color: var(--bg-surface);
  border-left: 4px solid var(--brand-color);
  color: var(--brand-color);
  font-weight: 500;
  border-radius: 6px;
  margin: 1.2em 0;
}

#flash-message {
  animation: fadeInOut 5.6s ease;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

.flash-message .icon {
  width: 20px;
  height: 20px;
}


@keyframes fadeInOut {
  0%,100% { opacity: 0; }
  10%,90% { opacity: 1; }
}

/* Profile Picture */
.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--spacing);
  border: 2px solid var(--border-color);
  cursor: pointer;
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-pic .edit-icon {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  background: #fff;
  padding: 0.25rem;
  border-radius: 50%;
}

/* Responsive */


/* NEW: Unified Input Field Styling */
/* Unified Input Field Style */
.input-field {
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  border-radius: var(--radius);
  width: 100%;
  font-size: 1rem;
}
.input-field::placeholder {
  color: var(--text-secondary);
}
.input-field:focus {
  outline: none;
  border-color: var(--brand-color);
  box-shadow: 0 0 0 2px var(--brand-color);
}


/* Section Label */
.profile-section-card label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  display: block;
}

/* Profile Section Card Form Layout */
.profile-section-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-section-card .button-group {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Row layout: input + button side by side */
.row-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.row-form .custom-file-label {
  flex: 1;
  margin: 0;
}
.row-form .btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}


/* === Upload Row Form === */
.upload-row-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  background: var(--bg-surface);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.upload-row-form label.custom-file-label {
  flex: 1;
  margin: 0;
  position: relative;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  color: var(--text-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  cursor: pointer;
}
.upload-row-form label.custom-file-label:hover {
  border-color: var(--brand-color);
  color: var(--text-primary);
}
.upload-row-form label input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-row-form button.btn {
  flex-shrink: 0;
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

/* Responsive fallback */
@media (max-width: 768px) {
  
 

 
  .hero { flex-direction: column; }
  .hero-image { margin-top: var(--spacing); }
  .upload-form,
  .action-form,
  .dashboard-actions { flex-direction: column; }

  .row-form {
    flex-direction: column;
    align-items: stretch;
  }

  
  .upload-row-form {
    flex-direction: column;
    align-items: stretch;
  }

  /* 1. Logo */
  .logo img {
    height: 80px;
  }

  /* 2. Hide resume preview */
  .resume-preview summary,
  .resume-preview iframe {
    display: none !important;
  }

  /* 3. Ensure download button */
  .dashboard-actions a[href^="/print"] {
    display: inline-flex;
  }

  /* 4. Optional: Bigger tap targets */
  .btn {
    padding: 1rem;
    font-size: 1.1rem;
  }
  .profile-tabs button {
    padding: 1rem 0.5rem;
    font-size: 1rem;
  }
}

.preview-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.preview-label a {
  color: var(--brand-color);
  text-decoration: underline;
}
.preview-label a:hover {
  color: var(--brand-hover);
}


.preview-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 0.5rem;
  border: 2px solid var(--border-color);
}

.preview-video {
  margin-top: 0.5rem;
  border-radius: var(--radius);
  max-width: 100%;
}


/* Profile Public Layout */
.profile-public {
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem;
}

/* Animated Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  animation: fadeUp 0.6s ease;
}

/* Photo */
.profile-header {
  text-align: center;
}
.profile-header .photo {
  width: 120px;
  height: 120px;
  margin: auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brand-color);
}
.profile-header .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.username {
  margin-top: 1rem;
  font-size: 1.8rem;
  color: var(--text-primary);
}

/* Section Titles */
.card-title {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--text-secondary);
  border-left: 4px solid var(--brand-color);
  padding-left: 0.5rem;
}

/* Action Links */
.action-links .btn {
  display: block;
  margin-bottom: 1rem;
  width: 100%;
  text-align: center;
}

/* Links */
.link-list {
  list-style: none;
  padding-left: 0;
}
.link-list li {
  margin-bottom: 0.8rem;
}
.link-list a {
  color: var(--brand-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.link-list a:hover {
  text-decoration: underline;
}

.profile-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 3rem;
}
/* Video Player */
.video-player {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}


/* Animation */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-gap: 2rem;
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: auto;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  animation: fadeUp 0.6s ease;
}

.full-width {
  grid-column: span 2;
}

.photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 2px solid var(--brand-color);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username {
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--brand-color);
  padding-left: 0.5rem;
  color: var(--text-secondary);
}

.video-player {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.link-list {
  list-style: none;
  padding-left: 0;
}
.link-list li {
  margin-bottom: 0.5rem;
}
.link-list a {
  color: var(--brand-color);
  text-decoration: none;
}
.link-list a:hover {
  text-decoration: underline;
}


.profile-footer {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.75;
}

.profile-public-final {
  max-width: 900px;
  margin: auto;
  padding: 2rem;
}

/* Banner Layout */
.profile-banner {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  background: #000;
}

.banner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  position: absolute;
  top: 0;
  left: 0;
}

.profile-info {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.profile-pic-frame {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid white;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.profile-pic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.8rem;
  color: var(--text-primary);
}


/* Logo Under Banner */
.logo-q {
  position: absolute;
  bottom: 0.8rem;
  right: 1rem;
  z-index: 2;
}
.logo-q img {
  height: 40px;
  opacity: 0.85;
}



/* Section Styles */
.profile-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--brand-color);
  border-left: 3px solid var(--brand-color);
  padding-left: 0.6rem;
}



/* Position name top-left over video */
.top-left-name {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  z-index: 2;
}

.top-left-name .profile-name {
  font-size: 1.6rem;
  font-weight: 600;
  background: rgba(0,0,0,0.6);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

/* Push profile photo bottom-left inside video */
.bottom-left-pic {
  position: absolute;
  bottom: 0.8rem;
  left: 1rem;
  z-index: 2;
}

/* Resume iframe cleanup */
.resume-preview iframe {
  width: 100%;
  max-height: 600px;
  height: 600px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: #fff;
}

/* Resume summary */
.resume-preview summary {
  margin-bottom: 1rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.2rem;
}

/* Reduce section spacing */
.profile-section.resume-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.profile-section + .profile-section {
  margin-top: 1.5rem;
}


.name-under-banner {
  text-align: center;
  margin-top: -40px;
  margin-bottom: 1rem;
}
.name-under-banner .profile-name {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #121212;
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}
.left-align-name {
  text-align: left;
  margin-left: 1rem;
  margin-top: -2.5rem;
}

.alias-url {
  text-align: center;
  font-weight: bold;
  margin-top: 0.5em;
  font-size: 1.1em;
  color: #8d6efc;
}

.alias-feedback {
  font-size: 0.85em;
  margin-top: 0.25em;
  display: inline-block;
  padding-left: 0.5rem;
}

.profile-section-card .upload-row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  align-items: center;
  margin-top: 0.5em;
}

.profile-section-card .upload-row-form input[type="text"] {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.alias-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--input-border, #444);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  background: #1e1e1e;
  max-width: 350px;
}

.alias-prefix {
  color: #aaa;
  font-size: 0.95em;
  font-weight: 500;
  white-space: nowrap;
}

.alias-input-wrapper input[type="text"] {
  border: none;
  background: transparent;
  color: var(--text-primary, #fff);
  font-size: 1em;
  width: 100%;
  outline: none;
}


.alias-line-left {
  text-align: left;
  margin-top: 0.8rem;
  margin-left: 0.5rem;
}
.alias-line-left .alias-url {
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand-color);
  text-decoration: underline;
}

