/* ==========================================
   LUMINA WORKSPACE - TOOLS CSS
   ========================================== */

body.workspace-body {
    overflow: hidden !important;
    height: 100vh !important;
}

.tools-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Icon-only sidebar mode */
.tools-layout.sidebar-icon-only {
    grid-template-columns: 62px 1fr;
}

/* Sidebar — flex column, no overflow on the sidebar itself */
.tools-sidebar {
    background: rgba(15, 15, 23, 0.6);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0;
    height: 100vh;
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.2s ease,
                border-color 0.3s ease;
}

.tools-sidebar::-webkit-scrollbar {
    width: 4px;
}
.tools-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.tools-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.tools-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.tools-sidebar.collapsed {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    opacity: 0;
    border-right-color: transparent;
    pointer-events: none;
    overflow: hidden;
}

/* Icon-only mode: sidebar shrinks and hides text */
.tools-sidebar.icon-only {
    padding: 16px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 8px;
}

.tools-sidebar.icon-only .sidebar-logo-subtext,
.tools-sidebar.icon-only .sidebar-logo span,
.tools-sidebar.icon-only .tools-search-wrapper,
.tools-sidebar.icon-only .sidebar-footer,
.tools-sidebar.icon-only .category-title,
.tools-sidebar.icon-only .category-title-hits,
.tools-sidebar.icon-only .tools-menu-item-home span + *,
.tools-sidebar.icon-only .sidebar-logo .nav-logo span:last-child {
    display: none !important;
}

/* Hide text labels in sidebar items when icon-only */
.tools-sidebar.icon-only .tools-menu-item {
    padding: 10px;
    justify-content: center;
    border-radius: 8px;
}

.tools-sidebar.icon-only .tools-menu-item .tools-menu-item-icon {
    margin-right: 0;
    font-size: 1.2rem;
}

/* Hide text after the icon in each item */
.tools-sidebar.icon-only .tools-menu-item {
    font-size: 0;
    color: transparent;
}

.tools-sidebar.icon-only .tools-menu-item .tools-menu-item-icon {
    font-size: 1.2rem;
    color: initial;
}

.tools-sidebar.icon-only .tools-menu-item-home {
    padding: 10px;
    justify-content: center;
    font-size: 0;
    color: transparent;
}

.tools-sidebar.icon-only .tools-menu-item-home .tools-menu-item-icon {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-right: 0;
}

/* Tooltip on hover for icon-only items */
.tools-sidebar.icon-only .tools-menu-item {
    position: relative;
}

.tools-sidebar.icon-only .tools-menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 15, 23, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 200;
}

.tools-sidebar.icon-only .tools-menu-item:hover::after {
    opacity: 1;
}

/* Sidebar logo condensed in icon-only */
.tools-sidebar.icon-only .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 16px;
}

.tools-sidebar.icon-only .sidebar-logo .logo-dot {
    display: block;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.tools-sidebar.icon-only .sidebar-logo .nav-logo {
    font-size: 0;
}

/* Category blocks in icon-only: just center items */
.tools-sidebar.icon-only .tools-menu-category {
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Workspace Wrapper Panel */
.workspace-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

/* Top Workspace Header Bar */
.workspace-header-bar {
    height: 56px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(15, 15, 23, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
}

.header-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-collapse-btn-new {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-collapse-btn-new:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-collapse-btn-new svg {
    transition: transform 0.3s ease;
}

.tools-layout.sidebar-collapsed .sidebar-collapse-btn-new svg {
    transform: scaleX(-1);
}

.header-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.breadcrumb-icon {
    font-size: 1.1rem;
}

.breadcrumb-title {
    color: var(--text-primary);
}

.breadcrumb-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 100px;
    border: 1px solid var(--card-border);
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Sidebar Logo & Home styling */
/* Sidebar top section — fixed, never scrolls */
.sidebar-logo {
    flex-shrink: 0;
    padding: 20px 20px 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 15, 23, 0.6);
}

.sidebar-logo .nav-logo {
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    padding-left: 20px;
}

.tools-menu-item-home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 10px;
}

.tools-menu-item-home:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.category-title-hits {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 6px;
    padding: 6px 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Sidebar footer — fixed at bottom, never scrolls */
.sidebar-footer {
    flex-shrink: 0;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.6;
    background: rgba(15, 15, 23, 0.6);
}

.sidebar-footer p {
    margin: 0;
}

/* Search wrapper — fixed below logo, never scrolls */
.tools-search-wrapper {
    flex-shrink: 0;
    position: relative;
    padding: 14px 16px 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(15, 15, 23, 0.6);
}

.tools-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 14px 10px 36px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

.tools-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
}

.tools-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Categories & Items */
/* Tools menu — scrollable middle section */
.tools-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.tools-menu::-webkit-scrollbar {
    width: 3px;
}
.tools-menu::-webkit-scrollbar-track {
    background: transparent;
}
.tools-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}
.tools-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

.tools-menu-category {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: max-height 0.3s ease;
}

.tools-menu-category.collapsed .tools-menu-item {
    display: none;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

.category-title:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.category-title::after {
    content: '▼';
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s;
    margin-right: 4px;
}

.category-title:hover::after {
    color: var(--text-primary);
}

.tools-menu-category.collapsed .category-title::after {
    transform: rotate(-90deg);
}

.tools-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.tools-menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    padding-left: 16px;
}

.tools-menu-item.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    font-weight: 600;
    box-shadow: inset 0 0 8px rgba(139, 92, 246, 0.1);
}

.tools-menu-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Content Area — independent scroll */
.tools-content {
    padding: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    height: 0; /* force flex child to respect parent height */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.tools-content::-webkit-scrollbar {
    width: 6px;
}
.tools-content::-webkit-scrollbar-track {
    background: transparent;
}
.tools-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
}
.tools-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

.tools-content > .tools-workspace {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.tools-workspace {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.4s ease forwards;
}

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

/* Tool Header */
.tool-header {
    margin-bottom: 10px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #22d3ee;
    margin-bottom: 12px;
}

.tool-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 800px;
}

/* Tool Grid System */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}

.tool-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tool-panel-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
}

/* Inputs & Form Elements */
.tool-form-group {
    margin-bottom: 20px;
}

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

.tool-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tool-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tool-value-display {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}

.tool-input-text, .tool-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

.tool-input-text:focus, .tool-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.tool-range {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

.tool-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary-glow);
    transition: transform 0.1s ease;
}

.tool-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Color picker row */
.color-picker-row {
    display: flex;
    gap: 10px;
}

.tool-color-input {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 40px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.tool-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tool-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

/* Drag & Drop Zone */
.tool-dropzone {
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
}

.tool-dropzone:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.02);
}

.tool-dropzone-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tool-dropzone h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.tool-dropzone p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Image Previews & Canvas */
.preview-container {
    background: #12121a;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    max-height: 450px;
    width: 100%;
}

.checkerboard-bg {
    background-image: linear-gradient(45deg, #181824 25%, transparent 25%), 
                      linear-gradient(-45deg, #181824 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #181824 75%), 
                      linear-gradient(-45deg, transparent 75%, #181824 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-canvas {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.preview-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

/* Overlay for simulation */
.sim-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* File list */
.tool-file-info {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 600;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Specific Tool Styles */
/* Palette Column Layout */
.palette-generator-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.palette-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 10px;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.palette-column-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    background: rgba(11, 11, 15, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 14px 10px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    width: 90%;
    text-align: center;
}

.palette-color-hex {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.palette-lock-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

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

.palette-lock-btn.locked {
    color: var(--primary);
}

/* Contrast Checker Visuals */
.contrast-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.contrast-ratio-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.contrast-status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.contrast-status-badge.pass {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.contrast-status-badge.fail {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.contrast-wcag-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.contrast-wcag-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.contrast-wcag-table tr {
    border-bottom: 1px solid var(--card-border);
}

.contrast-wcag-table tr:last-child {
    border-bottom: none;
}

/* Gradient Stop Row */
.gradient-stop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    padding: 8px 12px;
    border-radius: 8px;
}

.gradient-stop-item:last-child {
    margin-bottom: 0;
}

/* Loupe / Color Sampler */
.pixel-picker-container {
    position: relative;
    cursor: crosshair;
}

.pixel-loupe {
    position: absolute;
    width: 110px;
    height: 110px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    overflow: hidden;
    z-index: 10;
}

.pixel-loupe-canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.pixel-loupe-info {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--card-border);
    white-space: nowrap;
}

/* Tailwind Shade Row */
.shade-scale-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shade-item {
    display: grid;
    grid-template-columns: 80px 1fr 90px 40px;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
}

.shade-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.shade-preview {
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.shade-hex {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Splitter Grid Previews */
.split-grid-preview {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.split-tile {
    position: relative;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

.split-tile img {
    width: 100%;
    height: auto;
    display: block;
}

.tile-action-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-tile:hover .tile-action-overlay {
    opacity: 1;
}

/* SVG filters for colorblind simulator (hidden) */
.svg-filter-hidden {
    position: absolute;
    width: 0; height: 0;
    overflow: hidden;
}

/* Code Output block */
.code-output-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    overflow-x: auto;
    max-height: 200px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Accordion or Category search no-match */
.tools-no-match {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px 0;
}

/* Responsive sidebar */
@media (max-width: 768px) {
    .tools-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    .tools-sidebar {
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 16px;
    }
    .workspace-wrapper {
        height: auto;
        overflow: visible;
    }
    .sidebar-collapse-btn-new {
        display: none;
    }
    .tools-content {
        padding: 20px;
        overflow-y: visible;
    }
}

/* ==========================================
   HOME WORKSPACE STYLES
   ========================================== */

.home-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 4px;
}

/* Hero Section */
.home-hero {
    padding: 52px 0 44px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 48px;
}

.home-privacy-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    padding: 5px 14px;
    margin-bottom: 22px;
}

.home-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 18px;
}

.home-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 36px;
}

/* Featured Cards Row */
.home-featured-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-featured-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.home-featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(167,139,250,0.04), rgba(34,211,238,0.04));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.home-featured-card:hover {
    border-color: rgba(34,211,238,0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.home-featured-card:hover::before { opacity: 1; }

.home-featured-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.home-featured-card h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    position: relative;
}

.home-featured-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    position: relative;
}

/* All Tools Section */
.home-tools-section {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.home-section-header {
    text-align: left;
    margin-bottom: 4px;
}

.home-section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.home-section-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.home-category {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-cat-title {
    font-family: var(--font-heading);
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.home-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.home-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.home-tool-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(34,211,238,0.14);
    transform: translateY(-2px);
}

.home-tool-card > span {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.home-tool-card > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.home-tool-card strong {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.home-tool-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* About Section */
.home-about {
    margin-top: 52px;
    padding: 36px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    margin-bottom: 48px;
}

.home-about h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.home-about p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.home-about p:last-child { margin-bottom: 0; }

/* Responsive home */
@media (max-width: 768px) {
    .home-featured-row {
        grid-template-columns: 1fr;
    }
    .home-title {
        font-size: 2.2rem;
    }
    .home-tools-grid {
        grid-template-columns: 1fr;
    }
}

