:root {
    /* Deep Dark Theme (High Contrast) */
    --bg-color: #000000;
    /* Pure black for maximum contrast */
    --panel-bg: rgba(35, 35, 35, 0.85);
    /* Lighter, more distinct panel bg */
    --panel-border: 1px solid rgba(255, 255, 255, 0.15);
    /* Stronger border */

    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    /* Zinc-400 */
    --text-tertiary: #52525b;

    --accent-color: #3b82f6;
    /* Brighter Blue */
    --accent-hover: #2563eb;
    --danger-color: #ef4444;

    --border-radius: 12px;
    /* Slightly rounder for modern feel */
    --border-radius-sm: 6px;

    --header-height: 48px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 40px;
    --media-panel-height: 180px;

    --glass-blur: blur(16px);
    /* Stronger blur */
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    /* Deeper shadow */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    /* Crisp text */
}

/* Media Library Drag Over State */
.drag-over-delete {
    border: 2px dashed #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.1) !important;
    position: relative;
}

.drag-over-delete::after {
    content: "↩️ Return to Library";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Library preview placeholder */
.library-preview-placeholder {
    animation: pulse-preview 1.5s ease-in-out infinite;
}

@keyframes pulse-preview {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Highlight restored image */
.highlight-restored {
    animation: highlight-pulse 2s ease-out;
    border: 2px solid #007acc;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 204, 0.7);
        background-color: rgba(0, 122, 204, 0.2);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 122, 204, 0);
        background-color: transparent;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 204, 0);
    }
}

/* Frame drag-over swap state */
.drag-over-swap {
    outline: 3px dashed #4CAF50 !important;
    outline-offset: -3px;
    background-color: rgba(76, 175, 80, 0.1) !important;
    position: relative;
}

.drag-over-swap::after {
    content: "⬇️ Swap";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 16px;
    border-radius: 6px;
    z-index: 1000;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-size: 13px;
    /* Professional tool size */
    line-height: 1.5;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
    /* No more grid - panels float */
}

/* Workspace takes full screen now - no top toolbar */
#workspace {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Pan/Zoom handles inner content */
    z-index: 1;
    /* Lowest level */

    /* Dot Grid Background */
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Top Toolbar removed - functionality moved to bottom */

#toolbar .title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.media-library-actions.left {
    justify-content: flex-start;
}

.media-library-actions.right {
    justify-content: flex-end;
}

.divider {
    width: 1px;
    height: 16px;
    background: #333;
    margin: 0 8px;
}

/* Old button styles removed - updated styles are defined below at line 622 */

/* Secondary/Ghost Button (e.g. Add Images) */
/* Old #btn-add-image styles removed - now uses .btn-icon class defined below */

.btn-icon svg {
    transition: transform 0.3s ease;
}

.btn-icon.rotated svg {
    transform: rotate(180deg);
}

#workspace {
    grid-column: 1;
    grid-row: 2;
    background-color: #121212;
    overflow: hidden;
    position: relative;
    touch-action: none;
    bottom: 0;
}

.image-count {
    font-size: 10px;
    color: #666;
}

#viewport {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    /* Will be transformed by JS */

    /* OPTIMIZATION: Performance hints for smooth zoom/pan */
    will-change: transform;
    transform: translateZ(0);
    /* Force GPU layer */
}

/* Contextual Sidebar (Hidden by default, appears on demand) */
#sidebar {
    position: absolute;
    top: 16px;
    right: 16px;
    /* Removed bottom constraint - height now based on content */
    width: var(--sidebar-width);
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--panel-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px - var(--media-panel-height) - 32px);
    /* Account for margins and media panel */

    /* Hidden by default */
    transform: translateX(calc(100% + 32px));
    opacity: 0;
    pointer-events: none;
}

#sidebar.visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Floating Media Library (Bottom Panel) */
.media-library {
    position: fixed;
    /* Changed from absolute to fixed */
    left: 16px;
    right: 16px;
    bottom: 16px;
    height: var(--media-panel-height);
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--panel-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    overflow-y: auto;
    /* Removed fixed height, now adapts to content */
    min-height: 200px;
    /* Minimum height */
    max-height: calc(100vh - 40px);
    /* Maximum height with margin */
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#sidebar {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.media-library {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.media-library-collapsed .media-library {
    transform: translateY(calc(100% + 20px));
    /* Slide down only */
}

/* Panel Header removed from Sidebar, kept for reference if needed elsewhere */
.panel-header {
    display: none;
}

#properties-content {
    padding: 20px;
    /* Increased padding for better spacing */
    overflow-y: auto;
    height: 100%;
}

/* Ensure inputs don't overflow */
.panel-section {
    margin-bottom: 24px;
    width: 100%;
}

.panel-section input,
.panel-section select {
    box-sizing: border-box;
    /* Explicitly set */
    max-width: 100%;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.panel-section input[type="number"],
.panel-section input[type="text"],
.panel-section select {
    width: 100%;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid transparent;
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 13px;
    transition: all 0.2s ease;
}

.panel-section input:focus,
.panel-section select:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 112, 243, 0.2);
}

.panel-section input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* UI Elements */
button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--accent-color);
    width: 100%;
    margin-top: 12px;
}

.btn-secondary {
    background-color: #555;
    width: 100%;
    margin-top: 8px;
}

.btn-danger {
    background-color: #c93030;
    width: 100%;
    margin-top: 12px;
}

h3 {
    margin-top: 0;
    font-size: 14px;
    text-transform: uppercase;
    color: #888;
}

/* Page & Frame Styles */
.page {
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: absolute;
    z-index: 1;
    /* Pages at base layer */
}

.frame {
    position: absolute;
    background-color: #eee;
    overflow: hidden;
    border: 1px solid #ddd;
    cursor: grab;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    z-index: 10;
    /* Frames above pages */

    /* OPTIMIZATION: Isolate layout/style */
    contain: layout style;
    /* Removed will-change: transform to prevent excessive layer creation */
}

.frame:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Removed dragging lift effect as per user request - it was buggy and not visually appealing */

.frame.selected {
    outline: 2px solid var(--accent-color);
    z-index: 10;
    /* Bring to front */
    box-shadow: 0 0 20px rgba(0, 112, 243, 0.3);
    /* Glow effect */
}

.handle {
    background-color: var(--accent-color) !important;
    /* Blue fill */
    border: 2px solid white !important;
    /* White border */
    border-radius: 2px !important;
    /* Slightly rounded square */
    width: 14px !important;
    /* Restored to larger size */
    height: 14px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
    position: absolute;
    /* Ensure positioning context */

    /* Use CSS variable for scale, default to 1 */
    transform: scale(var(--handle-scale, 1));
    transform-origin: center;
}

/* Invisible hit area for easier grabbing */
.handle::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    /* 14px + 16px = 30px hit area */
    background: transparent;
    border-radius: 50%;
}

.handle:hover {
    /* Multiply the base scale by 1.2 for the pop effect */
    transform: scale(calc(var(--handle-scale, 1) * 1.2)) !important;
    background-color: var(--accent-hover) !important;
    z-index: 100;
    /* Ensure hover state is on top */
}

.frame img {
    position: absolute;
    transform-origin: 0 0;
    pointer-events: none;

    /* OPTIMIZATION: GPU acceleration for image transforms */
    /* backface-visibility removed to save memory */
}

/* Drop Zone Feedback */
body.drag-over::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 122, 204, 0.1);
    border: 4px dashed var(--accent-color);
    pointer-events: none;
    z-index: 1000;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.media-library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    /* Reduced padding */
    height: 32px;
    /* Reduced from 50px to 32px */
    border-bottom: var(--panel-border);
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.media-library-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    /* Increased gap for toolbar spacing */
}

.media-library-actions.left {
    gap: 12px;
}

.media-library-actions.right {
    gap: 8px;
}

.image-count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-icon {
    background: transparent;
    border: none;
    /* Removed border */
    color: var(--text-primary);
    /* Changed from text-secondary for better visibility */
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.btn-icon svg {
    stroke: currentColor;
    /* Ensure icon inherits button color */
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    /* border-color: rgba(255, 255, 255, 0.2); */
    color: white;
    /* Even brighter on hover */
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-icon-accent {
    background: var(--accent-color);
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    /* Further reduced from 6px */
    border-radius: 4px;
    /* Further reduced */
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-accent:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-text-small {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    padding: 0;
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-text-small:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: white;
}

.modal-body {
    padding: 20px 0;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.path-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.path-input-group input {
    flex: 1;
    cursor: default;
}

.path-input-group button {
    width: 40px;
    height: 40px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.path-input-group button svg {
    flex-shrink: 0;
}

.help-text {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: #dc2626;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

/* Media Library Panel */
/* Duplicate removed - media library styles are defined above at line 337 */

/* Media Library Header styles are now defined at the top of the file with the new layout */

.media-library-grid {
    flex: 1;
    display: flex;
    gap: 12px;
    padding: 16px 16px 40px 16px;
    /* Increased bottom padding to 40px */
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--panel-bg);
    align-items: flex-start;
    /* Align items to top */
}

/* Scrollbar styling for media library */
.media-library-grid::-webkit-scrollbar {
    height: 10px;
    /* Visible height */
}

.media-library-grid::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 5px;
    margin: 0 12px;
}

.media-library-grid::-webkit-scrollbar-thumb {
    background: #555;
    /* Contrast color */
    border-radius: 5px;
    border: 2px solid #1e1e1e;
    /* Padding effect */
}

.media-library-grid::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.media-item {
    flex-shrink: 0;
    height: 100px;
    /* Reduced height since no text */
    width: auto;
    /* Variable width */
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: grab;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Ensure image doesn't overflow rounded corners */
}

.media-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.media-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.media-item.loading {
    cursor: wait;
    opacity: 0.7;
    width: 100px;
    /* Default width for loading state */
}

.media-placeholder {
    width: 100%;
    height: 100%;
    /* Fill full height */
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-placeholder::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #333;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.media-item img {
    height: 100%;
    /* Fill full height */
    width: auto;
    /* Maintain aspect ratio */
    min-width: 40px;
    object-fit: contain;
    background: #1a1a1a;
    display: block;
}


/* Small button variant for upload - handled in media-library-grid block above */

.shortcut-item .key-group {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    /* Align keys to the right of their column */
}

.key {
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 12px;
    color: #eee;
    box-shadow: 0 2px 0 #222;
}

.action {
    color: #aaa;
}

/* Media Library Buttons - Specific Overrides */
.media-library-actions .btn-primary.small {
    padding: 0 12px;
    font-size: 11px;
    height: 24px;
    line-height: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: white;
}

.media-library-actions .btn-text {
    font-size: 11px;
    padding: 0 8px;
    height: 24px;
    line-height: 24px;
    color: #888;
    background: transparent !important;
    /* Override default button bg */
    border: none !important;
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: none !important;
}

.media-library-actions .btn-text:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Size Preset Grid */
.size-preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.size-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--panel-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-preset:hover {
    background: #2f2f30;
    border-color: var(--accent-color);
}

.size-preset.active {
    background: rgba(0, 122, 204, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.aspect-icon {
    width: 32px;
    height: 32px;
    background: #3e3e42;
    border-radius: 3px;
    position: relative;
}

.aspect-icon::before {
    content: '';
    position: absolute;
    background: #888;
    border-radius: 2px;
}

.aspect-icon.portrait::before {
    width: 50%;
    height: 75%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.aspect-icon.square::before {
    width: 70%;
    height: 70%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.aspect-icon.landscape::before {
    width: 75%;
    height: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.aspect-icon.custom::before {
    width: 60%;
    height: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px dashed #888;
    background: transparent;
}

.preset-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-color);
}

.preset-dims {
    font-size: 10px;
    color: #888;
}

.size-preset.active .preset-label {
    color: var(--accent-color);
    font-weight: 600;
}

.size-preset.active .aspect-icon::before {
    background: var(--accent-color);
}

.size-preset.active .aspect-icon.custom::before {
    border-color: var(--accent-color);
    background: transparent;
}