/* ========================================
   DESIGN TOKENS & CSS VARIABLES
   ======================================== */

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

:root {
  /* Spacing Scale */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.5rem;
  /* 24px */
  --space-6: 2rem;
  /* 32px */
  --space-7: 2.5rem;
  /* 40px */
  --space-8: 3rem;
  /* 48px */

  /* Shadow Depth Tokens */
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.18);
  --shadow-elevated: 0 24px 55px rgba(0, 0, 0, 0.22);

  /* Animation Timing */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.3s ease-out;
  --transition-slow: 0.6s ease-out;

  /* Typography Scale */
  --font-xs: 0.75rem;
  /* 12px */
  --font-sm: 0.875rem;
  /* 14px */
  --font-base: 0.9375rem;
  /* 15px */
  --font-md: 1rem;
  /* 16px */
  --font-lg: 1.125rem;
  /* 18px */
  --font-xl: 1.5rem;
  /* 24px */
  --font-2xl: 1.75rem;
  /* 28px */
  --font-3xl: 2.25rem;
  /* 36px */

  /* Default theme: Midnight */
  --bg-color: #050816;
  --bg-gradient: radial-gradient(circle at top right, #2f80ed, #050816);
  --card-bg: rgba(15, 23, 42, 0.85);
  --card-border: rgba(148, 163, 184, 0.4);
  --text-color: #e5e7eb;
  --muted-text: #9ca3af;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-hover: #fb923c;

  /* Layout */
  --radius-card: 20px;
  --radius-pill: 999px;
  --radius-input: 10px;

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-rounded: ui-rounded, 'SF Pro Rounded', 'Hiragino Sans', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

/* ========================================
   THEME PRESETS
   ======================================== */

/* Theme: Minimal Light */
.theme-minimal-light {
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(148, 163, 184, 0.3);
  --text-color: #1e293b;
  --muted-text: #64748b;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-hover: #2563eb;
  --input-bg: #ffffff;
  --shadow-soft: 0 4px 12px rgba(148, 163, 184, 0.15);
  --shadow-medium: 0 8px 24px rgba(148, 163, 184, 0.2);
  --shadow-strong: 0 18px 45px rgba(148, 163, 184, 0.3);
  --shadow-elevated: 0 24px 55px rgba(148, 163, 184, 0.4);
}

/* Theme: Midnight (default) */
.theme-midnight {
  --bg-color: #050816;
  --bg-gradient: radial-gradient(circle at top right, #2f80ed, #050816);
  --card-bg: rgba(15, 23, 42, 0.85);
  --card-border: rgba(148, 163, 184, 0.4);
  --text-color: #e5e7eb;
  --muted-text: #9ca3af;
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-hover: #fb923c;
  --input-bg: rgba(15, 23, 42, 0.6);
}

/* Theme: Blush Pastel */
.theme-blush-pastel {
  --bg-color: #fff5f7;
  --bg-gradient: linear-gradient(135deg, #fff5f7 0%, #ffe4e9 50%, #ffd1dc 100%);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(251, 207, 232, 0.5);
  --text-color: #831843;
  --muted-text: #be185d;
  --accent: #ec4899;
  --accent-soft: rgba(236, 72, 153, 0.1);
  --accent-hover: #db2777;
  --input-bg: #ffffff;
  --shadow-soft: 0 4px 12px rgba(251, 207, 232, 0.2);
  --shadow-medium: 0 8px 24px rgba(251, 207, 232, 0.3);
  --shadow-strong: 0 18px 45px rgba(251, 207, 232, 0.4);
  --shadow-elevated: 0 24px 55px rgba(251, 207, 232, 0.5);
}

/* Theme: Neo Mint */
.theme-neo-mint {
  --bg-color: #f7fcfa;
  --bg-gradient: linear-gradient(135deg, #f7fcfa 0%, #f0faf6 50%, #e8f5f0 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(200, 230, 218, 0.35);
  --text-color: #1e4d3b;
  --muted-text: #4a7c66;
  --accent: #5fad92;
  --accent-soft: rgba(95, 173, 146, 0.08);
  --accent-hover: #4a9178;
  --input-bg: #ffffff;
  --shadow-soft: 0 4px 12px rgba(200, 230, 218, 0.15);
  --shadow-medium: 0 8px 24px rgba(200, 230, 218, 0.2);
  --shadow-strong: 0 18px 45px rgba(200, 230, 218, 0.25);
  --shadow-elevated: 0 24px 55px rgba(200, 230, 218, 0.3);
}

/* Theme: Warm Sunset */
.theme-warm-sunset {
  --bg-color: #faf9f7;
  --bg-gradient: linear-gradient(135deg, #faf9f7 0%, #f5f3ef 50%, #ede8e0 100%);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(200, 190, 180, 0.3);
  --text-color: #2d2520;
  --muted-text: #6b635a;
  --accent: #c17a5c;
  --accent-soft: rgba(193, 122, 92, 0.1);
  --accent-hover: #a66648;
  --input-bg: #ffffff;
  --shadow-soft: 0 4px 12px rgba(200, 190, 180, 0.12);
  --shadow-medium: 0 8px 24px rgba(200, 190, 180, 0.18);
  --shadow-strong: 0 18px 45px rgba(200, 190, 180, 0.25);
  --shadow-elevated: 0 24px 55px rgba(200, 190, 180, 0.35);
}

/* Theme: Royal Purple (NEW) */
.theme-royal-purple {
  --bg-color: #1a0a2e;
  --bg-gradient: radial-gradient(circle at top left, #6c2bd9, #1a0a2e);
  --card-bg: rgba(42, 20, 82, 0.85);
  --card-border: rgba(156, 99, 245, 0.35);
  --text-color: #f3e5ff;
  --muted-text: #c4a3e8;
  --accent: #9d4edd;
  --accent-soft: rgba(157, 78, 221, 0.15);
  --accent-hover: #b16cea;
  --input-bg: rgba(42, 20, 82, 0.6);
  --shadow-soft: 0 4px 12px rgba(108, 43, 217, 0.2);
  --shadow-medium: 0 8px 24px rgba(108, 43, 217, 0.3);
  --shadow-strong: 0 18px 45px rgba(108, 43, 217, 0.4);
  --shadow-elevated: 0 24px 55px rgba(108, 43, 217, 0.5);
}

/* Theme: Ice Blue (NEW) */
.theme-ice-blue {
  --bg-color: #f0f8ff;
  --bg-gradient: linear-gradient(135deg, #f0f8ff 0%, #e0f2fe 50%, #d0ebff 100%);
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(186, 230, 253, 0.4);
  --text-color: #0c4a6e;
  --muted-text: #0369a1;
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.08);
  --accent-hover: #0369a1;
  --input-bg: #ffffff;
  --shadow-soft: 0 4px 12px rgba(186, 230, 253, 0.3);
  --shadow-medium: 0 8px 24px rgba(186, 230, 253, 0.4);
  --shadow-strong: 0 18px 45px rgba(186, 230, 253, 0.5);
  --shadow-elevated: 0 24px 55px rgba(186, 230, 253, 0.6);
}

/* Font Classes */
.font-clean-sans {
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.font-rounded {
  --font-primary: ui-rounded, 'SF Pro Rounded', 'Hiragino Sans', system-ui, sans-serif;
}

.font-serif {
  --font-primary: 'Georgia', 'Times New Roman', serif;
}

.font-monospace {
  --font-primary: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

/* Corner Style Classes */
.corner-soft {
  --radius-card: 20px;
  --radius-input: 10px;
}

.corner-sharp {
  --radius-card: 4px;
  --radius-input: 4px;
}

.corner-pill {
  --radius-card: 40px;
  --radius-input: 999px;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

body {
  font-family: var(--font-primary);
  background: var(--bg-gradient);
  color: var(--text-color);
  min-height: 100vh;
  line-height: 1.6;
  transition: all var(--transition-base);
}

h1,
h2,
h3,
h4,
h5,
h6,
th,
thead,
.panel-title,
.section-title,
.profile-name,
.profile-section-title,
.profile-chips-title,
.hero-title,
.feature-title {
  font-family: var(--font-heading) !important;
}

/* ========================================
   SPLASH SCREEN
   ======================================== */

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: splashFadeIn 0.6s ease-out;
}

.splash-screen.fade-out {
  animation: splashFadeOut 0.6s ease-out forwards;
}

.splash-content {
  text-align: center;
  animation: splashSlideUp 0.6s ease-out;
}

.splash-logo {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.splash-tagline {
  font-size: var(--font-lg);
  color: var(--muted-text);
  margin-bottom: var(--space-6);
  opacity: 0.9;
}

.splash-start-btn {
  padding: var(--space-4) var(--space-6);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--font-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-primary);
  box-shadow: var(--shadow-medium);
}

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

@keyframes splashFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes splashFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes splashSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   HEADER
   ======================================== */

.app-header {
  padding: var(--space-5) var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.logo h1 {
  font-size: var(--font-2xl);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--space-1);
}

.logo .tagline {
  font-size: var(--font-sm);
  color: var(--muted-text);
  opacity: 0.8;
}

.demo-btn {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-primary);
  min-height: 44px;
}

.demo-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-8);
}

/* ========================================
   BUILDER MODE
   ======================================== */

.builder-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

/* Builder Panel (Left) */
.builder-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-strong);
}

.panel-title {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-5);
  color: var(--text-color);
}

/* Form Sections */
.form-section {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--card-border);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text-color);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text-color);
}

.form-group label .icon {
  font-size: var(--font-md);
}

.required {
  color: var(--accent);
}

/* Form Grid Layouts */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}

/* Inputs */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
select {
  width: 100%;
  background: var(--input-bg, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: var(--font-base);
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"] {
  padding: 0 1rem !important;
  min-height: 50px !important;
  height: 50px !important;
  line-height: 50px !important;
  vertical-align: middle;
}

textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--input-bg, rgba(255, 255, 255, 0.95));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: var(--font-base);
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  min-height: 80px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  resize: vertical;
}

/* Modern Select Dropdown Styling */
select {
  padding: 0 2.5rem 0 1rem !important;
  min-height: 50px !important;
  height: 50px !important;
  line-height: normal !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

select:hover {
  background-color: rgba(0, 0, 0, 0.25);
  border-color: var(--accent);
}

select option {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 0.5rem;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-text);
  opacity: 0.6;
}

/* Character count */
.char-count {
  display: block;
  text-align: right;
  font-size: var(--font-xs);
  color: var(--muted-text);
  margin-top: var(--space-1);
}

/* Error messages */
.error-message {
  display: block;
  color: #ef4444;
  font-size: var(--font-xs);
  margin-top: var(--space-1);
  min-height: 1rem;
}

/* Skill Input */
.skill-input-wrapper {
  display: flex;
  gap: var(--space-2);
}

.skill-input-wrapper input {
  flex: 1;
}

.add-btn {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-input);
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Skills Container */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  min-height: 2rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 0.75rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: var(--font-sm);
  font-weight: 500;
  animation: chipFadeIn 0.3s ease-out;
}

.skill-tag button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: var(--font-md);
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.skill-tag button:hover {
  transform: scale(1.2);
}

@keyframes chipFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Multi-Entry Lists (Education & Experience) */
.multi-entry-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.entry-item {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-input);
  padding: var(--space-4);
  position: relative;
  animation: entrySlideIn 0.3s ease-out;
}

.entry-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-3);
}

.entry-item-number {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--accent);
}

.remove-entry-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-input);
  font-size: var(--font-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.remove-entry-btn:hover {
  background: #ef4444;
  color: white;
}

.entry-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.add-entry-btn {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-input);
  color: var(--accent);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.add-entry-btn:hover {
  background: var(--accent);
  color: white;
  border-style: solid;
}

@keyframes entrySlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Link Group */
.custom-link-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-2);
}

/* Image Upload Section */
.image-upload-section {
  width: 100%;
}

.upload-options {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-input);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  min-height: 44px;
}

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

.upload-or {
  color: var(--muted-text);
  font-size: var(--font-sm);
}

.url-input-small {
  flex: 1;
  min-width: 150px;
}

.image-upload-preview {
  margin-top: var(--space-4);
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow-medium);
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: 2px solid white;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-weight: 600;
}

.remove-image-btn:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* Theme Presets */
.theme-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-3);
}

.theme-option {
  cursor: pointer;
}

.theme-option input[type="radio"] {
  display: none;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  text-align: center;
  border: 2px solid transparent;
  background: var(--card-bg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.theme-option input[type="radio"]:checked+.theme-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1), var(--shadow-medium);
  transform: translateY(-4px);
  background: white;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(var(--accent-rgb), 0.3);
}

/* Mini Bento Preview */
.mini-bento-preview {
  width: 100%;
  aspect-ratio: 16/10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

.mini-block {
  border-radius: 3px;
  background: #cbd5e1;
  transition: transform 0.3s ease;
}

.theme-card:hover .mini-block {
  transform: scale(1.05);
}

/* Theme Specific Mini-Blocks */
.theme-minimal-light .mini-block.mb-accent {
  background: #3b82f6;
}

.theme-minimal-light .mini-block.mb-muted {
  background: #e2e8f0;
}

.theme-minimal-light .mini-block.mb-text {
  background: #1e293b;
}

.theme-midnight .mini-bento-preview {
  background: rgba(255, 255, 255, 0.1);
}

.theme-midnight .mini-block.mb-accent {
  background: #2f80ed;
}

.theme-midnight .mini-block.mb-muted {
  background: #1e293b;
}

.theme-midnight .mini-block.mb-text {
  background: #ffffff;
}

.theme-blush-pastel .mini-block.mb-accent {
  background: #ec4899;
}

.theme-blush-pastel .mini-block.mb-muted {
  background: #fdf2f8;
}

.theme-blush-pastel .mini-block.mb-text {
  background: #831843;
}

.theme-neo-mint .mini-block.mb-accent {
  background: #10b981;
}

.theme-neo-mint .mini-block.mb-muted {
  background: #f0fdfa;
}

.theme-neo-mint .mini-block.mb-text {
  background: #065f46;
}

.theme-warm-sunset .mini-block.mb-accent {
  background: #f59e0b;
}

.theme-warm-sunset .mini-block.mb-muted {
  background: #fffbeb;
}

.theme-warm-sunset .mini-block.mb-text {
  background: #78350f;
}

.theme-royal-purple .mini-bento-preview {
  background: rgba(255, 255, 255, 0.1);
}

.theme-royal-purple .mini-block.mb-accent {
  background: #a855f7;
}

.theme-royal-purple .mini-block.mb-muted {
  background: #2e1065;
}

.theme-royal-purple .mini-block.mb-text {
  background: #f3e8ff;
}

.theme-ice-blue .mini-block.mb-accent {
  background: #0ea5e9;
}

.theme-ice-blue .mini-block.mb-muted {
  background: #f0f9ff;
}

.theme-ice-blue .mini-block.mb-text {
  background: #075985;
}

.theme-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: inherit;
}


.theme-card.theme-minimal-light {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
}

.theme-card.theme-midnight {
  background: radial-gradient(circle at top right, #2f80ed, #050816);
  color: #e5e7eb;
}

.theme-card.theme-blush-pastel {
  background: linear-gradient(135deg, #fff5f7 0%, #ffe4e9 100%);
  color: #831843;
}

.theme-card.theme-neo-mint {
  background: linear-gradient(135deg, #f7fcfa 0%, #e8f5f0 100%);
  color: #1e4d3b;
}

.theme-card.theme-warm-sunset {
  background: linear-gradient(135deg, #faf9f7 0%, #ede8e0 100%);
  color: #2d2520;
}

.theme-card.theme-royal-purple {
  background: radial-gradient(circle at top left, #6c2bd9, #1a0a2e);
  color: #f3e5ff;
}

.theme-card.theme-ice-blue {
  background: linear-gradient(135deg, #f0f8ff 0%, #d0ebff 100%);
  color: #0c4a6e;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Form Actions */
.form-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-input);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-primary);
  text-align: center;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ========================================
   PREVIEW PANEL
   ======================================== */

.preview-panel {
  position: sticky;
  top: var(--space-6);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.preview-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--muted-text);
  margin-bottom: var(--space-4);
  text-align: center;
}

.profile-card-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-7) var(--space-6);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-strong);
  max-width: 750px;
  margin: 0 auto;
  transition: all var(--transition-base);
  position: relative;
}

/* Bento Grid System (2025 Upgrade) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(60px, auto);
  gap: var(--space-4);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 850px;
}

.bento-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent);
}

/* Specific Tile Spans */
.tile-hero {
  grid-column: span 4;
  grid-row: span 3;
  text-align: left;
  align-items: flex-start;
}

.tile-avatar {
  grid-column: span 2;
  grid-row: span 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-skills {
  grid-column: span 3;
  grid-row: span 2;
}

.tile-social {
  grid-column: span 3;
  grid-row: span 2;
}

.tile-bio {
  grid-column: span 6;
}

.tile-education {
  grid-column: span 6;
}

.tile-experience {
  grid-column: span 6;
}

/* Mobile Bento Adjustments */
@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .tile-hero {
    grid-column: span 2;
    grid-row: auto;
  }

  .tile-avatar {
    grid-column: span 2;
    grid-row: auto;
    order: -1;
  }

  .tile-skills {
    grid-column: span 2;
    grid-row: auto;
  }

  .tile-social {
    grid-column: span 2;
    grid-row: auto;
  }

  .tile-bio {
    grid-column: span 2;
  }

  .tile-education {
    grid-column: span 2;
  }

  .tile-experience {
    grid-column: span 2;
  }

  .bento-tile .profile-image {
    max-width: 120px;
    max-height: 120px;
  }
}


/* Adjustments for bento content */
.bento-tile .profile-hero-flex {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.bento-tile .profile-image {
  margin: 0;
  width: 100%;
  height: 100%;
  max-width: 160px;
  max-height: 160px;
  border-radius: var(--radius-card);
}

.bento-tile .profile-name {
  text-align: left;
  margin: 0;
  font-size: 1.5rem;
}

.bento-tile .profile-title {
  text-align: left;
  margin-bottom: 0.25rem;
}

.bento-tile .profile-location {
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

.bento-tile .profile-meta {
  text-align: left;
  margin: 0;
  font-size: 0.8rem;
}

/* Timeline inside Bento */
.bento-tile .timeline-items {
  gap: var(--space-3);
}

.bento-tile .timeline-item {
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
}

.bento-tile .timeline-title {
  font-size: 0.95rem;
}

.bento-tile .timeline-subtitle {
  font-size: 0.85rem;
}

.bento-tile .timeline-description {
  font-size: 0.8rem;
  margin-top: 4px;
}


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

/* Profile Image */
.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-5);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

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

.profile-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

/* Profile Info */
.profile-name {
  font-size: var(--font-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-1);
  color: var(--text-color);
}

.profile-title {
  font-size: var(--font-md);
  text-align: center;
  color: var(--muted-text);
  margin-bottom: var(--space-1);
}

.profile-location {
  font-size: var(--font-sm);
  text-align: center;
  color: var(--muted-text);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.profile-meta {
  font-size: var(--font-sm);
  text-align: center;
  color: var(--muted-text);
  margin-bottom: var(--space-4);
  opacity: 0.8;
}

.profile-contact {
  font-size: var(--font-sm);
  text-align: center;
  color: var(--muted-text);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.profile-bio {
  font-size: var(--font-base);
  line-height: 1.7;
  text-align: center;
  color: var(--text-color);
  margin-bottom: var(--space-5);
  opacity: 0.9;
}

/* Profile Skills */
.profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-5);
}

.profile-skill {
  padding: 0.375rem 0.875rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Education & Experience Sections */
.profile-section {
  margin-bottom: var(--space-5);
}

.profile-section-title {
  font-size: var(--font-md);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-3);
  text-align: left;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--accent-soft);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.timeline-item {
  position: relative;
  padding-left: var(--space-4);
  border-left: 2px solid var(--accent-soft);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-header {
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-1);
}

.timeline-subtitle {
  font-size: var(--font-sm);
  color: var(--muted-text);
  margin-bottom: var(--space-1);
}

.timeline-years {
  font-size: var(--font-xs);
  color: var(--muted-text);
  font-weight: 500;
  opacity: 0.8;
}

.timeline-description {
  font-size: var(--font-sm);
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.85;
  margin-top: var(--space-2);
}

/* Additional Info Chips */
.profile-chips-section {
  margin-bottom: var(--space-4);
}

.profile-chips-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-2);
  text-align: left;
}

.profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.profile-chip {
  padding: 0.3rem 0.75rem;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  color: var(--text-color);
  font-size: var(--font-xs);
  font-weight: 500;
}

/* Link Buttons */
.profile-link-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.profile-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-input);
  color: var(--accent);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.profile-link-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* CTA Button */
.profile-cta {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-input);
  font-weight: 600;
  font-size: var(--font-base);
  margin-bottom: var(--space-5);
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
}

.profile-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.profile-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Social Links */
.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-5);
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 600;
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

/* Profile Footer */
.profile-footer {
  text-align: center;
  font-size: var(--font-xs);
  color: var(--muted-text);
  opacity: 0.7;
}

/* ========================================
   VIEW MODE
   ======================================== */

.view-mode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-6);
}

.view-card {
  max-width: 800px;
}

.view-footer {
  margin-top: var(--space-6);
  text-align: center;
}

.create-own-link {
  color: var(--muted-text);
  text-decoration: none;
  font-size: var(--font-sm);
  transition: color var(--transition-fast);
}

.create-own-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ========================================
   MODAL
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  animation: fadeIn 0.3s ease-out;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 1000;
  width: 90%;
  max-width: 550px;
  animation: modalScaleIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalScaleIn {
  from {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-elevated);
}

.modal-content h3 {
  font-size: var(--font-xl);
  margin-bottom: var(--space-2);
  color: var(--text-color);
}

.modal-description {
  color: var(--muted-text);
  font-size: var(--font-base);
  margin-bottom: var(--space-5);
}

.share-link-container {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.share-link-container input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: var(--font-sm);
  font-family: var(--font-mono);
}

.share-link-container .btn {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
}

/* QR Code Section */
.qr-code-section {
  text-align: center;
  margin-bottom: var(--space-4);
}

.qr-code-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--space-3);
}

#qr-code-canvas {
  background: white;
  padding: var(--space-3);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-soft);
}

/* QR Code Container (for QRCode.js library) */
.qrcode-container {
  display: inline-block;
  background: white;
  padding: var(--space-3);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-soft);
}

.qrcode-container img,
.qrcode-container canvas {
  display: block;
  border-radius: var(--radius-input);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
}

.modal-actions .btn {
  flex: 1;
}

/* Copy Success Tooltip */
.copy-tooltip {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-input);
  font-size: var(--font-sm);
  font-weight: 600;
  box-shadow: var(--shadow-strong);
  animation: tooltipSlideIn 0.3s ease-out;
  z-index: 10001;
}

.copy-tooltip.fade-out {
  animation: tooltipSlideOut 0.3s ease-out forwards;
}

@keyframes tooltipSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes tooltipSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* ========================================
   DECORATIVE SHAPES
   ======================================== */

.decorative-shapes {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: 10%;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-hover);
  bottom: 15%;
  left: -80px;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-30px) translateX(30px);
  }
}

/* ========================================
   PDF EXPORT STYLES
   ======================================== */

@media print {
  @page {
    margin: 0;
    size: auto;
  }

  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: var(--bg-gradient) !important;
  }

  .app-header,
  .builder-mode,
  .view-footer,
  .print-instructions {
    display: none !important;
  }

  .profile-card-wrapper {
    box-shadow: none !important;
    page-break-inside: avoid;
    background: var(--card-bg) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 900px) {
  .app-header {
    padding: var(--space-4) var(--space-4);
  }

  .header-content {
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }

  .demo-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .main-container {
    padding: 0 var(--space-4) var(--space-6);
  }

  .builder-container {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .builder-panel,
  .preview-panel {
    padding: var(--space-5);
  }

  .preview-panel {
    position: static;
  }

  .theme-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .share-link-container {
    flex-direction: column;
  }

  .custom-link-group {
    grid-template-columns: 1fr;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .view-mode-container {
    padding: var(--space-4);
    min-height: calc(100vh - 100px);
  }

  .profile-card-wrapper {
    padding: var(--space-6) var(--space-5);
  }

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

  .upload-btn {
    width: 100%;
    justify-content: center;
  }

  .url-input-small {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .logo h1 {
    font-size: var(--font-xl);
  }

  .panel-title {
    font-size: var(--font-lg);
  }

  .section-title {
    font-size: var(--font-md);
  }

  .profile-name {
    font-size: var(--font-xl);
  }

  .profile-title {
    font-size: var(--font-base);
  }

  .theme-presets {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 95%;
  }

  .modal-content {
    padding: var(--space-5);
  }

  .splash-logo {
    font-size: 2.5rem;
  }

  .splash-tagline {
    font-size: var(--font-base);
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* High contrast improvements */
@media (prefers-contrast: high) {
  :root {
    --card-border: rgba(148, 163, 184, 0.8);
  }

  .theme-minimal-light {
    --card-border: rgba(148, 163, 184, 0.6);
  }
}

/* ========================================
   LOCATION SELECTOR MODAL
   ======================================== */

/* Location input field (readonly, triggers modal) */
.location-input {
  width: 100%;
  padding: 0 1rem !important;
  min-height: 50px !important;
  height: 50px !important;
  line-height: 50px !important;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: var(--font-base);
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  box-sizing: border-box;
  cursor: pointer;
}

.location-input:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--accent);
}

.location-input::placeholder {
  color: var(--muted-text);
  opacity: 0.6;
}

/* Location Modal */
.location-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.location-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.location-modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.location-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.location-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.location-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted-text);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.location-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

/* Modal Search */
.location-modal-search {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.location-select-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.location-select-btn:hover {
  border-color: var(--card-border-hover);
  background: rgba(0, 0, 0, 0.4);
}

.location-select-btn span {
  opacity: 0.8;
  /* Placeholder look */
}

.location-select-btn.has-value span {
  opacity: 1;
}

.location-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
}

.location-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
}

.location-search-input::placeholder {
  color: var(--muted-text);
}

/* Modal Results */
.location-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.location-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-input);
  transition: all var(--transition-fast);
  margin-bottom: 0.25rem;
}

.location-result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.location-result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.location-result-text {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
}

.location-no-results {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted-text);
  font-size: 1rem;
}

/* Scrollbar for modal results */
.location-modal-results::-webkit-scrollbar {
  width: 8px;
}

.location-modal-results::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  margin: 0.5rem 0;
}

.location-modal-results::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.location-modal-results::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .location-modal-content {
    max-height: 90vh;
    max-width: 100%;
    margin: 0 0.5rem;
  }

  .location-modal-header {
    padding: 1rem;
  }

  .location-modal-search {
    padding: 0.75rem 1rem;
  }

  .location-result-item {
    padding: 0.75rem;
  }
}

/* ========================================
   AI SMART FEATURE STYLES
   ======================================== */

.ai-smart-fill-btn {
  width: 100%;
  margin-top: var(--space-3);
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
  background-size: 200% 200%;
  color: white;
  border: none;
  border-radius: var(--radius-input);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: all 0.3s ease;
  animation: gradientFlow 3s ease infinite;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.ai-smart-fill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
  background-position: 100% 100%;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* AI Typing Effect for inputs */
.ai-typing {
  position: relative;
  overflow: hidden;
}

.ai-typing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(139, 92, 246, 0.1);
  animation: flash 0.5s ease-out;
  pointer-events: none;
}

@keyframes flash {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* ========================================
   RESUME SAMPLES MODAL
   ======================================== */

.resume-modal-content {
  max-width: 800px;
  /* Wider than standard modal */
  margin: 5% auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--text-color);
}

.close-modal-x {
  background: none;
  border: none;
  color: var(--muted-text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}

.close-modal-x:hover {
  color: var(--text-color);
}

.modal-description {
  color: var(--muted-text);
  margin-bottom: var(--space-6);
  font-size: var(--font-base);
  flex-shrink: 0;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  overflow-y: auto;
  padding-right: var(--space-2);
  flex: 1;
}

/* Scrollbar styling for grid */
.resume-grid::-webkit-scrollbar {
  width: 6px;
}

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

.resume-grid::-webkit-scrollbar-thumb {
  background: var(--muted-text);
  border-radius: 3px;
}

.resume-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-input);
  padding: var(--space-5);
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
}

.resume-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.resume-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-1);
  display: block;
}

/* ========================================
   BETTER BUTTON LAYOUT
   ======================================== */

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.action-row-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: var(--font-base);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-accent-border {
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  background: rgba(99, 102, 241, 0.05);
}

.btn-accent-border:hover {
  background: var(--accent) !important;
  color: white !important;
}

@media (max-width: 600px) {
  .action-row-secondary {
    grid-template-columns: 1fr;
  }
}

.resume-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: var(--font-lg);
}

.resume-subtitle {
  color: var(--muted-text);
  font-size: var(--font-sm);
  margin-bottom: var(--space-2);
}

.download-resume-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  margin-top: auto;
}

.resume-card:hover .download-resume-btn {
  background: var(--accent);
  color: white;
}

/* Hidden links transition */
.form-group.hidden {
  display: none;
}

/* Fix for nav alignment */
.nav-btn {
  transition: color 0.2s;
}

.nav-btn:hover {
  color: var(--accent) !important;
}