.blinking-cursor {
    animation: blink 1s step-end infinite;
    color: #4a90e2;
    font-weight: bold;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.ai-response table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.ai-response th {
    background-color: #f3f4f6;
    font-weight: bold;
}

.ai-response th,
.ai-response td {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.ai-response {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ai-response ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.ai-response li {
    margin: 0.25rem 0;
}

.progress {
    display: none;
}

.progress-text {
    font-size: 0.875rem;
    color: #4a5568;
}

#chatOutput p {
    margin: 0.5rem 0;
}

.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #10b981;
    transition: width 0.3s ease;
}

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

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    z-index: 10;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.375rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown:hover>.dropdown-content,
.dropdown-content:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

.memory-container {
    display: flex;
    gap: 20px;
    margin: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-card {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.progress-container {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

.memory-stats {
    margin-top: 10px;
    font-family: monospace;
}

#page-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    #page-list {
        grid-template-columns: 1fr;
    }
}

.page-preview {
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f8fafc;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-preview canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border: 1px solid #cbd5e0;
    border-radius: 0.25rem;
}

.page-preview span {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.page-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.page-controls button {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.page-controls button:hover {
    background-color: #2563eb;
}

.page-controls button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

#file-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    #file-list {
        grid-template-columns: 1fr;
    }
}

.file-preview {
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f8fafc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-preview span {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    word-break: break-all;
}

.file-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-controls button {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.file-controls button:hover {
    background-color: #2563eb;
}

.file-controls button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}



/* slider for compress */
/* Existing Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #e5e7eb; /* gray-200 */
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #6b7280; /* gray-500 */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #6b7280; /* gray-500 */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #6b7280; /* gray-500 */
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:hover::-ms-thumb {
    background: #7c3aed; /* purple-600 */
}

input[type="range"]:focus {
    background: #d1d5db; /* gray-300 */
}

#dpi-value, #quality-value {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* gray-600 */
}

/* New Styles for Compression Results */
#compression-results {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    padding: 1rem;
    border-radius: 0.5rem;
}

#compression-sizes {
    list-style-type: disc;
    padding-left: 1.25rem;
}

#compression-sizes li {
    margin-bottom: 0.25rem;
}

/* Button Layout */
.flex.space-x-4 {
    display: flex;
    gap: 1rem;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-blue-600:hover {
    background-color: #1d4ed8;
}

/* ff */



/* page  delete */
/* Page preview styling */
#pagePreview {
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
    margin-top: 8px;
}

/* Page input styling */
#pages {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
    margin-top: 4px;
}

#pages:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Total pages display */
#totalPages {
    color: #3182ce;
    font-weight: bold;
}


/* Form styles for Image to PDF */
.pdf-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Matches .memory-container */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #4b5563; /* Matches .page-preview span */
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da; /* Matches #pages */
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Inspired by #pages:focus */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #80bdff; /* Matches #pages:focus */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Matches #pages:focus */
}

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

.required {
    color: #dc3545; /* Matches existing .required */
    margin-left: 3px;
}

.file-name {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem; /* Matches .page-preview span */
    color: #4b5563; /* Matches .page-preview span */
}

.coordinate-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Inspired by #page-list */
    gap: 20px;
}

.error-message {
    display: block;
    color: #dc3545; /* Matches .required */
    font-size: 0.875rem; /* Matches .progress-text */
    margin-top: 5px;
}

.form-actions {
    text-align: center;
}

.submit-button {
    background: #2563eb; /* Matches .bg-blue-600 */
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px; /* Matches .page-controls button */
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease; /* Matches .page-controls button */
}

.submit-button:hover {
    background: #1d4ed8; /* Matches .bg-blue-600:hover */
}

.submit-button:disabled {
    background: #9ca3af; /* Matches .page-controls button:disabled */
    cursor: not-allowed;
}

.progress-container {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    display: none; /* Matches existing .progress */
}

.progress-container progress {
    width: 100%;
    height: 100%;
}

.progress-text {
    font-size: 0.875rem; /* Matches existing .progress-text */
    color: #4a5568; /* Matches existing .progress-text */
    text-align: center;
    margin-top: 5px;
}

.result-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    background: #f8fafc; /* Matches .page-preview */
    border: 1px solid #e2e8f0; /* Matches .page-preview */
}

.result-message.text-green-600 {
    background: #d4edda; /* Consistent with previous */
    color: #155724;
}

.result-message.text-red-600 {
    background: #f8d7da; /* Consistent with previous */
    color: #721c24;
}

/* Responsive design for form */
@media (max-width: 600px) {
    .pdf-form {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .coordinate-group {
        grid-template-columns: 1fr; /* Stack X/Y inputs vertically */
    }

    .submit-button {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 400px) {
    .pdf-form {
        padding: 10px;
        box-shadow: none; /* Matches existing @media (max-width: 400px) */
    }
}

/*  clear form css */


  /* .clear-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s;
  }
  .clear-btn:hover {
    background-color: #d32f2f;
  }


  button.bg-red-600:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  } */