:root {
    --bg-color: #18181b;
    --card-bg: #27272a;
    --sidebar-bg: #18181b;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --accent: #52525b;
    --accent-hover: #71717a;
    --border: #27272a;

    --font-ui: 'JetBrains Mono', monospace;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}


.hidden {
    display: none !important;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.card {
    background: transparent;
    padding: 2rem;
    border: none;
    width: 100%;
    max-width: 400px;
    box-shadow: none;
    text-align: center;
}

.card h1 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    font-size: 0.875rem;
}

.version-select-container {
    margin-bottom: 1.5rem;
    text-align: left;
}

.version-select-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    appearance: none;
    cursor: pointer;
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button {
    width: 100%;
    padding: 0.75rem;
    background: #e4e4e7;
    color: #18181b;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

button:hover:not(:disabled) {
    background: #d4d4d8;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--border);
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2rem;
}

.progress-bar-fill {
    height: 100%;
    background: #f8fafc;
    width: 0%;
    transition: width 0.2s;
}

#progress-text {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}


.app-container {
    display: flex;
    height: calc(100vh - 48px);
    /* Subtract Top Bar height */
    overflow: hidden;
}


.top-bar {
    height: 48px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    gap: 1rem;
}

.navbar-icons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}


.logo {
    display: none;
}

.version-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.version-select {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    width: auto;
}

.settings-card {
    background: #18181b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    position: relative;
    text-align: left;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    color: var(--text-secondary);
}

.settings-header-row {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.settings-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-item input[type="range"] {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.setting-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.tree-icon,
.tree-icon-file {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    margin-right: 0.25rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Ensure SVG inherits color */
.tree-icon svg,
.tree-icon-file svg {
    fill: currentColor;
    display: block;
}

.tree-folder.expanded>.tree-icon {
    color: var(--text-primary);
}


.resizer {
    width: 4px;
    background: var(--bg-color);
    cursor: col-resize;
    border-right: 1px solid var(--border);
    transition: background 0.2s;
    user-select: none;
}

.resizer:hover,
.resizer.resizing {
    background: var(--accent);
}


.details-resizer {
    height: 4px;
    background: var(--bg-color);
    cursor: row-resize;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    user-select: none;
    flex-shrink: 0;
    margin: 0.25rem 0;
}

.details-resizer:hover,
.details-resizer.resizing {
    background: var(--accent);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar {
    background: var(--bg-color);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.sidebar.collapsed {
    display: none;
}

.resizer.collapsed {
    display: none;
}


.sidebar-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.sidebar-icons {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.tab-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 0.5rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    /* Square with slight rounding */
    transition: all 0.15s;
}

.tab-close:hover {
    background: var(--accent);
    color: var(--text-primary);
}

.icon-btn svg {
    fill: currentColor;
    display: block;
}

.icon-btn:hover {
    background: var(--card-bg) !important;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.sidebar h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.badge {
    background: transparent;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border: 1px solid var(--border);
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 2rem 0.6rem 0.75rem;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.875rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--text-secondary);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px !important;
    opacity: 0.6;
    z-index: 10;
    transition: all 0.15s;
}

.search-clear-btn:hover {
    opacity: 1;
    background: var(--accent) !important;
    color: var(--text-primary) !important;
}

.search-clear-btn svg {
    fill: currentColor;
    display: block;
}

.search-match {
    color: #fff;
    font-weight: 600;
}

.tree-no-results {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: center;
}

.filters {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.filters h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.filters label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.filters input[type="checkbox"] {
    accent-color: var(--text-primary);
}

.details {
    padding: 1.5rem;
    padding-top: 0.5rem;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    height: 100%;
}

#detail-title {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.4;
    color: var(--text-primary);
}


.detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.detail-tab {
    background: transparent !important;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    width: auto;
}

.detail-tab:hover {
    color: var(--text-primary);
    background: var(--card-bg) !important;
}

.detail-tab.active {
    color: var(--text-primary);
    background: var(--accent) !important;
    font-weight: 600;
}



.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-list li {
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: background 0.15s;
    font-family: 'JetBrains Mono', monospace;
}

.detail-list li:hover {
    background: var(--bg-hover);
    color: white;
}

.detail-list li:last-child {
    border-bottom: none;
}

.footer {
    margin-top: auto;
    padding-top: 1.5rem;
    display: none;
}

#reset-view-btn {
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

#reset-view-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.graph-container {
    background: #0f0f10;
    position: relative;
    flex: 1;
    width: 100%;
}


.tabs-bar {
    height: 48px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1rem 4px 1rem;
    gap: 0.5rem;
    overflow-x: auto;
    flex-shrink: 0;
    width: 100%;
    scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: none;
    user-select: none;
    min-width: 120px;
    max-width: 200px;
    flex-shrink: 0;
}

.tab:hover {
    background: var(--card-bg);
}

.tab.active {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text-primary);
}

.tab.dragging {
    opacity: 0.5;
    background: var(--card-bg);
}

.tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.breadcrumbs-bar {
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 33px;
    flex-shrink: 0;
}

.tab-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    margin-left: 0.5rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    /* Square with slight rounding */
    transition: all 0.15s;
    line-height: 1;
}

.tab-close:hover {
    background: var(--accent);
    color: var(--text-primary);
}


::-webkit-scrollbar {
    width: 6px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}


.layout-controls {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.layout-controls h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.layout-btn {
    width: calc(50% - 0.25rem);
    padding: 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.layout-btn:last-child {
    margin-right: 0;
}


.tree-view {
    flex: 2;
    overflow-y: auto;
    margin-bottom: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    min-height: 100px;
}

.tree-category {
    margin-bottom: 0.5rem;
}

.tree-category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.tree-category-header:hover {
    background: var(--card-bg);
}

.tree-icon {
    font-size: 0.6rem;
    color: var(--text-secondary);
    width: 14px;
    display: inline-block;
    text-align: center;
}

.tree-category-name {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tree-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.tree-tags {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
}

.tree-tag {
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.tree-tag:hover {
    background: var(--card-bg);
}

.tree-tag.selected {
    background: var(--accent);
}

.tree-tag-label {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.tree-tag:hover .tree-tag-label,
.tree-tag.selected .tree-tag-label {
    color: var(--text-primary);
}


.tree-root {
    list-style: none;
    padding: 0;
    margin: 0;
}


.tree-group {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: none;
    margin-left: 20px;
    /* Standard 20px indent */
    position: relative;
}

.tree-node {
    position: relative;
    padding-left: 0;
    list-style: none;
}

/* Vertical Line */
.tree-node::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -3px;
    /* Overlap next item to close gaps (2px margin + overlap) */
    left: -11px;
    /* Center of 20px indent (approx) */
    width: 1px;
    background: #3f3f46;
    /* Zinc 700 - clearly visible but subtle */
}

/* Horizontal Line */
.tree-node::after {
    content: "";
    position: absolute;
    top: 14px;
    /* Center of 28px height */
    left: -11px;
    width: 11px;
    /* Connect to content */
    height: 1px;
    background: #3f3f46;
}

/* Elbow fix for last child */
.tree-node:last-child::before {
    bottom: auto;
    height: 15px;
    /* Stop at center */
}

/* Remove lines for top-level items */
.tree-root>.tree-node::before,
.tree-root>.tree-node::after {
    display: none;
}

/* Content Container */
.tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: none;
    /* Instant */
    min-height: 28px;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
    /* Content above lines */
    width: 100%;
    border: 1px solid transparent;
    /* Reserve space/prevent jump */
}

.tree-item:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* Selected State - VSCode Blue Style */
.tree-tag.selected {
    background: #04395e;
    /* Deep blue selection */
    border-color: #007fd4;
    /* Brighter blue border */
    color: #ffffff;
}

.tree-tag.selected .tree-icon-file {
    color: #ffffff;
    /* Icon becomes white */
}

.tree-folder {
    font-weight: 500;
}

.tree-label {
    font-size: 0.85rem;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icons */
.tree-icon,
.tree-icon-file {
    font-size: 0.8rem;
    width: 16px;
    /* Fixed width for alignment */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* About Modal */
.about-card {
    background: #18181b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 550px;
    width: 90%;
    position: relative;
    text-align: left;
    /* Changed from center */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    color: var(--text-secondary);
}

.about-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.about-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Close button - matching tab close style but positioned in header row */
.about-close-btn {
    background: transparent !important;
    /* Force override of global button */
    border: none;
    color: var(--text-secondary) !important;
    /* Force override of global button */
    cursor: pointer;
    border-radius: 4px;
    /* Slightly rounded corners */
    transition: all 0.2s;
    width: 24px;
    /* Slightly larger touch target */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.about-close-btn svg {
    fill: currentColor;
}

.about-close-btn:hover {
    background: var(--accent) !important;
    color: var(--text-primary) !important;
}

.about-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.about-key {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-bottom: 2rem;
}

.key-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.key-label-wrapper {
    min-width: 180px;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.key-marker {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.key-marker.tag {
    background-color: #e4e4e7;
}

.key-marker.entry {
    background-color: #52525b;
    border: 1px solid #3f3f46;
}

.key-marker.focused {
    background-color: #52525b;
    border: 2px solid #ffffff;
}

.key-label-wrapper strong {
    color: var(--text-primary);
    font-size: 0.85rem;
}

.key-list span {
    color: var(--text-secondary);
    opacity: 0.8;
}

.about-shortcuts {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.about-shortcuts .about-header-row {
    margin-bottom: 1.5rem;
}

.about-shortcuts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-shortcuts li {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.about-shortcuts-keys {
    min-width: 180px;
    margin-right: 1.5rem;
    /* Fixed width for the shortcut key column */
    display: flex;
    align-items: center;
    gap: 4px;
}

.about-shortcuts kbd {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
}

.about-shortcuts span {
    color: var(--text-secondary);
    opacity: 0.8;
}

.about-body strong {
    color: var(--text-primary);
    font-weight: 600;
}


.text-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.text-link:visited {
    color: var(--text-primary);
}

.text-link:hover {
    text-decoration: underline;
}

.about-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.about-footer p {
    margin: 0;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.github-link svg {
    fill: currentColor;
}

.github-link:visited {
    color: var(--text-secondary);
}

.github-link:hover {
    color: var(--text-primary);
}

/* Disclaimer Modal Styles */
.disclaimer-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    text-align: left;
}

.disclaimer-header {
    margin-bottom: 1.5rem;
}

.disclaimer-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.disclaimer-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.proceed-btn {
    margin-top: 1.5rem;
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
    transition: transform 0.1s;
}

.proceed-btn:hover {
    background: white;
    transform: translateY(-1px);
}

.proceed-btn:active {
    transform: translateY(0);
}

.text-link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.text-link:hover {
    color: white;
}

/* Data Pack List Styles */
.about-datapacks {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.datapack-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.datapack-drop-zone {
    width: 100%;
    margin-bottom: 1.5rem;
    padding: 2rem 1rem;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.drop-zone-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.drop-zone-text strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.drop-zone-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}


.datapack-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.datapack-item.error {
    border-color: #ef4444;
    position: relative;
}

.datapack-item.warning {
    border-color: #f59e0b;
    position: relative;
}

.datapack-error-icon {
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.datapack-error-icon:hover {
    background: var(--accent-hover) !important;
    color: var(--text-primary);
}

.datapack-error-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    width: 320px;
    background: #18181b;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 1 !important;
}

.error-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-tooltip-content strong {
    color: #ef4444;
    font-size: 0.875rem;
}

.error-tooltip-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.error-tooltip-content code {
    background: var(--bg-color);
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-primary);
}

.error-tooltip-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.error-tooltip-link:hover {
    text-decoration: underline;
}

/* Version Warning Styles */
.datapack-version-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    font-size: 16px;
}

.datapack-version-warning[data-warning="version_mismatch"] {
    color: #f59e0b;
    /* Orange */
}

.datapack-version-warning[data-warning="no_metadata"] {
    color: #eab308;
    /* Yellow */
}

.datapack-version-warning:hover {
    background: var(--accent-hover) !important;
    color: var(--text-primary) !important;
}

.datapack-version-warning svg {
    fill: currentColor;
    display: block;
}

.datapack-version-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    width: 320px;
    background: #18181b;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 1 !important;
}

.version-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.version-tooltip-content strong {
    font-size: 0.875rem;
    color: #f59e0b;
}

.version-tooltip-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.version-tooltip-content label {
    cursor: pointer;
    user-select: none;
}

.version-tooltip-content input[type="checkbox"] {
    cursor: pointer;
}


.datapack-color-picker {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 0;
}

.datapack-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.datapack-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.datapack-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}



.datapack-info {
    flex: 1;
    min-width: 0;
}

.datapack-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datapack-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.datapack-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.datapack-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.datapack-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3f3f46;
    transition: 0.2s;
    border-radius: 20px;
}

.datapack-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #a1a1aa;
    transition: 0.2s;
    border-radius: 50%;
}

.datapack-toggle input:checked+.datapack-toggle-slider {
    background-color: var(--text-primary);
}

.datapack-toggle input:checked+.datapack-toggle-slider:before {
    transform: translateX(16px);
    background-color: var(--bg-color);
}


.datapack-remove {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px !important;
    transition: all 0.15s;
    flex-shrink: 0;
}

.datapack-remove:hover {
    background: var(--accent-hover) !important;
    color: var(--text-primary) !important;
}

.datapack-remove svg {
    fill: currentColor;
    display: block;
}