:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --input-bg: #f3f4f6;
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --text-color: #f3f4f6;
  --bg-color: #1f2937;
  --input-bg: #374151;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.form-section {
  background-color: var(--input-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-section {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: white;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text-color);
}

button {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

button:hover {
  opacity: 0.9;
}

.template-selector {
  margin-bottom: 1rem;
}

.template-selector select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
}

.experience-item,
.education-item {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Danger Button */
.btn-danger {
  background-color: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-1px);
}

/* Icon Button */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 9999px;
}

/* Button Groups */
.btn-group {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

/* Button Icons */
.btn-icon-left {
  margin-right: 0.5rem;
}

.btn-icon-right {
  margin-left: 0.5rem;
}

/* Disabled State */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#preview {
  font-size: 14px;
}

.preview-header {
  text-align: center;
  margin-bottom: 2rem;
}

.preview-section h2 {
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

footer {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  height: 4rem;
  background-color: var(--primary-color);
  color: #d1d5db;
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  gap: 1rem;
  color: #d1d5db;
}

.footer-nav a {
  text-decoration: none;
  color: inherit;
}

.social-icons {
  display: flex;
  gap: 0.8rem;
  color: #d1d5db;
}

.social-icons a {
  text-decoration: none;
  color: inherit;
}

.copyright,
.social-icons a {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.copyright:hover,
.social-icons a:hover {
  opacity: 1;
}

@media (min-width: 546px) {
  footer {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn.active + .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    right: 3.5rem;
    border-radius: 0.5rem;
    background-color: var(--input-bg);
  }

  .nav-links button {
    background-color: transparent;
    color: var(--text-color);
  }

  .mobile-menu-btn {
    display: block;
    background-color: transparent;
    margin-top: 0.5rem;
    font-size: 1rem;
  }
  .container {
    grid-template-columns: 1fr;
  }
}

/* Professional Template Styles */
.preview-professional {
  font-family: 'Arial', sans-serif;
  line-height: 1.5;
}

.preview-professional .preview-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.preview-professional .preview-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.preview-professional .contact-info {
  display: flex;
  justify-content: space-between;
  max-width: 400px;
}

.preview-professional .preview-section {
  margin-bottom: 1.5rem;
}

.preview-professional h2 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.preview-professional .preview-item {
  margin-bottom: 1rem;
}

.preview-professional h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.preview-professional h4 {
  font-size: 1rem;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* Minimal Template Styles */
.preview-minimal {
  font-family: 'Helvetica', sans-serif;
  line-height: 1.4;
}

.preview-minimal .preview-header {
  text-align: center;
  margin-bottom: 1rem;
}

.preview-minimal .preview-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.preview-minimal hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

.preview-minimal .preview-section {
  margin-bottom: 1rem;
}

.preview-minimal h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.preview-minimal .item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.preview-minimal h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

.preview-minimal span {
  font-style: italic;
  font-size: 0.9rem;
}

/* Creative Template Styles */
.preview-creative {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

.preview-creative .preview-header {
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
}

.preview-creative .preview-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.preview-creative .contact-info {
  display: flex;
  gap: 1.5rem;
}

.preview-creative .preview-section {
  margin-bottom: 2rem;
}

.preview-creative h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.preview-creative .preview-item {
  margin-bottom: 1.5rem;
}

.preview-creative .item-header {
  margin-bottom: 0.5rem;
}

.preview-creative h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.preview-creative .company-name {
  font-weight: 500;
  display: block;
  margin-bottom: 0.25rem;
}

.preview-creative .duration {
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #666;
}

.preview-creative .skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-creative .skill-tag {
  background-color: #f0f4f8;
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
}