:root {
    --primary-color: #4a6bff;
    --secondary-color: #f0f2f5;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --error-color: #ff4d4f;
    --success-color: #52c41a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

header p {
    color: var(--light-text);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s;
    background-color: white;
}

.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pdf-icon {
    width: 80px;
    height: 80px;
    opacity: 0.7;
}

.options-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.option-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.option-group label {
    min-width: 150px;
    font-weight: 500;
}

.option-group select, .option-group input[type="number"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
}

.option-group input[type="range"] {
    flex-grow: 1;
    max-width: 200px;
}

#customRange {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    padding-left: 160px;
}

#customRange input {
    width: 80px;
}

.hidden {
    display: none !important;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: #3a5bef;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn.secondary:hover {
    background-color: #e0e3eb;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.preview-container, .result-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item, .result-item {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    background-color: white;
    position: relative;
}

.preview-item img, .result-item img {
    width: 100%;
    height: auto;
    display: block;
}

.page-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.result-item {
    cursor: pointer;
    transition: all 0.2s;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-item.selected {
    border: 2px solid var(--primary-color);
}

.checkbox-container {
    position: absolute;
    top: 5px;
    right: 5px;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.download-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--light-text);
    font-size: 14px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    margin-top: 20px;
    background-color: #f3f3f3;
    border-radius: 5px;
    height: 20px;
    position: relative;
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 5px;
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

#progressText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .option-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-group label {
        margin-bottom: 5px;
    }
    
    #customRange {
        padding-left: 0;
    }
    
    .action-buttons, .download-options {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

.faq-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: 12px;
  }
  
  .faq-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
  }
  
  .faq {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: transparent;
    overflow: hidden;
  }
  
  .faq-question {
    background: transparent;
    color: var(--light-text);
    width: 100%;
    text-align: left;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  
  .faq-question:hover {
    background: #bae6fd;
  }
  
  .faq-answer {
    padding: 1rem;
    display: none;
    font-size: 0.95rem;
    color: #334155;
    background-color: #f8fafc;
  }
  
  
/* Footer with better spacing */
footer {
    background-color: var(--footer-bg);
    padding: 1.5rem 5%;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.5rem 1rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    font-size: clamp(0.8rem, 3vw, 1rem);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    opacity: 0.7;
}













/* Navbar Styles */
.navbar {
  background-color: #4361ee;
  color: white;
  padding: 1rem;
  position: relative;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-logo {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
}

.hamburger {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
}

/* Dropdown Styles */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #4361ee;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 0 0 4px 4px;
}

.dropdown-content a {
  padding: 12px 16px;
  border-bottom: 1px solid #2c3e50;
}

.dropdown-content a:hover {
  background-color: #2c3e50;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.arrow {
  font-size: 0.7em;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  
  .nav-toggle:checked ~ .nav-menu {
    display: flex;
  }
  
  .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
  }
  
  .dropdown:hover .dropdown-content {
    display: none;
  }
  
  .nav-toggle:checked ~ .nav-menu .dropdown-content {
    display: none;
  }
  
  .dropdown.active .dropdown-content {
    display: block !important;
  }
  
  .dropdown-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}