/* ================= Resume Analyzer Page ================= */

.resume-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(16,185,129,0.1));
  border-bottom: 1px solid rgba(59,130,246,0.2);
}

.resume-header .back-btn {
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 20px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 8px;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.3s ease;
}

.resume-header .back-btn:hover {
  background: rgba(59,130,246,0.2);
  transform: translateX(-5px);
}

.resume-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.resume-header p {
  color: #9ca3af;
  font-size: 1.1rem;
}

.resume-container {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.resume-card {
  background: rgba(15,23,42,0.95);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgba(59,130,246,0.3);
  box-shadow: 0 0 60px rgba(59,130,246,0.3);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease;
}

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

.upload-box {
  border: 2px dashed rgba(59,130,246,0.4);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.upload-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.upload-box:hover {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.6);
  transform: translateY(-2px);
}

.upload-box:hover::before {
  opacity: 1;
}

.upload-box span {
  font-size: 1.2rem;
  color: #3b82f6;
  font-weight: 600;
  display: block;
}

.file-name {
  text-align: center;
  font-size: 0.95rem;
  color: #9ca3af;
  margin-bottom: 20px;
  min-height: 24px;
  font-weight: 500;
}

.btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-glow {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59,130,246,0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(59,130,246,0.6);
  }
}

#loading {
  text-align: center;
  color: #3b82f6;
  font-weight: 600;
  margin-top: 20px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hidden {
  display: none !important;
}

/* ================= Result Modal ================= */

.resume-result {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.resume-result.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.resume-box {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  padding: 40px;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  border: 1px solid rgba(59,130,246,0.3);
  box-shadow: 0 0 60px rgba(59,130,246,0.4);
  position: relative;
  animation: scaleIn 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.resume-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.4);
  color: #ef4444;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-close:hover {
  background: rgba(239,68,68,0.3);
  transform: rotate(90deg);
}

.score-circle {
  width: 150px;
  height: 150px;
  margin: 30px auto;
  border-radius: 50%;
  background: conic-gradient(#3b82f6 0%, #22c55e 75%, #1e293b 0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  position: relative;
  box-shadow: 0 0 40px rgba(59,130,246,0.5);
  animation: rotateIn 0.8s ease;
}

@keyframes rotateIn {
  from {
    transform: rotate(-180deg) scale(0.5);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

.score-circle::after {
  content: '';
  position: absolute;
  inset: 12px;
  background: #0f172a;
  border-radius: 50%;
  z-index: -1;
}

.resume-box h3 {
  margin: 30px 0 15px;
  font-size: 1.3rem;
  color: #3b82f6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.result-card {
  padding: 16px 20px;
  border-radius: 12px;
  font-weight: 500;
  animation: slideInLeft 0.4s ease;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.result-card.success {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

.result-card.error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #ef4444;
}

#course-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
}

#course-list li {
  padding: 12px 16px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  margin-bottom: 10px;
  color: #60a5fa;
  font-weight: 500;
  animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.btn-outline {
  background: transparent;
  border: 2px solid #3b82f6;
  color: #3b82f6;
  padding: 14px;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

/* ================= Mobile Responsive ================= */

@media (max-width: 768px) {
  .resume-header h1 {
    font-size: 2rem;
  }

  .resume-card {
    padding: 30px 20px;
  }

  .resume-box {
    padding: 30px 20px;
  }

  .score-circle {
    width: 120px;
    height: 120px;
    font-size: 2rem;
  }

  .upload-box {
    padding: 30px 20px;
  }
}