/* ============================================
   MockBee - Resume Builder Styling
   ============================================ */

:root {
  /* 60% White */
  --cream-bg: #FFFFFF;
  --cream-light: #FFFFFF;
  --white: #ffffff;
  --parchment: #FFFFFF;

  /* 30% Warm Gray */
  --cream-dark: #E9E4E2;
  --parchment-dark: #E9E4E2;
  --shadow-warm: 0 10px 30px rgba(180, 160, 150, 0.1);

  /* 10% Accent */
  --gold: #D8C4B6;
  --gold-light: #E2D1C8;
  --gold-dark: #B09E93;

  /* Contrast */
  --navy: #1A1A1A;
  --navy-dark: #000000;
  --text-dark: #1A1A1A;
  --text-medium: #4A4A4A;
  --shadow-warm: 0 10px 30px rgba(100, 70, 20, 0.1);
  --shadow-deep: 0 15px 40px rgba(30, 20, 10, 0.15);
  --border-radius: 12px;
}

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

body {
  font-family: 'Satoshi', sans-serif;
  background-color: var(--cream-bg);
  background-image: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  color: var(--text-dark);
  min-height: 100vh;
}

/* --- Minimal Header --- */
.standalone-header {
  padding: 25px 20px 0;
  display: none; /* Controlled by JS */
  justify-content: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}

.btn-home-link {
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  border: 1.2px solid var(--gold);
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-home-link i {
  color: var(--gold-dark);
}

.btn-home-link:hover {
  background: var(--gold-dark);
  color: #fff;
  border-color: var(--gold-dark);
}

.btn-home-link:hover i {
  color: #fff;
}

/* --- Main Layout --- */
.resume-hero {
  width: 95%;
  max-width: 1300px;
  margin: 20px auto 25px;
  padding: 0 40px;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero-content .badge {
  display: inline-block;
  background: var(--gold-light);
  color: var(--navy-dark);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.7rem; /* Reduced from 0.8rem */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px; /* Reduced from 24px */
  border: 1.5px solid var(--gold);
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; /* Compacted from 3.2rem */
  font-weight: 900;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.hero-content h1 .highlight {
  color: var(--gold-dark);
  position: relative;
}

.hero-content p {
  font-size: 0.88rem; /* Compacted from 1.1rem */
  color: var(--text-medium);
  line-height: 1.5;
  font-weight: 500;
  max-width: 650px;
  margin: 0 auto;
}

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

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

.resume-builder-container {
  width: 96%;
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 25px; /* Compacted from 40px */
  background: var(--cream-light);
  border-radius: 12px;
  box-shadow: var(--shadow-deep);
  border: 1.2px solid var(--gold);
}

/* Builder Top Section */
.builder-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px; /* Halved from 50px */
  padding-bottom: 15px;
  border-bottom: 1px solid var(--cream-dark);
}

.top-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.top-content p {
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 20px;
}

.btn-build-main {
  background: var(--navy);
  color: var(--gold-light);
  border: 2px solid var(--gold);
  padding: 10px 25px; /* Reduced from 12x35 */
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem; /* Reduced from 1.1rem */
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(44, 62, 92, 0.15);
}

.btn-build-main:hover {
  transform: translateY(-2px);
  background: var(--navy-dark);
  box-shadow: 0 6px 20px rgba(44, 62, 92, 0.3);
}

.btn-outline {
  padding: 8px 20px; /* Reduced from 10x25 */
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.3s;
}

.btn-outline:hover {
  background: var(--cream-bg);
}

/* Builder Grid */
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
}

/* Left: Resume Preview (Paper Style) */
.preview-panel {
  background: var(--cream-dark);
  padding: 40px;
  border-radius: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
}

.resume-paper {
  width: 100%;
  max-width: 800px;
  background: var(--white);
  padding: 60px;
  min-height: 1000px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  color: #333;
  line-height: 1.5;
  font-family: Arial, Helvetica, sans-serif;
  /* Clean font for ATS */
}

/* ATS Friendly Resume Typography */
.res-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #000;
}

.res-role {
  font-size: 1.1rem;
  color: #444;
  font-weight: 600;
  margin-bottom: 12px;
}

.res-contact {
  font-size: 0.9rem;
  color: #555;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.res-contact span i {
  color: var(--navy);
  margin-right: 5px;
}

.res-section {
  margin-bottom: 25px;
}

.res-section h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  color: #111;
  font-weight: 700;
}

.res-divider {
  height: 1.5px;
  background: #000;
  margin-bottom: 12px;
}

.res-section p {
  font-size: 0.95rem;
}

.exp-item {
  margin-bottom: 15px;
}

.exp-header {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.res-section ul {
  padding-left: 20px;
  list-style-type: square;
}

.res-section li {
  margin-bottom: 5px;
  font-size: 0.92rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Right: Editor Panel */
.edit-panel {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.card {
  background: var(--cream-bg);
  background-color: var(--cream-bg);
  border-radius: 10px;
  padding: 18px; /* Reduced from 25px */
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-warm);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; /* Compacted from 1.25rem */
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 15px;
}

/* Accordion */
/* Clean Minimalism Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--cream-dark);
  margin-top: 15px;
}

.accordion-item {
  border-bottom: 1px solid var(--cream-dark);
}

.accordion-header {
  padding: 16px 5px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: rgba(216, 196, 182, 0.1);
}

.acc-icon {
  width: 35px;
  font-size: 1.25rem;
  color: var(--navy);
  opacity: 0.6;
}

.acc-label {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}

.arrow {
  font-size: 11px;
  color: var(--gold-dark);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .arrow {
  transform: rotate(90deg);
}

.accordion-content {
  padding: 0 5px 0 35px;
  /* Aligns with label */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
  opacity: 0;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  padding: 5px 5px 25px 35px;
  opacity: 1;
}

/* Clearer Input Styling */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-medium);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.input-group input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.2px solid var(--cream-dark);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  color: var(--text-dark);
}

textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

.input-group input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(216, 196, 182, 0.2);
}

/* Download Card */
.download-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-download {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-pdf {
  background: var(--navy);
  color: var(--gold);
}

.btn-pdf:hover {
  background: var(--navy-dark);
  box-shadow: 0 4px 15px rgba(216, 196, 182, 0.4);
}

.btn-word {
  background: var(--gold);
  color: var(--navy);
  border: 1.5px solid var(--gold);
}

.btn-word:hover {
  background: var(--gold-light);
}

/* Tips Section */
.tips-section {
  margin-top: 60px;
  padding-top: 50px;
  border-top: 1px solid var(--cream-dark);
}

.tips-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 35px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.tips-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

.tips-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--gold-light);
  padding: 25px;
  border-radius: 60px;
  border: 1px solid var(--gold);
  flex: 1;
}

.tip-icon-wrap {
  width: 60px;
  height: 60px;
  background: var(--parchment);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--navy);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Template Modal Styles */
.modal-hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
}

.modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius);
  z-index: 2100;
  width: 90%;
  max-width: 700px;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--gold);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--navy-dark);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-medium);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.template-option {
  padding: 15px;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.template-option:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
}

.template-option.active {
  border-color: var(--gold);
  background: var(--cream-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.t-preview {
  height: 120px;
  background: #fff;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #333;
}

.template-option p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Printing Logic */
@media print {
  body * {
    visibility: hidden;
  }

  .resume-paper,
  .resume-paper * {
    visibility: visible;
  }

  .resume-paper {
    position: absolute;
    left: 0;
    top: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }

  .edit-panel {
    order: 1;
  }

  .preview-panel {
    order: 2;
    height: 600px;
    overflow-y: auto;
  }
}

@media (max-width: 800px) {
  .tips-grid {
    flex-direction: column;
    gap: 15px;
  }

  .tip-item {
    border-radius: 20px;
  }
}

/* --- Premium Locked & Preview Mode --- */
.premium-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-overlay.hidden {
  display: none !important;
}

.lock-content {
  background: var(--white);
  padding: 50px 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.lock-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-medium);
    margin: 0 auto 35px;
    max-width: 420px;
}

.lock-icon {
  font-size: 4rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.lock-content h2 {
  font-family: 'Satoshi', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.lock-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-premium {
  background: #000;
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
}

.btn-close-lock {
  padding: 14px 28px;
  border: 2px solid var(--cream-dark);
  background: transparent;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
}

.builder-grid.preview-active {
  grid-template-columns: 1fr;
}

.builder-grid.preview-active .edit-panel {
  display: none;
}

.builder-grid.preview-active .preview-panel {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.builder-grid.preview-active .resume-paper {
  margin: 0 auto;
}

.premium-badge {
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 900;
  margin-left: 5px;
  vertical-align: middle;
}