@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --primary-color: #6a38c2;
  --primary-dark: #6132b4;
  --secondary-color: #6a38c2;
  --accent-color: #9c4dcc;
  --text-color: #262626;
  --text-light: #737373;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #525252;
  --success-color: #48bb78;
  --danger-color: #f56565;
  --warning-color: #ed8936;
  --info-color: #4299e1;
  --white: #ffffff;
  --max-width: 1150px;

  /* Enhanced variables for modern design */
  --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --border-radius: 16px;
  --border-radius-lg: 24px;
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    var(--accent-color) 0%,
    #b366ff 100%
  );
  --gradient-success: linear-gradient(
    135deg,
    var(--success-color) 0%,
    #38a169 100%
  );
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.18);
}

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

body {
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}
main {
  min-height: 100vh;
  margin-top: 5.8rem;
}
main .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation Styles */

/* Main Content */

.profile-container {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  animation: slideUp 0.6s ease-out;
  margin-bottom: 40px;
}

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

.profile-header {
  background: var(--gradient-primary);
  color: white;
  padding: 60px 40px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
  opacity: 0.3;
}

.profile-avatar {
  font-size: 5rem;
  margin-right: 30px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.profile-avatar:hover {
  transform: scale(1.05) rotate(5deg);
}

.profile-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.profile-info h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.profile-info p {
  opacity: 0.9;
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.edit-profile-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.edit-profile-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.profile-content {
  padding: 50px;
}

.profile-details-section {
  margin-bottom: 50px;
}

.profile-details-section h3 {
  margin-bottom: 35px;
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.profile-details-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 35px;
}

.detail-item {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid var(--medium-gray);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.detail-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.detail-item:hover::before {
  transform: scaleY(1);
}

.detail-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-label {
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.skill-tag {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(106, 56, 194, 0.2);
}

.skill-tag:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 15px rgba(106, 56, 194, 0.3);
}

.profile-section {
  margin-bottom: 50px;
}

.profile-section h3 {
  margin-bottom: 35px;
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.profile-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.applied-jobs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.applied-job-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--medium-gray);
  position: relative;
  overflow: hidden;
}

.applied-job-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.applied-job-card:hover::before {
  transform: scaleX(1);
}

.applied-job-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.applied-job-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.company-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  margin-right: 20px;
  background-color: var(--light-gray);
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.company-info h4 {
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
}

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

.applied-job-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.job-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 6px 12px;
  background-color: var(--light-gray);
  border-radius: 20px;
  font-weight: 500;
}

.job-detail i {
  color: var(--primary-color);
}

.applied-date i {
  color: var(--success-color);
}

.no-applied-jobs {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-light);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.no-applied-jobs p {
  font-size: 1.3rem;
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 16px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(106, 56, 194, 0.3);
  font-size: 1.05rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(106, 56, 194, 0.4);
}

.loading-spinner {
  text-align: center;
  padding: 60px;
  color: var(--primary-color);
  font-size: 1.3rem;
}

/* Test Scores Section */
.test-scores-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}

.test-score-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--medium-gray);
  position: relative;
  overflow: hidden;
}

.test-score-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.test-score-card:hover::before {
  transform: scaleX(1);
}

.test-score-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.test-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.test-score-header h4 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.test-score {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
}

.score-high {
  background-color: rgba(72, 187, 120, 0.2);
  color: var(--success-color);
}

.score-medium {
  background-color: rgba(237, 137, 54, 0.2);
  color: var(--warning-color);
}

.score-low {
  background-color: rgba(245, 101, 101, 0.2);
  color: var(--danger-color);
}

.test-score-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-light);
}

.test-score-item i {
  color: var(--primary-color);
}

.no-test-scores {
  text-align: center;
  padding: 80px 40px;
  color: var(--text-light);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.no-test-scores p {
  font-size: 1.3rem;
  margin-bottom: 30px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 0;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.7);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--card-shadow-hover);
}

.modal.open .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px;
  border-bottom: 1px solid var(--medium-gray);
  background: var(--light-gray);
}

.modal-header h3 {
  color: var(--primary-color);
  font-size: 1.6rem;
  font-weight: 700;
}

.close-modal {
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: white;
  background: var(--danger-color);
  transform: rotate(90deg);
}

#editProfileForm {
  padding: 35px;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--light-gray);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(106, 56, 194, 0.1);
  background-color: white;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 35px;
}

.btn-cancel,
.btn-save {
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-cancel {
  background-color: var(--medium-gray);
  color: var(--text-color);
}

.btn-cancel:hover {
  background-color: var(--dark-gray);
  color: white;
  transform: translateY(-2px);
}

.btn-save {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 8px 20px rgba(72, 187, 120, 0.3);
}

.btn-save:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(72, 187, 120, 0.4);
}

/* Responsive Design */

/* Large Desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Desktop */
@media (max-width: 1199px) {
  .profile-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-header {
    padding: 50px 30px;
  }

  .profile-avatar {
    font-size: 4.5rem;
    margin-right: 25px;
  }

  .profile-info h2 {
    font-size: 2.2rem;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    padding: 50px 30px;
  }

  .profile-avatar {
    margin-right: 0;
    margin-bottom: 25px;
  }

  .profile-info {
    width: 100%;
  }

  .profile-content {
    padding: 40px 30px;
  }

  .applied-jobs-list,
  .test-scores-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Mobile Large */
@media (max-width: 767px) {
  main {
    padding: 90px 0 40px;
  }

  .container {
    padding: 0 15px;
  }

  .profile-header {
    padding: 40px 20px;
  }

  .profile-avatar {
    font-size: 4rem;
  }

  .profile-info h2 {
    font-size: 1.8rem;
  }

  .profile-info p {
    font-size: 1rem;
  }

  .edit-profile-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .profile-content {
    padding: 30px 20px;
  }

  .profile-details-section h3,
  .profile-section h3 {
    font-size: 1.5rem;
  }

  .profile-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .detail-item {
    padding: 25px;
  }

  .applied-jobs-list,
  .test-scores-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

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

  .btn-cancel,
  .btn-save {
    width: 100%;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .logo {
    font-size: 1.5rem;
  }

  .profile-header {
    padding: 30px 15px;
  }

  .profile-avatar {
    font-size: 3.5rem;
  }

  .profile-info h2 {
    font-size: 1.6rem;
  }

  .profile-content {
    padding: 25px 15px;
  }

  .detail-item {
    padding: 20px;
  }

  .skill-tag {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .applied-job-card,
  .test-score-card {
    padding: 20px;
  }

  .no-applied-jobs,
  .no-test-scores {
    padding: 60px 20px;
  }

  .modal-header {
    padding: 20px;
  }

  #editProfileForm {
    padding: 25px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .profile-info h2 {
    font-size: 1.4rem;
  }

  .edit-profile-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

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