/* CSS Stylesheet for Free Online File Extension Changer & Converter - AhteVerse */

/* General Layout & Page Setup */
body.tool-page {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: var(--font-body);
}

.tool-content {
    padding: var(--space-xl) 0;
    margin-top: 40px;
}

.tool-header {
    margin-bottom: var(--space-xl);
}

.tool-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.tool-title span {
    color: var(--magenta);
    text-shadow: var(--glow-magenta);
}

.tool-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Workspace Grid Layout */
.tool-workspace {
    margin-bottom: var(--space-xl);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 2.8fr 1.2fr;
    gap: var(--space-lg);
    align-items: start;
}

/* Glass Card Definition */
.glass-card {
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    border-color: rgba(255, 0, 255, 0.15);
}

/* Global Config Styling */
.global-config-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.config-settings-row {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.config-item label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-item select {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
    cursor: pointer;
}

.config-item select:focus {
    border-color: var(--magenta);
}

.config-item select option {
    background-color: #0d0d15;
    color: var(--text-primary);
}

.config-item input[type="range"] {
    width: 100%;
    accent-color: var(--magenta);
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

/* Drag and Drop Zone Card */
.dropzone-card {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone-card:hover,
.dropzone-card.dragover {
    border-color: var(--magenta);
    background: rgba(255, 0, 255, 0.02);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.1);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg) 0;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.dropzone-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.dropzone-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: 450px;
    line-height: 1.4;
}

.dropzone-btn {
    padding: 10px 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone-btn:hover {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--magenta);
    box-shadow: var(--shadow-sm);
}

/* Queue Card Layout */
.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-xs);
    margin-bottom: var(--space-md);
}

.queue-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.queue-clear-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.queue-clear-btn:hover {
    color: var(--magenta);
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    margin-bottom: var(--space-md);
}

/* Custom Scrollbar for Scrollable elements */
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.4);
}

.queue-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    min-width: 600px;
}

.queue-table th,
.queue-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.queue-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queue-table tbody tr:last-child td {
    border-bottom: none;
}

/* Queue Thumbnails */
.queue-thumb-container {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.queue-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-thumb-placeholder {
    font-size: 1.2rem;
    opacity: 0.6;
}

.file-name-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Dropdown style inside tables */
.row-format-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.row-format-select:focus {
    border-color: var(--magenta);
}

/* Badges for status */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.status-badge.pending {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.status-badge.converting {
    background: rgba(0, 242, 254, 0.1);
    color: var(--electric-blue);
    border: 1px solid var(--electric-blue);
    animation: statusPulse 1.5s infinite;
}

.status-badge.done {
    background: rgba(76, 175, 80, 0.12);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-badge.failed {
    background: rgba(244, 67, 54, 0.12);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Link styling inside cells */
.row-download-link {
    color: var(--electric-blue);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
    cursor: pointer;
}

.row-download-link:hover {
    color: var(--magenta);
    text-decoration: underline;
}

.row-remove-btn {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.row-remove-btn:hover {
    color: #F44336;
}

/* Queue Actions buttons at bottom */
.queue-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(90deg, var(--electric-blue), var(--magenta));
    border: none;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

.action-btn.primary:hover {
    box-shadow: 0 0 18px rgba(255, 0, 255, 0.4);
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.action-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Sidebar Conversions Guide Panel */
.conversions-guide {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.guide-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.guide-badge {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    min-width: 45px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* Toast alert notification styling */
#toast-wrapper {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-alert {
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(18, 18, 18, 0.95);
    border-left: 4px solid var(--magenta);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    animation: toastFadeIn 0.3s forwards, toastFadeOut 0.3s 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
}

.toast-alert.success {
    border-left-color: var(--electric-blue);
}

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

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

/* Sidebar sticky setup */
.workspace-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-sticky {
    padding: var(--space-lg);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-xs);
}

/* SEO content details & FAQ Section */
.seo-content-section {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.seo-content-section h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.seo-content-section p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.seo-col h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.seo-col p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.seo-faq-container {
    padding: var(--space-xl);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.faq-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-details {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-details:hover,
.faq-details[open] {
    border-color: rgba(255, 0, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.faq-summary {
    padding: 16px var(--space-md);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 40px;
    user-select: none;
}

.faq-summary::after {
    content: "▼";
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.7;
}

.faq-details[open] .faq-summary::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--magenta);
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-answer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-answer p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Responsive Media Breaks --- */
@media (max-width: 992px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    
    .workspace-sidebar {
        position: static;
    }
    
    .seo-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 600px) {
    .config-settings-row {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .config-item {
        width: 100%;
        min-width: unset;
    }
    
    .queue-footer {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        text-align: center;
    }
}

/* SEO Conversion Variations Showcase */
.seo-conversion-variations {
    margin: var(--space-xl) 0;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-conversion-variations h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.variation-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.variation-card:hover {
    border-color: rgba(255, 0, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.variation-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.variation-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Settings Edit Button --- */
.row-edit-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.row-edit-settings-btn:hover:not(:disabled) {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--magenta);
    color: var(--text-primary);
}

.row-edit-settings-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Size Savings Indicator --- */
.size-comparison {
    line-height: 1.4;
}

.size-arrow {
    color: var(--text-secondary);
    margin: 0 4px;
    font-size: 0.8rem;
}

.converted-size-val {
    font-weight: 600;
    color: var(--text-primary);
}

.savings-metric {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 2px;
}

.savings-metric.text-success {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.savings-metric.text-neutral {
    color: var(--text-secondary);
}

/* --- Image Editor Modal --- */
.editor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: var(--space-md);
}

.editor-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s forwards;
}

.editor-modal-container {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0;
}

.modal-close-btn:hover {
    color: var(--magenta);
}

/* Modal Body Layout */
.modal-body-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    flex: 1;
    overflow: hidden;
}

/* Canvas Workspace */
.modal-workspace-column {
    padding: var(--space-md);
    background: #09090e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    min-height: 300px;
    max-height: 60vh;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.modal-canvas-wrapper {
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background-image: 
        linear-gradient(45deg, #18181f 25%, transparent 25%), 
        linear-gradient(-45deg, #18181f 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #18181f 75%), 
        linear-gradient(-45deg, transparent 75%, #18181f 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    max-width: 100%;
}

#editor-canvas {
    display: block;
    max-width: 100%;
    max-height: 50vh;
    height: auto;
    object-fit: contain;
}

/* Draggable Crop Box */
.crop-overlay-box {
    position: absolute;
    border: 2px dashed var(--magenta);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--magenta);
    border: 2px solid #fff;
    border-radius: 50%;
}

.crop-handle.nw { top: -7px; left: -7px; cursor: nwse-resize; }
.crop-handle.ne { top: -7px; right: -7px; cursor: nesw-resize; }
.crop-handle.sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.crop-handle.se { bottom: -7px; right: -7px; cursor: nwse-resize; }

/* Controls Column */
.modal-controls-column {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    overflow-y: auto;
    max-height: 60vh;
}

.control-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-md);
}

.control-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.control-section h4 {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.control-action-btn {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-align: center;
}

.control-action-btn:hover {
    background: rgba(255, 0, 255, 0.08);
    border-color: var(--magenta);
}

.control-action-btn.active {
    background: var(--magenta);
    border-color: var(--magenta);
    color: #fff;
    box-shadow: var(--glow-magenta);
}

/* Select styling inside modal */
.select-wrapper select {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

/* Dimensions Input Grid */
.dimensions-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dim-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dim-input-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.dim-input-group input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.dim-input-group input:focus {
    border-color: var(--magenta);
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-action-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-action-btn.primary {
    background: var(--magenta);
    border: none;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
}

.modal-action-btn.primary:hover {
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
    transform: translateY(-1px);
}

.modal-action-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.modal-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Responsive modal & table layout transformation breakpoints */
@media (max-width: 768px) {
    /* Responsive Queue Table to Cards */
    .queue-table {
        min-width: unset;
        display: block;
    }
    
    .queue-table thead {
        display: none; /* Hide header columns */
    }
    
    .queue-table tbody {
        display: block;
        width: 100%;
    }
    
    .queue-table tr {
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: var(--space-md);
        margin-bottom: var(--space-md);
        gap: 8px;
    }
    
    .queue-table tr:last-child {
        margin-bottom: 0;
    }
    
    .queue-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.9rem;
    }
    
    .queue-table td:last-child {
        border-bottom: none;
    }
    
    .queue-table td::before {
        content: attr(data-label);
        font-family: var(--font-heading);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--text-secondary);
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }
    
    /* Specific cell alignments */
    .queue-table td.file-name-cell {
        font-weight: 600;
        color: var(--text-primary);
        max-width: unset;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
        word-break: break-all;
        text-align: right;
    }
    
    .queue-table td.size-cell,
    .queue-table td.status-cell,
    .queue-table td.action-cell {
        text-align: right;
    }

    .queue-table td.action-cell {
        justify-content: space-between;
    }
    
    .queue-thumb-container {
        width: 60px;
        height: 60px;
        margin-left: auto;
    }

    /* Modal Responsiveness & Vertical Fitting */
    .editor-modal-overlay {
        padding: var(--space-xs);
    }

    .editor-modal-container {
        max-height: 98vh;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .modal-body-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
    }
    
    .modal-workspace-column {
        flex: 1.2;
        min-height: 180px;
        max-height: 38vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: var(--space-sm);
    }
    
    .modal-controls-column {
        flex: 1;
        max-height: 38vh;
        overflow-y: auto;
        padding: var(--space-md);
    }
    
    #editor-canvas {
        max-height: 34vh;
    }

    /* Make transform buttons stack better on very small viewports */
    .btn-group {
        gap: 6px;
    }

    .control-action-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .editor-modal-container {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .modal-workspace-column {
        max-height: 42vh;
    }
    
    .modal-controls-column {
        max-height: 42vh;
    }
}
