/* Reset and Base Styles */

/* Navigation Bar Styles */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a6cf7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4a6cf7;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4a6cf7;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Footer Styles */
.footer {
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 3rem 0 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: #4a6cf7;
}

.footer-section p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-section.links ul {
    list-style: none;
}

.footer-section.links li {
    margin-bottom: 0.8rem;
}

.footer-section.links a {
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section.links a:hover {
    color: #4a6cf7;
}

.footer-section.contact i {
    margin-right: 0.5rem;
    color: #4a6cf7;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #333;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #4a6cf7;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

.footer-bottom p {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        gap: 0;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 0.8rem 1.5rem;
        width: 100%;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Modal Styles */
.modal-overlay {
    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: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: #4a6cf7;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem;
    color: #333;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.modal-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #555;
}

.modal-body a {
    color: #4a6cf7;
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Template Section */
.template-section {
    padding: 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.template-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2d3748;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.template-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.template-card.active {
    border-color: #667eea;
    background: #f7faff;
}

.template-preview {
    height: 80px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
}

.modern-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.classic-preview {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.minimal-preview {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

.template-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.template-card p {
    font-size: 0.9rem;
    color: #718096;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 800px;
}

/* Form Section */
.form-section {
    display: flex;
    flex-direction: column;
    height: 800px;
}

.section-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #667eea;
    font-size: 1.2rem;
}

.section-header p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.form-content {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.form-content form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-actions {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 25px;
    flex-shrink: 0;
}

.form-group:last-child {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.form-group h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group h3 i {
    color: #667eea;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group:last-child textarea {
    flex: 1;
    min-height: 120px;
    resize: none;
}

/* Dynamic Items */
.experience-item, .education-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-btn:hover {
    background: #dc2626;
}

.add-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:hover {
    background: #5a67d8;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Preview Section */
.preview-section {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-btn {
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.zoom-btn:hover {
    background: #cbd5e0;
}

#zoomLevel {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    min-width: 50px;
    text-align: center;
}

.preview-container {
    flex: 1;
    padding: 30px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Resume Preview Styles */
.resume-preview {
    width: 8.5in;
    min-height: 11in;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform-origin: top center;
    transition: transform 0.3s ease;
}

/* Modern Template */
.modern-template {
    font-family: 'Inter', sans-serif;
    color: #2d3748;
    line-height: 1.5;
}

.modern-template .resume-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.modern-template .resume-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.modern-template .resume-contact {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.modern-template .resume-body {
    padding: 40px;
}

.modern-template .resume-section {
    margin-bottom: 30px;
}

.modern-template .section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
}

/* Classic Template */
.classic-template {
    font-family: 'Times New Roman', serif;
    color: #000;
    line-height: 1.4;
}

.classic-template .resume-header {
    text-align: center;
    padding: 30px 40px;
    border-bottom: 2px solid #000;
}

.classic-template .resume-name {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.classic-template .resume-contact {
    font-size: 0.9rem;
}

.classic-template .resume-body {
    padding: 30px 40px;
}

.classic-template .resume-section {
    margin-bottom: 30px;
}

.classic-template .section-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
}

/* Minimal Template */
.minimal-template {
    font-family: 'Inter', sans-serif;
    color: #374151;
    line-height: 1.5;
}

.minimal-template .resume-header {
    padding: 40px;
    border-bottom: 1px solid #e5e7eb;
}

.minimal-template .resume-name {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: #111827;
}

.minimal-template .resume-contact {
    font-size: 0.9rem;
    color: #6b7280;
}

.minimal-template .resume-body {
    padding: 40px;
}

.minimal-template .resume-section {
    margin-bottom: 30px;
}

.minimal-template .section-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Common Resume Elements */
.resume-item {
    margin-bottom: 20px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.item-title {
    font-weight: 600;
}

.item-subtitle {
    font-style: italic;
    color: #6b7280;
}

.item-date {
    font-size: 0.9rem;
    color: #6b7280;
    white-space: nowrap;
}

.item-description {
    margin-top: 8px;
}

.item-description ul {
    margin-left: 20px;
}

.item-description li {
    margin-bottom: 3px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #374151;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
    
    .resume-preview {
        transform: scale(0.7);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .template-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .resume-preview {
        transform: scale(0.5);
        width: 100%;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .main-content {
        box-shadow: none;
        border-radius: 0;
    }
    
    .template-section,
    .form-section,
    .preview-header {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        border: none;
        background: white;
    }
    
    .preview-container {
        padding: 0;
    }
    
    .resume-preview {
        transform: none;
        box-shadow: none;
        width: 100%;
    }
}

/* Message Overlay Styles */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.message-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

.message-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.message-overlay.error .message-icon {
    color: #ef4444;
}

.message-overlay.success .message-icon {
    color: #10b981;
}

.message-overlay.loading .message-icon {
    color: #667eea;
}

.message-overlay.info .message-icon {
    color: #3b82f6;
}

.message-text {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.5;
}

.message-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.message-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Form Validation Styles */
input.error, textarea.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

input.success, textarea.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles for Better Accessibility */
button:focus,
input:focus,
textarea:focus,
.template-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .template-card {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .message-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .message-overlay,
    .message-content {
        animation: none;
    }
}

/* Dark Mode Support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded for dark mode support */
    .message-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .message-text {
        color: #e5e7eb;
    }
}

/* Section-Aware Pagination Styles */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1rem;
}

.page-nav-btn {
    background: #4a6cf7;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    min-width: 36px;
    height: 36px;
}

.page-nav-btn:hover:not(:disabled) {
    background: #3b5ce6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

.page-nav-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.page-info {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
}

/* Pagination container styles */
.preview-container.paginated {
    position: relative;
}

.pagination-container {
    position: relative;
    overflow: hidden;
}

.page-indicator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.page-container {
    box-sizing: border-box;
}

/* Responsive pagination controls */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .page-nav-btn {
        padding: 6px 10px;
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .page-info {
        font-size: 12px;
        min-width: 80px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: #667eea;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #e2e8f0;
    color: #4a5568;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #4a5568;
}

.modal-body ul {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #4a5568;
}

.modal-body a {
    color: #667eea;
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Feedback Form Styles */
.feedback-form {
    max-width: 100%;
}

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

.feedback-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

.feedback-form select,
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.feedback-form select:focus,
.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.feedback-form textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-form small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #718096;
}

/* Star Rating Styles */
.rating-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.5rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    user-select: none;
}

.star:hover,
.star.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.star.active {
    color: #f59e0b;
}

.rating-text {
    font-size: 0.9rem;
    color: #718096;
    min-width: 80px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.form-actions .btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-actions .btn-primary {
    background: #667eea;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.form-actions .btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.form-actions .btn-secondary:hover {
    background: #cbd5e0;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .star {
        font-size: 1.25rem;
    }
    
    .rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Custom Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.3;
    width: 240px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-5px);
    z-index: 1000;
    margin-top: 8px;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #333;
}

.tooltip-container:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Enhanced hover area for feedback links */
.feedback-link-wrapper {
    position: relative;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.feedback-link-wrapper:hover {
    background-color: rgba(74, 108, 247, 0.08);
}

/* Footer tooltip positioning */
.footer .tooltip {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 8px;
}

.footer .tooltip::after {
    top: -6px;
    border-top-color: transparent;
    border-bottom-color: #333;
}

/* Exit Intent Popup Styles - GDPR Compliant */
.exit-intent-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.exit-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.exit-popup-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

.exit-popup-header {
    background: linear-gradient(135deg, #4a6cf7 0%, #667eea 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exit-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.exit-popup-header h3 i {
    margin-right: 8px;
    color: #ff6b6b;
}

.exit-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.exit-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.exit-popup-body {
    padding: 25px;
    text-align: center;
}

.exit-popup-body p {
    margin: 0 0 25px 0;
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

.exit-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.exit-feedback-btn {
    background: linear-gradient(135deg, #4a6cf7 0%, #667eea 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.exit-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 108, 247, 0.3);
    text-decoration: none;
    color: white;
}

.exit-close-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.exit-close-btn:hover {
    background: #e9ecef;
}

.exit-popup-note {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.exit-popup-note i {
    color: #28a745;
}

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

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

@media (max-width: 768px) {
    .exit-popup-content {
        margin: 20px;
        max-width: none;
    }
    
    .exit-popup-buttons {
        flex-direction: column;
    }
    
    .exit-feedback-btn,
    .exit-close-btn {
        width: 100%;
        justify-content: center;
    }
}
