/* CSS Variables for consistent theming */
:root {
   --primary-color: #3498db;
   --primary-dark: #2980b9;
   --secondary-color: #2ecc71;
   --secondary-dark: #27ae60;
   --danger-color: #e74c3c;
   --danger-dark: #c0392b;
   --warning-color: #f1c40f;
   --warning-dark: #f39c12;
   --purple-color: #9b59b6;
   --purple-dark: #8e44ad;
   --dark-color: #2c3e50;
   --darker-color: #34495e;
   --light-gray: #ecf0f1;
   --medium-gray: #bdc3c7;
   --dark-gray: #7f8c8d;
   --text-color: #333;
   --text-light: #666;
   --text-lighter: #999;
   --bg-white: #ffffff;
   --bg-light: #f8f9fa;
   --bg-lighter: #f5f5f5;
   --border-color: #ddd;
   --border-light: #e2e8f0;
   --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
   --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
   --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
   --radius-sm: 4px;
   --radius-md: 6px;
   --radius-lg: 8px;
   --radius-xl: 12px;
   --transition: all 0.3s ease;
   --transition-fast: all 0.2s ease;
}

/* Reset and base styles */
* {
   box-sizing: border-box;
}

body {
   margin: 0;
   padding: 0;
   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-white);
}

/* Navigation and header styling */
.menu-column {
   display: flex;
   justify-content: flex-end;
}

.main-nav ul {
   display: flex;
   list-style: none;
   margin: 0;
   padding: 0;
}

.main-nav li {
   margin-left: 30px;
}

.main-nav a {
   color: var(--text-color);
   text-decoration: none;
   font-weight: 700;
   padding: 8px 0;
   position: relative;
   transition: var(--transition);
}

.main-nav a:hover {
   color: var(--primary-color);
}

.main-nav a::after {
   content: '';
   position: absolute;
   width: 0;
   height: 2px;
   bottom: 0;
   left: 0;
   background-color: var(--primary-color);
   transition: var(--transition);
}

.main-nav a:hover::after {
   width: 100%;
}

/* Page structure */
.page-wrapper {
   max-width: 1000px;
   margin: 0 auto;
   padding: 0 20px;
}

header {
   text-align: left;
   margin-bottom: 20px;
}

/* Upload area styling */
.upload-area {
   border: 2px dashed var(--primary-color);
   background-color: var(--bg-light);
   border-radius: var(--radius-lg);
   padding: 50px 30px;
   text-align: center;
   cursor: pointer;
   margin-bottom: 30px;
   transition: var(--transition);
   position: relative;
   overflow: hidden;
}

.upload-area::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
   transition: left 0.5s;
}

.upload-area:hover::before {
   left: 100%;
}

.upload-area:hover {
   border-color: var(--primary-dark);
   background-color: var(--bg-white);
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

.upload-area.active {
   border-color: var(--secondary-color);
   background-color: #e8f5e8;
   transform: scale(1.02);
}

.upload-icon {
   font-size: 60px;
   color: var(--primary-color);
   margin-bottom: 20px;
   display: block;
   transition: var(--transition);
}

.upload-area:hover .upload-icon {
   transform: scale(1.1);
   color: var(--primary-dark);
}

.message-text h3 {
   margin: 0 0 10px 0;
   color: var(--dark-color);
   font-size: 20px;
   font-weight: 600;
}

.message-text p {
   margin: 0;
   color: var(--text-light);
   font-size: 14px;
}

/* File information styling */
.file-info {
   margin: 25px 0;
   padding: 20px 25px;
   background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
   border-radius: var(--radius-lg);
   display: none;
   box-shadow: var(--shadow-sm);
   animation: slideInUp 0.3s ease;
}

.file-info p {
   margin: 0;
   font-weight: 500;
   color: var(--dark-color);
}

/* Button styling */
.button-group {
   display: flex;
   justify-content: center;
   gap: 20px;
   margin: 30px 0 20px 0;
   flex-wrap: wrap;
}

button, .button {
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
   color: white;
   border: none;
   padding: 16px 32px;
   border-radius: 50px;
   cursor: pointer;
   font-size: 16px;
   font-weight: 600;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   transition: var(--transition);
   text-decoration: none;
   text-align: center;
   box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
   position: relative;
   overflow: hidden;
   min-width: 160px;
}

button::before {
   content: '';
   position: absolute;
   top: 0;
   left: -100%;
   width: 100%;
   height: 100%;
   background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
   transition: left 0.5s;
}

button:hover::before {
   left: 100%;
}

button:hover, .button:hover {
   transform: translateY(-3px);
   box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
   background: linear-gradient(135deg, var(--primary-dark), #1f5f99);
}

button:active {
   transform: translateY(-1px);
}

#resetBtn {
   background: linear-gradient(135deg, var(--danger-color), var(--danger-dark));
   box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

#resetBtn:hover {
   background: linear-gradient(135deg, var(--danger-dark), #a93226);
   box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

button:disabled {
   background: var(--medium-gray);
   cursor: not-allowed;
   transform: none;
   box-shadow: none;
   opacity: 0.6;
}

button:disabled::before {
   display: none;
}

/* Full page view button */
.fullpage-btn {
   background: linear-gradient(135deg, var(--purple-color), var(--purple-dark));
   color: white;
   border: none;
   padding: 10px 16px;
   border-radius: var(--radius-md);
   cursor: pointer;
   font-size: 13px;
   font-weight: 600;
   transition: var(--transition);
   box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
   min-width: auto;
}

.fullpage-btn:hover {
   background: linear-gradient(135deg, var(--purple-dark), #7d3c98);
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

/* Options and form controls */
.options {
   margin: 30px 0;
   padding: 25px;
   background: var(--bg-light);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-sm);
   border: 1px solid var(--border-light);
}

.options label {
   display: block;
   margin-bottom: 8px;
   font-weight: 600;
   color: var(--dark-color);
   font-size: 14px;
}

.checkbox-option {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-top: 15px;
}

.checkbox-option input[type="checkbox"] {
   width: 18px;
   height: 18px;
   accent-color: var(--primary-color);
   cursor: pointer;
}

.checkbox-option label {
   margin-bottom: 0;
   cursor: pointer;
   font-weight: 500;
}

select {
   width: 100%;
   padding: 12px 16px;
   border: 2px solid var(--border-color);
   border-radius: var(--radius-md);
   background-color: var(--bg-white);
   margin-bottom: 15px;
   font-size: 14px;
   color: var(--text-color);
   transition: var(--transition);
   cursor: pointer;
}

select:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

select:hover {
   border-color: var(--primary-color);
}

/* Progress bar styling */
.progress-container {
   display: none;
   margin: 30px 0;
   animation: fadeIn 0.3s ease;
}

.progress-bar {
   height: 8px;
   background-color: var(--light-gray);
   border-radius: 50px;
   margin-bottom: 15px;
   overflow: hidden;
   box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress {
   height: 100%;
   background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
   width: 0%;
   transition: width 0.4s ease;
   border-radius: 50px;
   position: relative;
   overflow: hidden;
}

.progress::after {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   bottom: 0;
   right: 0;
   background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
   animation: shimmer 1.5s infinite;
}

#progressText {
   font-size: 14px;
   color: var(--dark-gray);
   text-align: center;
   font-weight: 500;
}

/* Error and success messages */
.error {
   color: var(--danger-dark);
   background: linear-gradient(135deg, #fadbd8, #f5b7b1);
   padding: 16px 20px;
   border-radius: var(--radius-md);
   margin: 20px 0;
   display: none;
   box-shadow: var(--shadow-sm);
   font-weight: 500;
   animation: shake 0.5s ease;
}

.success {
   background: linear-gradient(135deg, #e7f7ed, #d5f4e6);
   border: 2px solid var(--secondary-color);
   border-radius: var(--radius-lg);
   padding: 25px;
   margin: 30px 0;
   display: none;
   box-shadow: var(--shadow-lg);
   text-align: center;
   transition: var(--transition);
   animation: slideInUp 0.5s ease;
}

.success-content {
   display: flex;
   flex-direction: column;
   align-items: center;
}

.success-header {
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 20px;
   width: 100%;
   flex-wrap: wrap;
   gap: 15px;
}

.success-icon {
   font-size: 32px;
   color: var(--secondary-color);
   margin-right: 12px;
   animation: bounce 1s ease;
}

.success-title {
   font-size: 20px;
   font-weight: 700;
   color: var(--secondary-dark);
   flex: 1;
   min-width: 200px;
}

/* Content containers */
.full-width-wrapper {
   display: flex;
   flex-direction: column;
   gap: 30px;
   width: 100%;
   margin-top: 40px;
}

.info-container-full {
   width: 100%;
   padding: 35px 35px 45px;
   border: none;
   border-radius: var(--radius-xl);
   box-shadow: var(--shadow-lg);
   background-color: var(--bg-white);
   position: relative;
   transition: var(--transition);
}

.info-container-full:hover {
   transform: translateY(-2px);
   box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.info-header {
   display: flex;
   align-items: center;
   gap: 15px;
   margin-bottom: 25px;
}

.info-icon {
   font-size: 28px;
}

.info-header h2 {
   font-size: 26px;
   font-weight: 700;
   color: var(--dark-color);
   margin: 0;
}

.content-row-2 {
   padding: 40px 0;
   background: linear-gradient(135deg, var(--bg-lighter), #f8f9fa);
   width: 100%;
}

/* Accent bars */
.accent-bar {
   position: absolute;
   bottom: 0;
   left: 0;
   width: 100%;
   border-bottom-left-radius: var(--radius-xl);
   border-bottom-right-radius: var(--radius-xl);
   height: 6px;
}

.accent-bar.tricolor-bgr {
   background: linear-gradient(to right, 
       var(--primary-color) 0%, var(--primary-color) 33.33%, 
       var(--secondary-color) 33.33%, var(--secondary-color) 66.66%, 
       var(--danger-color) 66.66%, var(--danger-color) 100%);
}

.accent-bar.blue {
   background-color: var(--primary-color);
}

.accent-bar.green {
   background-color: var(--secondary-color);
}

.accent-bar.yellow {
   background-color: var(--warning-color);
}

/* List styling */
.info-container-full ol,
.info-container-full ul {
   padding-left: 0;
   list-style-position: inside;
   margin: 20px 0;
}

.info-container-full ol {
   counter-reset: item;
   list-style-type: none;
}

.info-container-full ol li {
   position: relative;
   padding-left: 50px;
   margin-bottom: 20px;
   counter-increment: item;
   font-size: 16px;
   line-height: 1.6;
}

.info-container-full ol li:before {
   content: counter(item);
   position: absolute;
   left: 0;
   top: 50%;
   transform: translateY(-50%);
   width: 36px;
   height: 36px;
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
   color: white;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-weight: bold;
   font-size: 16px;
   box-shadow: var(--shadow-md);
}

.info-container-full ul {
   list-style-type: none;
}

.info-container-full ul li {
   position: relative;
   padding-left: 32px;
   margin-bottom: 15px;
   font-size: 16px;
   line-height: 1.6;
}

.info-container-full ul li:before {
   content: "";
   position: absolute;
   left: 0;
   top: 10px;
   width: 14px;
   height: 14px;
   border-radius: var(--radius-sm);
   box-shadow: var(--shadow-sm);
}

.info-container-full ul li:nth-child(1):before {
   background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.info-container-full ul li:nth-child(2):before {
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.info-container-full ul li:nth-child(3):before {
   background: linear-gradient(135deg, var(--warning-color), var(--warning-dark));
}

.info-container-full ul li:nth-child(4):before {
   background: linear-gradient(135deg, var(--danger-color), var(--danger-dark));
}

.info-container-full ul li:nth-child(5):before {
   background: linear-gradient(135deg, var(--purple-color), var(--purple-dark));
}

/* Document content containers - FIXED */
.docx-content-container,
.text-container,
.markdown-container {
   margin-top: 25px;
   max-height: 600px;
   overflow: auto;
   border: 2px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-sm);
   width: 100%;
   max-width: 100%;
   box-sizing: border-box;
}

.docx-content-container {
   background-color: var(--bg-white);
   padding: 25px;
}

.text-container,
.markdown-container {
   background-color: var(--bg-light);
}

/* Document content - FIXED HTML WIDTH */
.docx-content {
   font-family: 'Times New Roman', Times, serif;
   font-size: 16px;
   line-height: 1.7;
   color: var(--text-color);
   max-width: 100%;
   width: 100%;
   box-sizing: border-box;
   overflow-wrap: break-word;
   word-wrap: break-word;
}

/* Ensure all HTML content elements respect container boundaries - FIXED */
.docx-content *,
.docx-content table,
.docx-content img,
.docx-content div,
.docx-content p {
   max-width: 100% !important;
   word-wrap: break-word;
   overflow-wrap: break-word;
   box-sizing: border-box;
}

.docx-content table {
   width: 100% !important;
   table-layout: fixed;
}

.docx-content td,
.docx-content th {
   word-wrap: break-word;
   overflow-wrap: break-word;
   max-width: 0;
}

/* Text and markdown content - FIXED */
.text-content,
.markdown-content {
   padding: 25px;
   margin: 0;
   font-family: 'Fira Code', 'Courier New', monospace;
   font-size: 14px;
   line-height: 1.6;
   color: var(--text-color);
   white-space: pre-wrap;
   word-wrap: break-word;
   max-width: 100%;
   overflow-wrap: break-word;
   background-color: var(--bg-white);
   border-radius: var(--radius-md);
   border: 1px solid var(--border-light);
   width: 100%;
   box-sizing: border-box;
}

/* Ensure markdown content respects container boundaries - FIXED */
.markdown-content *,
.text-content * {
   max-width: 100%;
   word-wrap: break-word;
   overflow-wrap: break-word;
}

/* Document content styling */
.docx-content h1,
.docx-content h2,
.docx-content h3,
.docx-content h4,
.docx-content h5,
.docx-content h6 {
   color: var(--dark-color);
   margin-top: 25px;
   margin-bottom: 15px;
   font-weight: 600;
}

.docx-content h1 { font-size: 28px; }
.docx-content h2 { font-size: 24px; }
.docx-content h3 { font-size: 20px; }
.docx-content h4 { font-size: 18px; }
.docx-content h5 { font-size: 16px; }
.docx-content h6 { font-size: 14px; }

.docx-content p {
   margin-bottom: 15px;
   text-align: justify;
}

.docx-content ul,
.docx-content ol {
   margin: 15px 0;
   padding-left: 35px;
}

.docx-content table th,
.docx-content table td {
   border: 1px solid var(--border-color);
   padding: 12px 16px;
   text-align: left;
}

.docx-content table th {
   background: linear-gradient(135deg, var(--bg-light), #e9ecef);
   font-weight: 600;
   color: var(--dark-color);
}

.docx-content table tr:nth-child(even) {
   background-color: #f8f9fa;
}

/* Document info styling */
.docx-info {
   text-align: center;
   margin: 20px 0;
   padding: 15px;
   background: linear-gradient(135deg, #f8f9fa, #e9ecef);
   border-radius: var(--radius-md);
   border: 1px solid var(--border-light);
}

.docx-info h3 {
   margin: 0 0 8px 0;
   color: var(--dark-color);
   font-size: 18px;
   font-weight: 600;
}

.docx-info p {
   margin: 0;
   color: var(--text-light);
   font-size: 14px;
   font-weight: 500;
}

/* FAQ section styling */
.faq-section {
   margin-top: 25px;
}

.faq-item {
   margin-bottom: 15px;
   border: 2px solid var(--border-light);
   border-radius: var(--radius-lg);
   overflow: hidden;
   transition: var(--transition);
   background-color: var(--bg-white);
}

.faq-item:hover {
   box-shadow: var(--shadow-md);
   transform: translateY(-1px);
}

.faq-question {
   padding: 22px 25px;
   background: linear-gradient(135deg, var(--bg-light), #f1f3f4);
   cursor: pointer;
   font-weight: 600;
   display: flex;
   justify-content: space-between;
   align-items: center;
   transition: var(--transition);
   color: var(--dark-color);
   font-size: 16px;
}

.faq-question:hover {
   background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.faq-item.active .faq-question {
   background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
   color: white;
}

.faq-answer {
   padding: 0 25px;
   max-height: 0;
   overflow: hidden;
   background: var(--bg-white);
   transition: all 0.4s ease;
   color: var(--text-light);
   line-height: 1.7;
   font-size: 15px;
}

.faq-item.active .faq-answer {
   padding: 25px;
   max-height: 500px;
}

.faq-toggle {
   font-size: 24px;
   font-weight: bold;
   transition: var(--transition);
   color: var(--primary-color);
   width: 30px;
   height: 30px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   background-color: rgba(52, 152, 219, 0.1);
}

.faq-item.active .faq-toggle {
   transform: rotate(45deg);
   color: white;
   background-color: rgba(255, 255, 255, 0.2);
}

/* Full page view styling */
.fullpage-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.95);
   z-index: 9999;
   display: none;
   overflow: auto;
   animation: fadeIn 0.3s ease;
}

.fullpage-content {
   position: relative;
   width: 100%;
   height: 100%;
   padding: 25px;
   box-sizing: border-box;
}

.fullpage-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   background: linear-gradient(135deg, var(--dark-color), var(--darker-color));
   color: white;
   padding: 20px 25px;
   margin-bottom: 25px;
   border-radius: var(--radius-lg);
   position: sticky;
   top: 25px;
   z-index: 10000;
   box-shadow: var(--shadow-lg);
}

.fullpage-title {
   font-size: 20px;
   font-weight: 600;
   margin: 0;
   flex: 1;
}

.fullpage-controls {
   display: flex;
   gap: 20px;
   align-items: center;
   flex-wrap: wrap;
}

.fullpage-zoom-controls {
   display: flex;
   gap: 12px;
   align-items: center;
   background-color: rgba(255, 255, 255, 0.1);
   padding: 8px 12px;
   border-radius: 50px;
}

.zoom-btn {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.zoom-btn:hover {
    background-color: #4a6278;
}

.zoom-level {
    color: #ecf0f1;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
}

.close-fullpage {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.close-fullpage:hover {
    background-color: #c0392b;
}


.keyboard-hint {
   font-size: 12px;
   color: rgba(255, 255, 255, 0.7);
   margin-left: 8px;
font-weight: normal;
}

.fullpage-document-container {
   background-color: var(--bg-white);
   border-radius: var(--radius-lg);
   overflow: auto;
   max-height: calc(100vh - 140px);
   border: 2px solid var(--border-color);
   padding: 40px;
   box-sizing: border-box;
   box-shadow: var(--shadow-lg);
}

/* Full page content styling - FIXED */
.fullpage-html-content,
.fullpage-text-content,
.fullpage-markdown-content {
   transition: font-size 0.3s ease;
   max-width: 100%;
   width: 100%;
   box-sizing: border-box;
   overflow-wrap: break-word;
   word-wrap: break-word;
}

.fullpage-html-content {
   font-family: 'Times New Roman', Times, serif;
   line-height: 1.7;
   color: var(--text-color);
}

.fullpage-text-content,
.fullpage-markdown-content {
   font-family: 'Fira Code', 'Courier New', monospace;
   line-height: 1.6;
   color: var(--text-color);
   white-space: pre-wrap;
}

/* Ensure all fullpage content elements respect container boundaries - FIXED */
.fullpage-html-content *,
.fullpage-html-content table,
.fullpage-html-content img,
.fullpage-html-content div,
.fullpage-html-content p,
.fullpage-text-content *,
.fullpage-markdown-content * {
   max-width: 100% !important;
   word-wrap: break-word;
   overflow-wrap: break-word;
   box-sizing: border-box;
}

.fullpage-html-content table {
   width: 100% !important;
   table-layout: fixed;
}

.fullpage-html-content td,
.fullpage-html-content th {
   word-wrap: break-word;
   overflow-wrap: break-word;
   max-width: 0;
}

.fullpage-text-content pre,
.fullpage-markdown-content pre {
   white-space: pre-wrap;
   word-wrap: break-word;
   max-width: 100%;
   overflow-wrap: break-word;
   margin: 0;
   padding: 0;
   font-family: inherit;
   font-size: inherit;
   line-height: inherit;
}

.fullpage-html-content h1,
.fullpage-html-content h2,
.fullpage-html-content h3,
.fullpage-html-content h4,
.fullpage-html-content h5,
.fullpage-html-content h6 {
   color: var(--dark-color);
   margin-top: 25px;
   margin-bottom: 15px;
   font-weight: 600;
}

.fullpage-html-content p {
   margin-bottom: 15px;
   text-align: justify;
}

.fullpage-html-content ul,
.fullpage-html-content ol {
   margin: 15px 0;
   padding-left: 35px;
}

.fullpage-html-content table {
   border-collapse: collapse;
   margin: 20px 0;
   box-shadow: var(--shadow-sm);
   border-radius: var(--radius-md);
   overflow: hidden;
}

.fullpage-html-content table th,
.fullpage-html-content table td {
   border: 1px solid var(--border-color);
   padding: 12px 16px;
   text-align: left;
}

.fullpage-html-content table th {
   background: linear-gradient(135deg, var(--bg-light), #e9ecef);
   font-weight: 600;
   color: var(--dark-color);
}

.fullpage-html-content table tr:nth-child(even) {
   background-color: #f8f9fa;
}

/* Zoom levels for full page view */
.zoom-75 { font-size: 12px !important; }
.zoom-75 h1 { font-size: 18px !important; }
.zoom-75 h2 { font-size: 16px !important; }
.zoom-75 h3 { font-size: 14px !important; }
.zoom-75 h4 { font-size: 13px !important; }
.zoom-75 h5 { font-size: 12px !important; }
.zoom-75 h6 { font-size: 11px !important; }

.zoom-90 { font-size: 14px !important; }
.zoom-90 h1 { font-size: 21px !important; }
.zoom-90 h2 { font-size: 18px !important; }
.zoom-90 h3 { font-size: 16px !important; }
.zoom-90 h4 { font-size: 15px !important; }
.zoom-90 h5 { font-size: 14px !important; }
.zoom-90 h6 { font-size: 13px !important; }

.zoom-100 { font-size: 16px !important; }
.zoom-100 h1 { font-size: 24px !important; }
.zoom-100 h2 { font-size: 20px !important; }
.zoom-100 h3 { font-size: 18px !important; }
.zoom-100 h4 { font-size: 17px !important; }
.zoom-100 h5 { font-size: 16px !important; }
.zoom-100 h6 { font-size: 15px !important; }

.zoom-110 { font-size: 18px !important; }
.zoom-110 h1 { font-size: 27px !important; }
.zoom-110 h2 { font-size: 22px !important; }
.zoom-110 h3 { font-size: 20px !important; }
.zoom-110 h4 { font-size: 19px !important; }
.zoom-110 h5 { font-size: 18px !important; }
.zoom-110 h6 { font-size: 17px !important; }

.zoom-125 { font-size: 20px !important; }
.zoom-125 h1 { font-size: 30px !important; }
.zoom-125 h2 { font-size: 25px !important; }
.zoom-125 h3 { font-size: 22px !important; }
.zoom-125 h4 { font-size: 21px !important; }
.zoom-125 h5 { font-size: 20px !important; }
.zoom-125 h6 { font-size: 19px !important; }

.zoom-150 { font-size: 24px !important; }
.zoom-150 h1 { font-size: 36px !important; }
.zoom-150 h2 { font-size: 30px !important; }
.zoom-150 h3 { font-size: 26px !important; }
.zoom-150 h4 { font-size: 25px !important; }
.zoom-150 h5 { font-size: 24px !important; }
.zoom-150 h6 { font-size: 23px !important; }

/* Loading states */
.loading-spinner {
   border: 4px solid var(--light-gray);
   border-top: 4px solid var(--primary-color);
   border-radius: 50%;
   width: 50px;
   height: 50px;
   animation: spin 1s linear infinite;
   margin: 20px auto;
}

.docx-content-container.loading,
.text-container.loading,
.markdown-container.loading {
   display: flex;
   align-items: center;
   justify-content: center;
   height: 200px;
   background-color: var(--bg-light);
}

/* Recommendations section */
.conversion-recommendations {
   background: linear-gradient(135deg, var(--bg-white), var(--bg-light));
   border-radius: var(--radius-lg);
   padding: 25px;
   margin: 35px 0;
   box-shadow: var(--shadow-sm);
   border: 1px solid var(--border-light);
   transition: var(--transition);
}

.conversion-recommendations:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

.recommendations-content {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 15px;
   flex-wrap: wrap;
}

.recommendations-icon {
   font-size: 22px;
}

.recommendations-text {
   font-size: 16px;
   color: var(--text-light);
   font-weight: 500;
}

.tool-link {
   padding: 8px 16px;
   border-radius: 50px;
   text-decoration: none;
   font-weight: 600;
   font-size: 14px;
   transition: var(--transition);
   box-shadow: var(--shadow-sm);
}

.tool-link.compress {
   background: linear-gradient(135deg, #81DCA1, #6bc788);
   color: #2d5a3d;
}

.tool-link.compress:hover {
   background: linear-gradient(135deg, #6bc788, #5cb876);
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

.tool-link.webp {
   background: linear-gradient(135deg, #ff9800, #e68900);
   color: #5d3600;
}

.tool-link.webp:hover {
   background: linear-gradient(135deg, #e68900, #cc7a00);
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

.tool-link.avif {
   background: linear-gradient(135deg, #B8DFFF, #9fd1ff);
   color: #1a4480;
}

.tool-link.avif:hover {
   background: linear-gradient(135deg, #9fd1ff, #87c3ff);
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

/* Animations */
@keyframes slideInUp {
   from {
       opacity: 0;
       transform: translateY(20px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

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

@keyframes shimmer {
   0% { transform: translateX(-100%); }
   100% { transform: translateX(100%); }
}

@keyframes shake {
   0%, 100% { transform: translateX(0); }
   25% { transform: translateX(-5px); }
   75% { transform: translateX(5px); }
}

@keyframes bounce {
   0%, 100% { transform: scale(1); }
   50% { transform: scale(1.2); }
}

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

/* Responsive design */
@media (max-width: 1024px) {
   .page-wrapper {
       padding: 0 15px;
   }
   
   .info-container-full {
       padding: 25px 25px 35px;
   }
}

@media (max-width: 768px) {
   :root {
       --transition: all 0.2s ease;
   }
   
   .upload-area {
       padding: 30px 20px;
   }
   
   .upload-icon {
       font-size: 48px;
   }
   
   .message-text h3 {
       font-size: 18px;
   }
   
   .button-group {
       flex-direction: column;
       gap: 15px;
   }
   
   button, .button {
       width: 100%;
       min-width: auto;
   }
   
   .info-container-full {
       padding: 20px 20px 30px;
   }
   
   .info-header h2 {
       font-size: 22px;
   }
   
   .info-container-full ol li {
       padding-left: 45px;
       font-size: 15px;
   }
   
   .info-container-full ol li:before {
       width: 30px;
       height: 30px;
       font-size: 14px;
   }
   
   .info-container-full ul li {
       padding-left: 28px;
       font-size: 15px;
   }
   
   .info-container-full ul li:before {
       width: 12px;
       height: 12px;
   }
   
   .docx-content {
       font-size: 14px;
   }
   
   .text-content,
   .markdown-content {
       font-size: 12px;
       padding: 20px;
   }
   
   .docx-content-container,
   .text-container,
   .markdown-container {
       max-height: 400px;
       padding: 20px;
   }
   
   .options > div {
       flex-direction: column;
       gap: 15px;
   }
   
   .options > div > div {
       width: 100% !important;
       margin-bottom: 15px;
   }
   
   .fullpage-header {
       flex-direction: column;
       gap: 15px;
       padding: 15px 20px;
   }
   
   .fullpage-title {
       font-size: 16px;
       text-align: center;
   }
   
   .fullpage-controls {
       width: 100%;
       justify-content: space-between;
       gap: 15px;
   }
   
   .fullpage-zoom-controls {
       gap: 8px;
       padding: 6px 10px;
   }
   
   .zoom-btn {
       padding: 8px 10px;
       font-size: 16px;
       width: 36px;
       height: 36px;
   }
   
   .zoom-level {
       font-size: 12px;
       min-width: 50px;
       padding: 4px 8px;
   }
   
   .close-fullpage {
       padding: 10px 16px;
       font-size: 12px;
   }
   
   .keyboard-hint {
       display: none;
   }
   
   .fullpage-document-container {
       padding: 20px;
       max-height: calc(100vh - 160px);
   }
   
   .fullpage-content {
       padding: 15px;
   }
   
   .faq-question {
       padding: 18px 20px;
       font-size: 15px;
   }
   
   .faq-answer {
       font-size: 14px;
   }
   
   .faq-item.active .faq-answer {
       padding: 20px;
   }
   
   .faq-toggle {
       font-size: 20px;
       width: 28px;
       height: 28px;
   }
   
   .success-header {
       flex-direction: column;
       gap: 10px;
   }
   
   .success-title {
       font-size: 18px;
       text-align: center;
       min-width: auto;
   }
   
   .recommendations-content {
       flex-direction: column;
       gap: 12px;
       text-align: center;
   }
   
   .tool-link {
       padding: 10px 20px;
       width: 100%;
       text-align: center;
       max-width: 250px;
   }
   
   /* Mobile zoom levels */
   .zoom-75 { font-size: 10px !important; }
   .zoom-90 { font-size: 12px !important; }
   .zoom-100 { font-size: 14px !important; }
   .zoom-110 { font-size: 15px !important; }
   .zoom-125 { font-size: 17px !important; }
   .zoom-150 { font-size: 20px !important; }
   
   .zoom-75 h1 { font-size: 16px !important; }
   .zoom-90 h1 { font-size: 18px !important; }
   .zoom-100 h1 { font-size: 20px !important; }
   .zoom-110 h1 { font-size: 22px !important; }
   .zoom-125 h1 { font-size: 24px !important; }
   .zoom-150 h1 { font-size: 28px !important; }
}

@media (max-width: 480px) {
   .upload-area {
       padding: 25px 15px;
   }
   
   .upload-icon {
       font-size: 40px;
   }
   
   .message-text h3 {
       font-size: 16px;
   }
   
   .message-text p {
       font-size: 13px;
   }
   
   .file-info {
       padding: 15px 20px;
   }
   
   .info-container-full {
       padding: 15px 15px 25px;
   }
   
   .info-header h2 {
       font-size: 20px;
   }
   
   .docx-content-container,
   .text-container,
   .markdown-container {
       padding: 15px;
       max-height: 350px;
   }
   
   .fullpage-header {
       padding: 12px 15px;
   }
   
   .fullpage-document-container {
       padding: 15px;
       max-height: calc(100vh - 180px);
   }
   
   .fullpage-content {
       padding: 10px;
   }
   
   .zoom-btn {
       width: 32px;
       height: 32px;
       font-size: 14px;
   }
   
   .faq-question {
       padding: 15px 18px;
       font-size: 14px;
   }
   
   .faq-item.active .faq-answer {
       padding: 18px;
   }
}

/* Accessibility improvements */
.faq-question:focus-visible,
button:focus-visible,
.tool-link:focus-visible {
   outline: 3px solid var(--primary-color);
   outline-offset: 2px;
}

.upload-area:focus-within {
   outline: 3px solid var(--primary-color);
   outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
   *,
   *::before,
   *::after {
       animation-duration: 0.01ms !important;
       animation-iteration-count: 1 !important;
       transition-duration: 0.01ms !important;
       scroll-behavior: auto !important;
   }
   
   .progress::after,
   .upload-area::before,
   button::before {
       display: none;
   }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
   .docx-content,
   .text-content,
   .markdown-content {
       color: #000;
       background-color: #fff;
   }
   
   .docx-content-container,
   .text-container,
   .markdown-container {
       border: 3px solid #000;
   }
   
   button {
       border: 2px solid #000;
   }
   
   .faq-item {
       border: 2px solid #000;
   }
}

/* Print styles */
@media print {
   .fullpage-header,
   .button-group,
   .upload-area,
   .options,
   .progress-container {
       display: none !important;
   }
   
   .fullpage-document-container {
       max-height: none;
       overflow: visible;
       border: none;
       box-shadow: none;
       padding: 0;
   }
   
   .fullpage-overlay {
       background-color: white;
       position: static;
       width: auto;
       height: auto;
   }
   
   .docx-content,
   .text-content,
   .markdown-content {
       font-size: 12pt;
       line-height: 1.5;
   }
   
   .docx-content h1 { font-size: 18pt; }
   .docx-content h2 { font-size: 16pt; }
   .docx-content h3 { font-size: 14pt; }
   .docx-content h4 { font-size: 13pt; }
   .docx-content h5 { font-size: 12pt; }
   .docx-content h6 { font-size: 11pt; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
   width: 8px;
   height: 8px;
}

::-webkit-scrollbar-track {
   background: var(--bg-light);
   border-radius: 4px;
}

::-webkit-scrollbar-thumb {
   background: var(--medium-gray);
   border-radius: 4px;
   transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
   background: var(--dark-gray);
}

/* Custom selection styling */
::selection {
   background-color: rgba(52, 152, 219, 0.3);
   color: var(--text-color);
}

::-moz-selection {
   background-color: rgba(52, 152, 219, 0.3);
   color: var(--text-color);
}
