* {
  box-sizing: border-box;
}

:root {
  --bg-color: #030014; /* Deep dark background */
  --card-bg: rgba(255, 255, 255, 0.03); /* Translucent dark background */
  --card-border: rgba(255, 255, 255, 0.08); /* Subtle white border for glass edges */
  --glass-blur: 16px;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --accent-purple: #c026d3; /* Original Magenta from image */
  --accent-hover: #e879f9;
  --accent-glow: rgba(192, 38, 211, 0.4);
  --border-color: rgba(255, 255, 255, 0.1);
  --grid-color: rgba(255, 255, 255, 0.03);
  --input-bg: rgba(0, 0, 0, 0.3);
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(192, 38, 211, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(192, 38, 211, 0.08) 0%, transparent 40%),
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto; /* Allow vertical scroll for all devices, handled better in media queries */
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2rem 0 2rem;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.logo-section h1 {
  font-size: 2.5rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  color: var(--accent-purple);
  filter: drop-shadow(0 0 10px var(--accent-glow));
  font-family: 'Orbitron', sans-serif;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 0.2rem;
  letter-spacing: 1px;
}

.developer-info {
  text-align: left;
}

.developer-info span {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.developer-info .brand-logo {
  height: 30px;
  display: block;
  margin-top: 5px;
  filter: brightness(0) saturate(100%) invert(29%) sepia(87%) saturate(5427%) hue-rotate(285deg) brightness(91%) contrast(100%); /* Match accent-purple if needed */
}

/* 2-Column Layout */
.main-wrapper {
  display: flex;
  gap: 2rem;
  flex: 1;
  min-height: 0;
  padding-bottom: 2rem;
}

/* Glass Panel Base Styling */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.main-content {
  flex: 1.2;
  gap: 1.5rem;
  overflow-y: auto;
}
.card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.sidebar-right {
  flex: 1;
  overflow-y: auto;
}

/* Section Titles */
h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

/* Cards inside glass panels */

.file-drop-area {
  border: 2px dashed var(--card-border);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--input-bg);
}

.file-drop-area:hover {
  border-color: var(--accent-purple);
  background: rgba(192, 38, 211, 0.05);
}

textarea {
  width: 100%;
  height: 120px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 8px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  font-size: 0.95rem;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.config-row {
  display: flex;
  gap: 1rem;
}

.config-group {
  flex: 1;
}

.config-group label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

select {
  width: 100%;
  padding: 0.8rem;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.primary-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Sidebar Loading Container */
.sidebar-right {
  position: relative;
}
.primary-btn {
  width: 100%;
  padding: 1.2rem;
  background: var(--accent-purple);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px 0 var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.input-actions,
.actions,
.revision-actions {
  margin-top: auto;
  padding-top: 1rem;
}

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

/* Result Styles */
.result-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.score-gauge {
  position: relative;
  width: 200px;
  height: 200px;
}

.score-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-gauge circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.score-gauge .bg {
  stroke: var(--border-color);
}

.score-gauge .progress {
  stroke: var(--accent-purple);
  stroke-dasharray: 565.48; /* 2 * PI * 90 */
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 1.5s ease-out;
  filter: drop-shadow(0 0 8px var(--accent-purple));
}

.score-gauge .score-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-gauge .score-number {
  font-size: 3.5rem;
  font-weight: 900;
  display: block;
  line-height: 1;
}

.score-gauge .score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 2px;
  font-weight: 700;
}

.grade-badge {
  position: absolute;
  bottom: -10px;
  right: 10px;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
  z-index: 2;
}

.grade-badge span {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

.grade-badge .grade-letter {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Color coding for grades */
.grade-badge.grade-A { border-color: #4ade80; box-shadow: 0 0 20px rgba(74, 222, 128, 0.2); }
.grade-badge.grade-A .grade-letter { background: linear-gradient(135deg, #4ade80, #22c55e); -webkit-background-clip: text; background-clip: text; }

.grade-badge.grade-B { border-color: #a855f7; box-shadow: 0 0 20px rgba(168, 85, 247, 0.2); }
.grade-badge.grade-B .grade-letter { background: linear-gradient(135deg, #a855f7, #7c3aed); -webkit-background-clip: text; background-clip: text; }

.grade-badge.grade-C { border-color: #fbbf24; box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
.grade-badge.grade-C .grade-letter { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; background-clip: text; }

.grade-badge.grade-D { border-color: #f97316; box-shadow: 0 0 20px rgba(249, 115, 22, 0.2); }
.grade-badge.grade-D .grade-letter { background: linear-gradient(135deg, #f97316, #ea580c); -webkit-background-clip: text; background-clip: text; }

.grade-badge.grade-F { border-color: #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, 0.2); }
.grade-badge.grade-F .grade-letter { background: linear-gradient(135deg, #ef4444, #dc2626); -webkit-background-clip: text; background-clip: text; }

.verdict-card {
  border-left: 4px solid var(--accent-purple);
  background: linear-gradient(to right, rgba(192, 38, 211, 0.1), transparent);
  margin-bottom: 1.5rem;
}

.verdict-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-top: 0;
  margin-bottom: 0.8rem;
  letter-spacing: 1px;
}

.verdict-card p {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}

.result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-secondary);
  text-align: center;
}

.result-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.hidden {
  display: none !important;
}

/* Loader */
#loading-section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
  max-width: 300px;
  height: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-purple), #ff00ff);
  box-shadow: 0 0 20px var(--accent-purple);
  transition: width 0.3s ease;
  border-radius: 20px;
}

#progress-percentage {
  font-size: 1.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.5rem;
}

/* Premium Buttons */
.secondary-btn {
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-purple);
}

/* Revision Section Layout */
.preview-container {
  position: relative;
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #fff;
}

.resume-card-small {
  max-height: 300px;
  overflow: hidden;
  padding: 2rem !important;
  font-family: serif;
  color: #333;
  transform: scale(0.95);
  transform-origin: top center;
  pointer-events: none;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
}

.revision-actions {
  margin-top: 1.5rem;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 90vh;
  background: rgba(20, 20, 25, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  animation: modalSlideUp 0.3s ease-out;
}

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

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

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.close-btn:hover {
  color: #fff;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: #f0f0f0; /* Light background for paper look */
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* World Class Resume PDF-like Styling */
.resume-card-full {
  background: white;
  color: #1a1a1a;
  padding: 25px 35px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.35;
  min-height: 1050px; /* A4 aspect ratio approximation */
  box-sizing: border-box;
}

.resume-preview {
  font-family: inherit;
}

/* Header Styling */
.resume-header {
  border-bottom: 2px solid #1a1a1a;
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.resume-header h1 {
  font-size: 2.2rem;
  margin: 0;
  color: #000;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  text-transform: uppercase;
}

.resume-header .title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-purple);
  margin: 4px 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resume-header .contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

.resume-header .contact-info span:not(:last-child)::after {
  content: "•";
  margin-left: 12px;
  color: #ccc;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 25px;
}

.main-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-left: 0;
}

/* Section Typography */
.resume-preview h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
  margin-top: 0;
  margin-bottom: 10px;
  color: #000;
  letter-spacing: 1.2px;
  font-weight: 800;
  padding-bottom: 3px;
  display: flex;
  align-items: center;
}

.resume-preview h2::after {
  content: "";
  height: 2px;
  background: var(--accent-purple);
  flex: 1;
  margin-left: 10px;
  opacity: 0.5;
}

.resume-preview h3 {
  font-size: 1rem;
  margin: 0 0 2px 0;
  color: #111;
  font-weight: 700;
}

.resume-preview .job-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1px;
}

.resume-preview .job-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #222;
}

.resume-preview .date {
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
}

.resume-preview .company {
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin-bottom: 5px;
  display: block;
}

.resume-preview ul {
  padding-left: 1.1rem;
  margin-top: 3px;
  margin-bottom: 0;
}

.resume-preview li {
  margin-bottom: 3px;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.35;
}

.resume-preview p {
  font-size: 0.85rem;
  color: #444;
  margin: 0;
}

/* Side Column Specifics */
.side-col h2::after {
  display: none;
}

.side-col .skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  padding: 0;
}

.side-col .skill-tag {
  background: #f3f4f6;
  color: #1f2937;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #e5e7eb;
}



/* Tabs update */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  background: var(--border-color);
  color: var(--text-secondary);
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-purple);
  color: white;
}


/* Enhanced Critique Cards and Summary */
.critique-card, .verdict-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
}

.critique-card:hover, .verdict-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-color: var(--accent-purple);
}

.critique-card {
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.6;
}

.critique-card strong {
  color: var(--accent-purple);
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
  body {
    height: auto;
    overflow: visible;
  }
  
  .container {
    height: auto;
    padding: 1rem;
  }

  header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .logo-section h1 {
    font-size: 2rem;
  }

  .developer-info {
    text-align: center;
  }

  .developer-info .brand-logo {
    margin: 5px auto 0;
  }

  .main-wrapper {
    flex-direction: column;
    height: auto;
    gap: 1.5rem;
  }

  .sidebar-right {
    min-height: 400px;
    height: auto;
  }

  .modal-container {
    width: 95%;
    height: 95vh;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .score-gauge {
    width: 160px;
    height: 160px;
  }

  .score-gauge .score-number {
    font-size: 2.5rem;
  }

  .grade-badge {
    width: 60px;
    height: 60px;
    right: 0;
  }

  .grade-badge .grade-letter {
    font-size: 1.8rem;
  }

  .verdict-card p {
    font-size: 1rem;
  }

  .file-drop-area {
    padding: 1.5rem;
  }

  .file-msg {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .logo-section h1 {
    font-size: 1.6rem;
  }

  .primary-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  .glass-panel {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .resume-card-full {
    padding: 15px;
  }

  .resume-header h1 {
    font-size: 1.5rem;
  }
}

.main-footer {
  padding: 1.5rem 0;
  text-align: center;
  flex-shrink: 0;
}

.main-footer p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0;
  letter-spacing: 1px;
}

