/* Fonts */
@font-face {
  font-family: "neulis-black";
  src: url("fonts/neulis_black.otf") format("opentype");
}

@font-face {
  font-family: "NeueAlteGrotesk-Regular";
  src: url("fonts/NeueAlteGrotesk-Regular.otf") format("opentype");
}

@font-face {
  font-family: "NeueAlteGrotesk-Bold";
  src: url("fonts/NeueAlteGrotesk-Bold.otf") format("opentype");
}

@font-face {
  font-family: "NeueAlteGrotesk-SemiBold";
  src: url("fonts/NeueAlteGrotesk-SemiBold.otf") format("opentype");
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #ffffff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.nav-link-home {
  text-decoration: none;
  color: inherit;
}

.navlogo {
  font-family: "neulis-black", sans-serif;
  color: #2563eb;
  font-size: 1.5rem;
  font-weight: bold;
}

.mobile-logo {
  display: none;
  height: 40px;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
}

.nav-menu a {
  text-decoration: none;
  color: #1e3a8a;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: #60a5fa;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Selector */
.language-selector {
  position: relative;
  display: inline-block;
}

.language-toggle {
  background: none;
  border: 2px solid #2563eb;
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #2563eb;
}

.language-toggle:hover {
  background: #2563eb;
  color: white;
}

.flag-icon {
  width: 20px;
  height: auto;
  border-radius: 2px;
}

.language-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  min-width: 150px;
  display: none;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.language-dropdown.active {
  display: flex;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.language-option:hover {
  background: #f3f4f6;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid #2563eb;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #2563eb;
}

.theme-toggle:hover {
  background: #2563eb;
  color: white;
  transform: scale(1.1);
}

.theme-toggle i {
  font-size: 1.1rem;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(to right, #1c7dff, #0051c4);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
}

.btn-primary:hover {
  background: #2289ff;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #2563eb;
  cursor: pointer;
}

/* Main Content */
.generator-main {
  padding-top: 100px;
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  transition: background 0.3s ease;
  padding-bottom: 4rem;
}

.generator-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 20px;
}

.generator-title {
  font-family: "NeueAlteGrotesk-Bold", sans-serif;
  font-size: 2.5rem;
  color: #1e3a8a;
  text-align: center;
  margin-bottom: 1rem;
}

.generator-subtitle {
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
  font-size: 1.125rem;
  color: #475569;
  text-align: center;
  margin-bottom: 3rem;
}

/* Form Styles */
.resume-form {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  font-size: 1.5rem;
  color: #1e3a8a;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e0f2fe;
}

.section-title i {
  color: #2563eb;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  font-size: 0.95rem;
  color: #334155;
}

.form-group input,
.form-group textarea {
  padding: 0.875rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: white;
  color: #334155;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Experience and Education Items */
.experience-item,
.education-item {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  position: relative;
}

/* Added language item styles */
.language-item {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  position: relative;
}

/* Added course item styles */
.course-item {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
  position: relative;
}

/* Add Buttons */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #60a5fa, #3b82f6);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  font-size: 0.95rem;
}

.btn-add:hover {
  background: linear-gradient(to right, #3b82f6, #2563eb);
  transform: translateY(-2px);
}

/* Added remove button styles */
.btn-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

.btn-remove:hover {
  background: linear-gradient(to right, #dc2626, #b91c1c);
  transform: translateY(-2px);
}

/* Added select dropdown styles */
.form-group select {
  padding: 0.875rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: white;
  color: #334155;
  cursor: pointer;
}

.form-group select:focus {
  outline: none;
  border-color: #2563eb;
}

/* Added photo upload styles */
.photo-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.photo-upload-label {
  cursor: pointer;
  display: block;
  width: 100%;
  max-width: 300px;
}

.photo-preview {
  width: 100%;
  height: 300px;
  border: 3px dashed #cbd5e1;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.photo-preview:hover {
  border-color: #2563eb;
  background: #f0f9ff;
}

.photo-preview.has-image {
  border-style: solid;
  border-color: #2563eb;
}

.photo-placeholder-icon {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.photo-preview p {
  color: #64748b;
  font-size: 1rem;
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  margin: 0;
}

.photo-size-hint {
  font-size: 0.875rem !important;
  color: #94a3b8 !important;
  font-family: "NeueAlteGrotesk-Regular", sans-serif !important;
  margin-top: 0.25rem !important;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.btn-remove-photo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "NeueAlteGrotesk-SemiBold", sans-serif;
  font-size: 0.95rem;
}

.btn-remove-photo:hover {
  background: linear-gradient(to right, #dc2626, #b91c1c);
  transform: translateY(-2px);
}

/* Generate Button */
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid #e0f2fe;
}

.btn-generate {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(to right, #10b981, #059669);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  font-family: "NeueAlteGrotesk-Bold", sans-serif;
}

.btn-generate:hover {
  background: linear-gradient(to right, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-generate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-generate i {
  font-size: 1.5rem;
}

/* Added loading spinner styles for form submission */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Added success message styles */
.success-message {
  background: white;
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: slideInUp 0.6s ease-out;
}

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

.success-icon {
  width: 80px;
  height: 80px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2.5rem;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.success-title {
  font-family: "NeueAlteGrotesk-Bold", sans-serif;
  font-size: 1.75rem;
  color: #10b981;
  margin-bottom: 1rem;
}

.success-subtitle {
  font-family: "NeueAlteGrotesk-Regular", sans-serif;
  color: #64748b;
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.continue-btn {
  background: linear-gradient(to right, #1c7dff, #0051c4);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-family: "NeueAlteGrotesk-Bold", sans-serif;
}

.continue-btn:hover {
  background: linear-gradient(to right, #2289ff, #1c7dff);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(28, 125, 255, 0.3);
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #030303;
  color: #ffffff;
}

body.dark-mode .header {
  background: #0a1525;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .navlogo {
  color: #60a5fa;
}

body.dark-mode .nav-menu {
  background: #0a1525;
}

body.dark-mode .nav-menu a {
  color: #e2e8f0;
}

body.dark-mode .nav-menu a:hover {
  color: #60a5fa;
}

body.dark-mode .btn-primary {
  background: #60a5fa;
  color: #1a1a1a;
}

body.dark-mode .btn-primary:hover {
  background: #3b82f6;
}

body.dark-mode .theme-toggle {
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark-mode .theme-toggle:hover {
  background: #60a5fa;
  color: #1a1a1a;
}

body.dark-mode .language-toggle {
  border-color: #60a5fa;
  color: #60a5fa;
}

body.dark-mode .language-toggle:hover {
  background: #60a5fa;
  color: #1a1a1a;
}

body.dark-mode .language-dropdown {
  background: #374151;
  border-color: #4b5563;
}

body.dark-mode .language-option {
  color: #d1d5db;
}

body.dark-mode .language-option:hover {
  background: #4b5563;
}

body.dark-mode .generator-main {
  background: linear-gradient(135deg, #0a1525 0%, #1a1a1a 100%);
}

body.dark-mode .generator-title {
  color: #60a5fa;
}

body.dark-mode .generator-subtitle {
  color: #d1d5db;
}

body.dark-mode .resume-form {
  background: #1a2332;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .section-title {
  color: #60a5fa;
  border-bottom-color: #1e3a8a;
}

body.dark-mode .form-group label {
  color: #d1d5db;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background: #0a1525;
  border-color: #374151;
  color: #e2e8f0;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  border-color: #60a5fa;
}

/* Added dark mode styles for select and photo upload */
body.dark-mode .form-group select {
  background: #0a1525;
  border-color: #374151;
  color: #e2e8f0;
}

body.dark-mode .photo-preview {
  background: #0a1525;
  border-color: #4b5563;
}

body.dark-mode .photo-preview:hover {
  border-color: #60a5fa;
  background: #1e3a8a;
}

body.dark-mode .photo-preview.has-image {
  border-color: #60a5fa;
}

body.dark-mode .photo-placeholder-icon {
  color: #4b5563;
}

body.dark-mode .photo-preview p {
  color: #9ca3af;
}

body.dark-mode .photo-size-hint {
  color: #6b7280 !important;
}

/* Added dark mode styles for success message */
body.dark-mode .success-message {
  background: #1a2332;
}

body.dark-mode .success-title {
  color: #34d399;
}

body.dark-mode .success-subtitle {
  color: #d1d5db;
}

body.dark-mode .experience-item,
body.dark-mode .education-item {
  background: #0a1525;
  border-color: #374151;
}

/* Added dark mode for language item */
body.dark-mode .language-item {
  background: #0a1525;
  border-color: #374151;
}

/* Added dark mode for course item */
body.dark-mode .course-item {
  background: #0a1525;
  border-color: #374151;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  body.dark-mode .nav-menu {
    background: #0a1525; /* Ensure dark mode background is consistent */
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
  }

  .nav-actions {
    gap: 0.5rem;
  }

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

  .theme-toggle {
    width: 35px;
    height: 35px;
  }

  .generator-main {
    padding-top: 80px;
  }

  .generator-title {
    font-size: 2rem;
  }

  .generator-subtitle {
    font-size: 1rem;
  }

  .resume-form {
    padding: 1.5rem;
  }

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

  .section-title {
    font-size: 1.25rem;
  }

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

@media (max-width: 480px) {
  .generator-title {
    font-size: 1.75rem;
  }

  .resume-form {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.125rem;
  }

  .btn-add {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .btn-generate {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .nav-actions .btn-primary {
    display: none;
  }
}
