:root {
    --accent-color: #268bd2;
    --background-color: #e3f9fd;
    --container-color: #fff;
    --text-color: #073642;
    --faded-color: #abb4b7;
    --dot-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: system-ui, sans-serif;
    margin: 2em;
    color: var(--text-color);
    background: var(--background-color);
    background-image: radial-gradient(var(--dot-color) 1px, transparent 0);
    background-size: 20px 20px;
}

#login-box {
    max-width: 320px;
    margin: 4em auto;
    text-align: center;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.container {
    background: var(--container-color);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 1em auto;
}

.site-header,
footer {
    text-align: center;
    font-size: 0.8em;
    color: var(--faded-color);
    margin-top: 0.5em;
}

textarea,
input,
button {
    font-family: inherit;
    font-size: 1em;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5em;
    padding: 0.5em;
    border-radius: 4px;
    border: 1px solid #ccc;
    resize: none;
}

textarea:disabled {
    background: var(--faded-color);
    color: #073642;
    cursor: text;
}

label {
    margin-bottom: 0.5em;
}

button {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5em 1em;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: #3a78c2;
}

#links {
    margin-top: 1em;
    font-size: 0.8em;
}

.tabs {
    margin-bottom: 1em;
    display: flex;
    border-bottom: 1px solid #ccc;
}

.tabs .tab {
    background: var(--faded-color);
    border: 1px solid #ccc;
    border-bottom: none;
    padding: 0.5em 1em;
    margin-right: 0.25em;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
}

.tabs .tab-link {
    display: inline-block;
    padding: 0.25em 1em;
    margin-left: auto;
    text-decoration: none;
    color: #fff;
    background: var(--accent-color);
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: auto;
}

.tabs .tab-link:hover {
    background: #3a78c2;
}

.tabs .tab.active {
    background: var(--container-color);
    color: var(--text-color);
    border-bottom: 1px solid var(--container-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1em;
}

.save-drop-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
    background: rgba(38, 139, 210, 0.08);
    color: var(--text-color);
    font-weight: 700;
    text-align: center;
    padding: 1em;
    box-sizing: border-box;
    z-index: 10;
}

.save-drop-overlay.active {
    display: flex;
}

.upload-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
}

.upload-overlay.active {
    display: flex;
}

.upload-card {
    background: var(--container-color);
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 1em 1.25em;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.upload-title {
    font-weight: 800;
    margin-bottom: 0.5em;
}

.upload-subtitle {
    color: var(--faded-color);
    font-size: 0.9em;
    margin-bottom: 0.75em;
    word-break: break-word;
}

.upload-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.upload-bar > div {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: width 0.1s linear;
}

.upload-status {
    margin-top: 0.6em;
    font-size: 0.9em;
    color: var(--text-color);
}

.upload-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1.25em;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.6em 0.9em;
    border-radius: 999px;
    font-size: 0.9em;
    z-index: 2100;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.upload-toast.active {
    opacity: 1;
}

.thumb {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.5s ease forwards;
}

.thumb.missing {
    background: #7a5fa1;
}

.thumb.missing img {
    display: none;
}

.thumb.missing .no-shot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2em;
    opacity: 0.8;
    display: block;
}

.thumb .no-shot {
    display: none;
}

.thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.thumb .num {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75em;
    z-index: 2;
}

.thumb .time {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75em;
    z-index: 2;
}

.thumb .device {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.65em;
    z-index: 2;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
}

.pagination {
    margin-top: 1em;
}

.screenshots {
    text-align: center;
}

.screenshots img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0.5em auto;
}

.log-container {
    position: relative;
}

#log {
    background: var(--faded-color);
    padding: 1em;
    border-radius: 4px;
    overflow: auto;
    white-space: pre;
    word-break: normal;
    max-height: 20em;
    position: relative;
}


.save-toolbar {
    display: flex;
    gap: 0.5em;
    margin: 0.5em 0;
}

.save-toolbar button,
.save-toolbar .download-btn {
    transition: transform 0.2s ease;
}

.save-toolbar button:hover,
.save-toolbar .download-btn:hover {
    transform: scale(1.1) rotate(-5deg);
}

.save-toolbar .shift-delete {
    background: #c33;
}

.save-toolbar .shift-delete:hover {
    background: #a00;
}

.panel>h1 {
    margin-top: -1em;
    margin-left: -0.5em;
    margin-right: -0.5em;
    padding-top: 1em;
}

h1 {
    background: var(--accent-color);
    color: #fff;
    padding: 0.5em;
    border-radius: 4px;
    margin-top: 0.2em;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 1em;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

#overlay.open {
    display: flex;
    opacity: 1;
}

#overlay .panel {
    background: var(--container-color);
    border-radius: 8px;
    padding: 1em;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

#overlay .close-btn {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color);
}

.thumb .download-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 2;
}

.thumb .comment-count {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75em;
    z-index: 2;
}


.thumb .copy-link-btn {
    position: absolute;
    top: 34px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    z-index: 2;
}

.thumb .copy-link-btn:hover {
    background: var(--accent-color);
}

.thumb .download-btn:hover {
    background: var(--accent-color);
}

.thumb .download-btn.disabled {
    background: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
}

.download-missing {
    color: var(--faded-color);
}

.journey-log-info {
    margin-top: 0.5em;
}

.journey-log-info .journey-log-btn {
    display: inline-block;
    color: #fff;
    background: var(--accent-color);
    padding: 0.25em 0.5em;
    border-radius: 4px;
    text-decoration: none;
}

.journey-log-info .journey-log-btn:hover {
    background: #3a78c2;
}

.journey-log-info .no-journey-log {
    color: var(--faded-color);
    font-style: italic;
}


.description {
    margin-top: 1em;
    font-size: 0.9em;
}

.description h1,
.description h2 {
    color: #fff;
    background: var(--faded-color);
    margin-bottom: 0.3em;
    transition: color 0.2s ease;
    padding: 3px;
}

.description h1 {
    font-size: 1.1em;
}

.description h2 {
    font-size: 1em;
}

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1100;
}

.image-overlay.open {
    display: flex;
    opacity: 1;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

.description .fold-header {
    cursor: pointer;
}

.description .fold-header:hover,
.description .fold-header.open {
    background: var(--accent-color);
}

.description .fold-content {
    margin-left: 1em;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.2s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loginForm {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

#settings h1 {
    font-size: 1.2em;
}

#settings input,
#settings button {
    font-size: 0.9em;
    padding: 0.4em 0.8em;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.avatar-settings {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
    margin-bottom: 1em;
}

#comment-area {
    position: fixed;
    top: 2em;
    right: 2em;
    width: 300px;
    max-height: calc(100vh - 4em);
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
}

#comment-area p {
    margin: 0.25em 0;
}

#comment-area .comment-bubble {
    position: relative;
    background: var(--container-color);
    padding: 0.15em 0.5em;
    border-radius: 8px;
    margin: 0 0 0.5em 0.5em;
    min-height: 3em;
}

#comment-area .comment-bubble::after {
    content: '';
    position: absolute;
    left: -0.5em;
    top: 1em;
    width: 0;
    height: 0;
    border-top: 0.5em solid transparent;
    border-bottom: 0.5em solid transparent;
    border-right: 0.5em solid var(--container-color);
}

#comment-area .comment-bubble .avatar {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--faded-color);
}

#comment-area .comment-bubble.new {
    display: flex;
    align-items: flex-start;
    gap: 0.25em;
}

#comment-area .comment-bubble.new.empty {
    opacity: 0.6;
}

#comment-area .comment-bubble.new textarea {
    flex: 1;
    width: 100%;
    border: none;
    resize: none;
    padding: 0.25em;
    background: transparent;
    min-height: 3em;
}

#comment-area .comment-bubble.new textarea:focus {
    outline: none;
    background: var(--container-color);
}

#comment-area .comment-actions {
    position: absolute;
    bottom: 0.25em;
    right: 0.25em;
    display: flex;
    gap: 0.25em;
}

#comment-area .comment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--faded-color);
    padding: 0;
}

#comment-area .comment-actions .confirm-del {
    color: #c33;
}

#comment-area .comment-actions button:hover {
    color: var(--text-color);
}
.flex1 {
    flex: 1;
}

.inline-form {
    display: inline;
}

.worlds-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.worlds-table th, .worlds-table td {
    padding: 0.25em 0.5em;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.worlds-table th:nth-child(1),
.worlds-table td:nth-child(1) {
    width: 12em;
}

.worlds-table th:nth-child(2),
.worlds-table td:nth-child(2) {
    width: 18em;
    word-break: break-all;
}

.worlds-table th:nth-child(3),
.worlds-table td:nth-child(3) {
    width: 6em;
    text-align: center;
}

.worlds-table th:nth-child(4),
.worlds-table td:nth-child(4) {
    width: 12em;
    text-align: right;
}

.worlds-table th:nth-child(1),
.worlds-table td:nth-child(1) {
    width: 84px;
    text-align: center;
}

.world-guid {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.85em;
}

.world-actions {
    text-align: right;
    white-space: nowrap;
}

.world-actions .inline-form {
    margin-left: 0.25em;
}

.world-bg-input {
    display: none;
}

.world-bg-delete-btn {
    background: #c33;
}

.world-bg-delete-btn:hover {
    background: #a00;
}

.world-bg-delete-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.25);
}

.world-preview-wrap {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.world-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.world-preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--faded-color);
    font-size: 0.75em;
    text-align: center;
    padding: 0.5em;
    box-sizing: border-box;
}

.world-preview-wrap.has-bg .world-preview {
    display: block;
}

.world-preview-wrap.has-bg .world-preview-empty {
    display: none;
}

.avatar-settings form {
    margin-top: 0.5em;
}

.storage-block {
    margin-top: 0.5em;
}

.storage-banner {
    background: var(--background-color);
    border: 1px dashed #ccc;
    padding: 0.75em;
    border-radius: 6px;
    margin-bottom: 1em;
}

.storage-subtle {
    color: var(--faded-color);
    font-size: 0.9em;
    margin-left: 0.6em;
}

.storage-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.storage-primary {
    width: 100%;
    box-sizing: border-box;
}

.storage-help {
    margin-top: 0.4em;
    color: var(--faded-color);
    font-size: 0.9em;
}

.storage-hist {
    display: flex;
    width: 100%;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ccc;
    background: var(--background-color);
}

.storage-hseg {
    height: 100%;
    min-width: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    color: #fff;
    background: rgba(38, 139, 210, 0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    user-select: none;
}

.storage-hseg:last-child {
    border-right: none;
}

.storage-hseg.empty {
    background: rgba(0, 0, 0, 0.08);
    color: transparent;
}

.storage-legend {
    margin-top: 0.5em;
    color: var(--faded-color);
    font-size: 0.9em;
}

.storage-legend ul {
    margin: 0;
    padding-left: 1.2em;
}

.storage-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5em;
}

.storage-table th,
.storage-table td {
    padding: 0.35em 0.5em;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.storage-table th:nth-child(1),
.storage-table td:nth-child(1) {
    width: 7em;
}

.storage-table th:nth-child(4),
.storage-table td:nth-child(4) {
    width: 7em;
    text-align: right;
}

.storage-table .tab-link {
    margin: 0;
}

.storage-table button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

body.journey-full {
    margin: 0;
    --background-color: #121212;
    --container-color: #1e1e1e;
    --text-color: #eeeeee;
    --faded-color: #777;
    --dot-color: rgba(255, 255, 255, 0.1);
    background: var(--background-color);
    color: var(--text-color);
    overflow: hidden;
}

.journey-flex {
    display: flex;
    height: calc(100vh - 4em);
}

#journey-toolbar {
    width: 325px;
    background: var(--container-color);
    border-right: 1px solid #444;
    padding: 1em;
    box-sizing: border-box;
}

#journey-map {
    flex: 1;
    background: #000;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

#journey-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 5;
}

#journey-loading.active {
    display: flex;
}

.journey-mode-bar {
    position: absolute;
    top: 52px;
    left: 12px;
    display: flex;
    gap: 8px;
    z-index: 6;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px;
    backdrop-filter: blur(6px);
}

.journey-mode-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0.35em 0.75em;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9em;
    line-height: 1;
}

.journey-mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.journey-mode-btn.active {
    background: rgba(38, 139, 210, 0.85);
    border-color: rgba(38, 139, 210, 0.9);
}

#journey-context-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    z-index: 6;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

#journey-context-bar span {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.25em 0.6em;
    border-radius: 999px;
}

#journey-visit-time {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.25em 0.6em;
    border-radius: 999px;
}


.journey-loading-card {
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 1em 1.25em;
    min-width: 240px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.journey-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    margin: 0 auto 0.6em;
    animation: journeySpin 0.9s linear infinite;
}

@keyframes journeySpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.journey-loading-text {
    font-weight: 700;
    margin-bottom: 0.25em;
}

.journey-loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    min-height: 1.1em;
}

#journey-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    color: var(--text-color);
    padding: 0.5em;
}

#journey-map canvas {
    width: 100%;
    height: 100%;
    display: block;
    transform-origin: 0 0;
    will-change: transform;
}

#journey-tooltip {
    position: absolute;
    background: rgba(15, 15, 20, 0.9);
    color: #fff;
    padding: 6px 9px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    font-size: 0.9em;
    pointer-events: none;
    max-width: 280px;
    line-height: 1.3;
    z-index: 10;
    white-space: pre-line;
}

#journey-toolbar textarea,
#journey-toolbar select,
#journey-toolbar input[type="file"],
#journey-toolbar button {
    width: 100%;
    margin-bottom: 0.5em;
    box-sizing: border-box;
}

#unload-btn,
#world-select,
#world-info,
#visit-info,
#visit-select {
    display: none;
}

#load-box {
    background: var(--background-color);
    padding: 0.5em;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5em;
}

#world-info {
    background: var(--background-color);
    padding: 0.5em;
    border-radius: 4px;
    margin-bottom: 0.5em;
    color: var(--text-color);
}

#visit-info {
    background: var(--background-color);
    padding: 0.5em;
    border-radius: 4px;
    margin-bottom: 0.5em;
    color: var(--text-color);
}

.back-button {
    display: inline-block;
    margin-bottom: 0.1em;
    color: #fff;
    background: var(--accent-color);
    padding: 0.25em 0.5em;
    border-radius: 4px;
    text-decoration: none;
}

.back-button:hover {
    background: #3a78c2;
}

/* Crash Reports Table */
.crash-stats {
    margin-bottom: 1em;
    color: var(--faded-color);
    font-size: 0.9em;
}

.crashes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: 0.9em;
}

.crashes-table thead {
    background: var(--background-color);
    position: sticky;
    top: 0;
}

.crashes-table th {
    text-align: left;
    padding: 0.75em 0.5em;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color);
}

.crashes-table td {
    padding: 0.75em 0.5em;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.crash-row:hover {
    background: #f5f5f5;
}

.crash-id {
    width: 60px;
    font-family: monospace;
    color: var(--faded-color);
}

.crash-title {
    font-weight: 500;
    max-width: 300px;
}

.crash-description {
    color: var(--faded-color);
    font-size: 0.85em;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crash-time {
    white-space: nowrap;
    font-size: 0.85em;
    color: var(--faded-color);
}

.crash-actions {
    white-space: nowrap;
    text-align: right;
}

.crash-actions button {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    margin-left: 0.5em;
}

.btn-view-crash {
    background: var(--accent-color);
}

.btn-view-crash:hover {
    background: #3a78c2;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

/* Crash Detail View */
.crash-view {
    max-width: 1200px;
}

.crash-meta {
    color: var(--faded-color);
    font-size: 0.9em;
    margin-bottom: 2em;
}

.crash-section {
    margin-bottom: 2em;
}

.crash-section h2 {
    font-size: 1.2em;
    margin-bottom: 0.5em;
    color: var(--text-color);
}

.crash-section pre {
    background: var(--background-color);
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.callstack {
    color: #d32f2f;
}

.crash-log, .game-log {
    color: var(--text-color);
}

/* Make crash rows clickable */
.crash-row.clickable {
    cursor: pointer;
}

.crash-row.clickable:hover {
    background: #f0f8ff;
}

/* Crash View Header */
.crash-header {
    margin-bottom: 2em;
}

.crash-title-row {
    background: var(--accent-color);
    padding: 1em 1.5em;
    border-radius: 4px 4px 0 0;
}

.crash-exception-badge {
    color: white;
    font-size: 1.3em;
    font-weight: 600;
    display: block;
}

.crash-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 0.75em 1.5em;
    border-radius: 0 0 4px 4px;
}

.crash-meta-left {
    display: flex;
    align-items: center;
    gap: 1.5em;
    flex: 1;
}

.crash-meta-item {
    color: #999;
    font-size: 0.85em;
}

.crash-delete-form {
    display: inline-flex;
    margin: 0;
}

.crash-delete-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0.25em;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.crash-delete-icon:hover {
    opacity: 1;
}

.crash-meta-right {
    flex-shrink: 0;
}

.btn-back {
    background: var(--accent-color);
    color: white;
    padding: 0.5em 1em;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.15s ease;
}

.btn-back:hover {
    background: #3a78c2;
}

/* Update callstack column styling */
.crash-callstack {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    color: #666;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make only ID column clickable */
.crash-id.clickable-id {
    cursor: pointer;
    color: var(--accent-color);
    font-size: 1.05em;
    font-weight: bold;
}

.crash-id.clickable-id:hover {
    color: #3a78c2;
    text-decoration: underline;
}

/* Remove row hover effect */
.crash-row:hover {
    background: #fafafa;
}

/* Crash Subtabs */
.crash-subtabs {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
    border-bottom: 2px solid #e0e0e0;
}

.crash-subtab {
    background: none;
    border: none;
    padding: 0.75em 1.5em;
    cursor: pointer;
    font-size: 1em;
    color: var(--faded-color);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.crash-subtab:hover {
    color: var(--text-color);
    background: #f5f5f5;
}

.crash-subtab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

.crash-subtab-content {
    display: none;
}

.crash-subtab-content.active {
    display: block;
}

/* Bucket Controls */
.bucket-controls {
    margin-bottom: 1em;
}

.bucket-mode-select {
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    margin-left: 0.5em;
}

#bucket-stats {
    margin-bottom: 1em;
    color: var(--faded-color);
    font-size: 0.9em;
}

/* Buckets Table */
.buckets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.buckets-table thead {
    background: var(--background-color);
}

.buckets-table th {
    text-align: left;
    padding: 0.75em 0.5em;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color);
}

.buckets-table td {
    padding: 0.75em 0.5em;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.bucket-row:hover {
    background: #fafafa;
}

.bucket-name {
    font-weight: 500;
    max-width: 400px;
}

.bucket-count {
    width: 80px;
    text-align: center;
    font-size: 1.1em;
    color: var(--accent-color);
}

.bucket-count.clickable-count {
    cursor: pointer;
    transition: background 0.15s ease;
}

.bucket-count.clickable-count:hover {
    background: #f0f8ff;
}

/* Crash filter bar */
.crash-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 0.75em 1em;
    margin-bottom: 1em;
}

.crash-filter-bar.hidden {
    display: none;
}

.crash-row.hidden {
    display: none;
}

.inline-form {
    display: inline;
}

.filter-label {
    font-size: 0.9em;
    color: #856404;
}

.filter-label strong {
    color: #000;
}

.btn-clear-filter {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.15s ease;
}

.btn-clear-filter:hover {
    background: #3a78c2;
}

.bucket-time {
    white-space: nowrap;
    font-size: 0.85em;
    color: var(--faded-color);
}

.bucket-actions {
    text-align: right;
    white-space: nowrap;
}

.btn-view-sample {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    background: var(--accent-color);
}

.btn-view-sample:hover {
    background: #3a78c2;
}
