/* ==========================================================================
   TuiCss-inspired styles for kmaba.link
   Adapts the text-based UI aesthetic (Lucida Console, VGA 16-color palette,
   double borders, box-shadow windows) to the existing bento-grid layout.
   ========================================================================== */

/* DOS / TuiCss font */
@font-face {
    font-family: 'DOS';
    src: url('./fonts/Perfect DOS VGA 437 Win.ttf');
}

/* Pin the root font — tuicss.css sets html to 'Lucida Console', monospace
   without the DOS fallback; make the whole tree use the same stack */
html {
    font-family: var(--font-inter);
}

:root {
    /* TuiCss VGA palette — Dark Mode (blue-black) */
    --font-inter: 'Lucida Console', 'DOS', 'monospace', -apple-system,
        BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --bg-color:        rgb(30, 30, 140);   /* blue-black */
    --text-primary:    rgb(255, 255, 255); /* white */
    --text-secondary:  rgb(168, 168, 168); /* gray */
    --card-bg:         rgb(30, 30, 140);   /* blue-black cards */
    --card-border:     rgb(255, 255, 255); /* white double border */
    --card-radius:     0px;              /* TuiCss: sharp corners */
    --card-padding:    24px;
    --grid-gap:        24px;

    --shadow-main:     10px 10px black;  /* TuiCss panel/window shadow */

    /* 168 color palette */
    --color-orange:    rgb(140, 76, 30);
    --color-blue:      rgb(30, 30, 140);   /* blue-168 */
    --color-blue-bright: rgb(60, 60, 200);  /* bright blue */
    --color-blue-dark: rgb(30, 30, 140);
    --color-github-bg: rgb(30, 30, 140);
    --color-map-pill:  rgb(255, 255, 255);
    --color-map-text:  rgb(30, 30, 140);

    /* 255 bright palette accents */
    --color-green:     rgb(30, 140, 30);
    --color-cyan:      rgb(30, 140, 140);
    --color-yellow:    rgb(140, 140, 30);
    --color-red:       rgb(140, 30, 30);
    --color-purple:    rgb(140, 30, 140);
    --color-red-light: rgb(140, 30, 30);
}

*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-inter);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Keep the dithered TuiCss background pinned while scrolling */
    background-attachment: fixed;
}

/* Disable image drag highlight */
img {
    -webkit-user-drag: none;
    user-select: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.layout {
    display: flex;
    flex-direction: row;
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

/* Content Column: holds top grid + section title + bottom grid */
.content-col {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
    min-width: 0;
    max-width: 1040px;
    width: 100%;
}

/* Profile Column */
.profile-col {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    height: fit-content;
    align-self: flex-start;
}

.avatar-container {
    width: 160px;
    height: 160px;
    margin-bottom: 24px;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    box-shadow: var(--shadow-main);
    border: 2px solid var(--card-border);
}

.profile-name {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
    line-height: 1.1;
    color: var(--color-blue-bright, rgb(60, 60, 200));
}

.profile-handle {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.profile-bio {
    font-size: 18px;
    color: var(--text-primary);
    opacity: 0.8;
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.6;
}

.profile-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-line {
    font-size: 16px;
    color: var(--color-cyan);
    font-weight: 500;
}

/* ==========================================================================
   Bento Grid
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: var(--grid-gap);
    width: 100%;
    max-width: 1040px;
    grid-auto-flow: dense;
}

.avatar-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* Card Styles — TuiCss window/panel look */
.bento-card {
    background: var(--card-bg);
    border: 6px var(--card-border) double;
    border-radius: var(--card-radius);
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s;
}

.bento-card:hover {
    border-color: var(--color-cyan);
    box-shadow: 10px 10px black;
    z-index: 10;
}

/* Keyboard focus — visible outline for tab navigation */
a:focus-visible,
.bento-card:focus-visible,
.tui-btn:focus-visible,
.tui-input:focus-visible {
    outline: 2px solid var(--color-cyan);
    outline-offset: 2px;
}

/* Media / Image / Video Content within Cards */
.card-media {
    padding: 0;
}

.media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Grid spans */
.col-span-2 { grid-column: span 2; }
.col-span-4 { grid-column: span 4; }
.vertical-tall { grid-row: span 2; }

/* ==========================================================================
   GitHub Card
   ========================================================================== */
.card-github .card-content {
    padding: var(--card-padding);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.github-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.github-icon svg {
    fill: var(--text-primary);
}

.github-info {
    flex-grow: 1;
}

.github-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-cyan);
}

.github-chart-container {
    flex-grow: 1;
    margin: 16px 0;
    opacity: 0.9;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.github-chart {
    width: 100%;
}

/* Flight Label */
.card-flight {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
}

.media-label-container {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.media-label {
    background: var(--color-cyan);
    color: var(--color-blue);
    padding: 8px 12px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-main);
}

/* Blue Name Card */
.card-name-blue {
    background-color: var(--color-blue);
    color: var(--text-primary);
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 24px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-name-blue h4 {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    width: 100%;
    word-break: break-word;
    color: var(--color-yellow);
}

.card-name-blue strong {
    font-weight: inherit;
}

.card-name-blue .centered-text {
    width: 100%;
}

/* ==========================================================================
   Map Card
   ========================================================================== */
.card-map {
    position: relative;
    background: #000;
    overflow: hidden;
    z-index: 1;
    border: 6px var(--card-border) double;
    border-radius: var(--card-radius);
}

.card-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: transparent;
    font-family: var(--font-inter);
}

.card-map canvas {
    outline: none;
    border-radius: 0;
}

/* Custom Map Marker */
.custom-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-dot {
    width: 16px;
    height: 16px;
    background-color: var(--color-cyan);
    border: 3px solid var(--card-border);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(30, 140, 140, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(30, 140, 140, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(30, 140, 140, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 140, 140, 0); }
}

.card-map:hover iframe {
    filter: saturate(1) contrast(1);
}

.map-label-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--color-map-pill);
    color: var(--color-map-text);
    padding: 12px 16px;
    border-radius: 0;
    outline: 3px double var(--card-border);
    outline-offset: 3px;
    box-shadow: var(--shadow-main);
    max-width: 80%;
    z-index: 2;
    pointer-events: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.map-label {
    font-size: clamp(12px, 2.5vw, 14px);
}

/* Mapbox GL controls — darken for TuiCss palette */
.card-map .mapboxgl-control-container .mapboxgl-zoom {
    background: transparent;
}
.card-map .mapboxgl-control {
    color: var(--text-primary);
}

/* ==========================================================================
   Section Title / Divider
   ========================================================================== */
.section-title {
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
    padding-left: 8px;
    border-bottom: 2px solid var(--card-border); /* TuiCss divider */
    width: 100%;
}

.section-title h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ==========================================================================
   Small Cards (Socials)
   ========================================================================== */
.card-small .card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.icon-center {
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 12px;
}

.card-white {
    background: var(--card-bg);
    color: var(--text-primary);
}

.card-red-light {
    background: var(--color-red);
    color: var(--text-primary);
}

.card-red-light:hover {
    background: var(--color-red);
    filter: brightness(1.2);
}

.link-text {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
}

.link-sub {
    color: inherit;
    opacity: 0.7;
    font-weight: 400;
}

.yt-subscribe, .insta-follow {
    font-size: 12px;
    color: var(--color-blue);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 0;
    font-weight: 600;
    border: 1px solid var(--card-border);
}

/* ==========================================================================
   Orange / Blue Text Cards
   ========================================================================== */
.card-orange {
    background-color: var(--color-orange);
    color: var(--text-primary);
}

.text-left-pad {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.orange-text-block {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
}

.orange-text-block strong {
    font-weight: 800;
    color: var(--color-yellow);
}

.card-arrow-icon {
    align-self: flex-end;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-main);
}

.card-blue {
    background-color: var(--color-blue-bright, rgb(60, 60, 200));
    color: var(--text-primary);
}

/* ==========================================================================
   Notes Card (dark green)
   ========================================================================== */
.card-green {
    background-color: rgb(0, 60, 0);
    color: var(--text-primary);
}

.card-green .card-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-green .notes-text {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 500;
}

.card-green .notes-text strong {
    color: var(--color-green);
}

.card-green:hover {
    background-color: rgb(0, 90, 0);
}

.card-green .card-arrow-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 20px;
    color: var(--color-green);
}

.card-blue .card-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==========================================================================
   Steam Card (dark, link card)
   ========================================================================== */
.card-steam {
    background-color: rgb(23, 26, 33); /* Steam dark #171a21 */
    color: var(--text-primary);
}

.card-steam .card-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.steam-icon {
    width: 52px;
    height: 52px;
    color: rgb(102, 192, 244); /* Steam light blue */
}

.steam-text {
    font-size: 17px;
    line-height: 1.4;
    font-weight: 500;
}

.steam-text strong {
    color: rgb(102, 192, 244);
    font-weight: 700;
}

.card-steam:hover {
    background-color: rgb(32, 36, 46);
}

.card-steam .card-arrow-icon {
    background: rgb(102, 192, 244);
    color: rgb(23, 26, 33);
}

.blue-text {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 500;
}

.blue-text strong {
    font-weight: 500;
    color: var(--color-cyan);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .layout {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }
    .content-col {
        width: 100%;
        max-width: 600px;
    }
    .profile-col {
        position: relative;
        top: 0;
        width: 100%;
        max-width: 600px;
        text-align: center;
    }
    .profile-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .profile-tags {
        align-items: center;
    }
}

/* Tablet: two-column bento grid (4 narrow columns don't fit <1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(210px, auto);
        gap: 18px;
    }
    .col-span-2, .col-span-4 {
        grid-column: span 2;
    }
    .vertical-tall {
        grid-row: span 2;
    }
    .card-map {
        min-height: 210px;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(240px, auto);
        gap: 20px;
    }
    .col-span-2, .col-span-4, .vertical-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .vertical-tall {
        height: 400px;
    }
    .card-map {
        height: 240px;
    }
    .section-title {
        text-align: left;
        padding-left: 0;
    }
    .layout {
        padding: 14px;
        margin-top: 30px;
    }
    .content-col {
        gap: 20px;
    }
}

/* Small phones: shrink navbar so it never overflows */
@media (max-width: 640px) {
    .tui-navbar ul li {
        margin-left: 4px;
        padding: 1px 3px;
    }
    .tui-navbar ul li a {
        font-size: 12px;
    }
    .tui-navbar .tui-datetime {
        font-size: 12px;
        padding: 1px 4px;
    }
    .tui-navbar #tui-location {
        display: none;
    }
    .tui-statusbar ul li {
        margin-left: 4px;
        font-size: 11px;
    }
}

/* ==========================================================================
   Staggered card reveal — each box pops in instantly, one after another
   (no fade), top-left → bottom-right. Cards are only hidden when JS is
   active (html.js); main.js adds body.cards-in after first paint so the
   stagger is actually visible. Delay index --i is set per card in HTML.
   ========================================================================== */
html.js .bento-card {
    opacity: 0;
}

html.js body.cards-in .bento-card {
    opacity: 1;
    transition: opacity 0s linear calc(var(--i, 12) * 45ms);
}

/* ==========================================================================
   Windows 98-style cursor
   ========================================================================== */
html, body, a, button, .tui-btn, .bento-card, .avatar-link, summary, input[type="submit"], label {
    cursor: url("img/win98-cursor.png") 3 1, auto;
}

input:not([type="submit"]), textarea, select {
    cursor: text;
}

/* ==========================================================================
   TuiCss color utility classes (adapted for use in HTML where needed)
   ========================================================================== */
.tui-text-red   { color: rgb(140, 30, 30) !important; }
.tui-text-green { color: rgb(30, 140, 30) !important; }
.tui-text-cyan  { color: rgb(30, 140, 140) !important; }
.tui-text-yellow{ color: rgb(140, 140, 30) !important; }
.tui-text-orange{ color: rgb(140, 76, 30) !important; }
.tui-text-purple{ color: rgb(140, 30, 140) !important; }
.tui-text-blue  { color: rgb(30, 30, 140) !important; }
.tui-text-white { color: rgb(255, 255, 255) !important; }

/* ==========================================================================
   Lanyard Card Styles
   ========================================================================== */
#lanyard-card {
    background-color: rgb(30, 30, 140); /* blue-black */
    color: var(--text-primary);
}

#lanyard-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.lanyard-loading {
    font-size: 14px;
    opacity: 0.7;
    width: 100%;
    text-align: center;
    color: var(--color-cyan);
}

/* Lanyard: header layout */
.lanyard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.lanyard-pfp-wrapper {
    position: relative;
    flex-shrink: 0;
}

.lanyard-pfp {
    width: 64px;
    height: 64px;
    border-radius: 0;
    object-fit: cover;
    border: 2px solid var(--card-border);
}

.lanyard-pfp {
    border-color: rgba(255, 255, 255, 0.1);
}

.lanyard-status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.lanyard-name-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 0;
    gap: 4px;
    padding-top: 0;
}

.lanyard-display-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

/* Activity Row Styling */
.lanyard-activity-container {
    margin-top: 4px;
}

.lanyard-activity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 0;
    transition: background 0.2s;
    border: 1px solid var(--card-border);
}

.lanyard-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.lanyard-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 0;
    object-fit: cover;
}

.spin-slow {
    animation: spin 8s linear infinite;
    border-radius: 0;
}

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

.lanyard-icon-spotify-overlay {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--color-blue);
    border-radius: 0;
    padding: 2px;
}

.lanyard-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lanyard-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    opacity: 0.7;
    margin-bottom: 2px;
    color: var(--text-secondary);
}

.lanyard-detail {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
    color: var(--text-primary);
}

.lanyard-detail.highlight {
    color: var(--color-green);
}

.lanyard-timer {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 2px;
    color: var(--text-secondary);
}

/* Lanyard: default status row */
.lanyard-default {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.lanyard-status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.lanyard-activity, .lanyard-spotify {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.lanyard-icon-wrapper.mini {
    position: relative;
    width: 40px;
    height: 40px;
}

.lanyard-icon-small {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
}

.lanyard-icon-spotify-overlay.small {
    width: 14px;
    height: 14px;
    padding: 1px;
    bottom: -2px;
    right: -2px;
}

.lanyard-act-top {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    font-weight: 700;
    margin-bottom: 2px;
}

.lanyard-act-track {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lanyard-act-track.highlight {
    color: var(--color-green);
}

.lanyard-act-sub {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive text sizes */
.card-name-blue h4 { font-size: clamp(20px, 4vw, 32px); }
.media-label { font-size: clamp(11px, 2vw, 13px); }
.map-label { font-size: clamp(12px, 2.5vw, 14px); }
.github-name { font-size: clamp(14px, 1.5vw, 16px); }

/* ==========================================================================
   TuiCss Scrollbar — cyan thumb on dithered track
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background-image: url("lib/tuicss/images/scroll-cyan.png");
    background-repeat: repeat;
}
::-webkit-scrollbar-thumb {
    background-color: rgb(30, 140, 140);
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgb(30, 140, 140);
}

/* Firefox scrollbar */
body {
    scrollbar-width: thin;
    scrollbar-color: rgb(30, 140, 140) var(--bg-color);
}

/* ==========================================================================
   TuiCss Navbar (top menu bar)
   ========================================================================== */
.tui-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgb(168, 168, 168);
    padding: 0 2px;
    z-index: 999;
    display: flex;
    align-items: center;
    height: 32px;
}
.tui-navbar .tui-datetime {
    padding: 1px 8px;
    margin-right: 0;
    color: rgb(30, 30, 140);
    font-size: 14px;
    font-weight: 700;
}
.tui-navbar ul {
    display: flex;
    list-style: none;
}
.tui-navbar ul li {
    display: inline-block;
    margin-left: 10px;
    padding: 1px 6px;
}
.tui-navbar ul li a {
    display: block;
    font-size: 14px;
    color: rgb(30, 30, 140);
    font-weight: 700;
    text-decoration: none;
    user-select: none;
}
.tui-navbar ul li a span.accel {
    color: rgb(140, 30, 30);
}
.tui-navbar ul li:hover {
    background-color: rgb(40, 200, 40); /* bright green */
}
.tui-navbar ul li:hover a {
    color: rgb(0, 0, 0);
}
/* Color-coded hovers — like a DOS menu bar:
   1=GitHub green, 2=YouTube red, 3=Instagram purple, 4=Resume cyan */
.tui-navbar ul li:nth-child(2):hover { background-color: rgb(200, 40, 40); }
.tui-navbar ul li:nth-child(3):hover { background-color: rgb(200, 40, 200); }
.tui-navbar ul li:nth-child(4):hover { background-color: rgb(40, 200, 200); }
.tui-navbar-divider {
    border-right: 2px solid black;
    display: inline-block;
    margin: 0 4px;
    height: 20px;
}

/* ==========================================================================
   TuiCss Status Bar (bottom of screen)
   ========================================================================== */
.tui-statusbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgb(168, 168, 168);
    padding: 0 2px;
    z-index: 999;
    display: flex;
    align-items: center;
    height: 28px;
}
.tui-statusbar ul {
    display: flex;
    list-style: none;
    gap: 2px;
}
.tui-statusbar ul li {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 4px;
    font-size: 13px;
    font-weight: 700;
    color: rgb(30, 30, 140);
}
.tui-statusbar ul li a {
    display: block;
    color: inherit;
    text-decoration: none;
    user-select: none;
}
.tui-statusbar ul li a span.accel {
    color: rgb(140, 30, 30);
}
.tui-statusbar ul li:active {
    background-color: rgb(30, 30, 140);
    color: rgb(255, 255, 255);
}
.tui-statusbar .tui-statusbar-divider {
    border-right: 2px solid black;
    display: inline-block;
    margin: 0 4px;
    height: 18px;
}

/* ==========================================================================
   TuiCss Style Buttons
   ========================================================================== */
.tui-btn {
    display: inline-block;
    outline: 0;
    padding: 1px 10px;
    background-color: rgb(30, 140, 30);
    color: rgb(30, 30, 140);
    border: none;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    box-shadow: 10px 10px black;
    border-radius: 0;
    user-select: none;
    font-size: 14px;
}
.tui-btn:active {
    background-color: rgb(40, 200, 200) !important;
    color: rgb(30, 30, 140) !important;
    box-shadow: none !important;
}
.tui-btn:focus {
    color: rgb(40, 200, 200) !important;
}
.tui-btn.red-168    { background-color: rgb(140, 30, 30); }
.tui-btn.green-168  { background-color: rgb(30, 140, 30); }
.tui-btn.cyan-168   { background-color: rgb(30, 140, 140); }
.tui-btn.yellow-168 { background-color: rgb(140, 140, 30); }
.tui-btn.orange-168 { background-color: rgb(140, 76, 30); }
.tui-btn.blue-168   { background-color: rgb(30, 30, 140); color: white; }
.tui-btn.purple-168 { background-color: rgb(140, 30, 140); }

/* ==========================================================================
   TuiCss-style input fields
   ========================================================================== */
.tui-input {
    background-color: rgb(0, 0, 0);
    color: rgb(40, 200, 40);
    outline: 0;
    border: 2px solid rgb(168, 168, 168);
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    padding: 2px 4px;
}
.tui-input:focus {
    background-color: rgb(200, 200, 40) !important;
    color: rgb(30, 30, 140) !important;
}

/* ==========================================================================
   TuiCss-style tables / grids
   ========================================================================== */
.tui-table {
    border: 2px solid rgb(168, 168, 168);
    padding: 5px;
    border-collapse: collapse;
    background-color: inherit;
    color: inherit;
}
.tui-table tbody tr td {
    border-right: 2px solid rgb(168, 168, 168);
    padding: 0 2px;
}
.tui-table thead {
    color: rgb(200, 200, 40);
    text-align: center;
    font-weight: 700;
}

/* ==========================================================================
   Layout offset for fixed navbar/statusbar
   ========================================================================== */
.layout {
    margin-top: 36px;
    margin-bottom: 32px;
}

/* ==========================================================================
   TuiCss color utility classes — full 168/255 palette
   ========================================================================== */
.bg-blue-168   { background-color: rgb(30, 30, 140) !important; }
.bg-green-168  { background-color: rgb(30, 140, 30) !important; }
.bg-cyan-168   { background-color: rgb(30, 140, 140) !important; }
.bg-red-168    { background-color: rgb(140, 30, 30) !important; }
.bg-purple-168 { background-color: rgb(140, 30, 140) !important; }
.bg-yellow-168 { background-color: rgb(140, 140, 30) !important; }
.bg-orange-168 { background-color: rgb(140, 76, 30) !important; }

.bg-blue-255   { background-color: rgb(60, 60, 200) !important; }
.bg-green-255  { background-color: rgb(40, 200, 40) !important; }
.bg-cyan-255   { background-color: rgb(40, 200, 200) !important; }
.bg-red-255    { background-color: rgb(200, 40, 40) !important; }
.bg-purple-255 { background-color: rgb(200, 40, 200) !important; }
.bg-yellow-255 { background-color: rgb(200, 200, 40) !important; }

.text-blue-168   { color: rgb(30, 30, 140) !important; }
.text-green-168  { color: rgb(30, 140, 30) !important; }
.text-cyan-168   { color: rgb(30, 140, 140) !important; }
.text-red-168    { color: rgb(140, 30, 30) !important; }
.text-yellow-168 { color: rgb(140, 140, 30) !important; }
.text-orange-168 { color: rgb(140, 76, 30) !important; }

.text-blue-255   { color: rgb(60, 60, 200) !important; }
.text-green-255  { color: rgb(40, 200, 40) !important; }
.text-cyan-255   { color: rgb(40, 200, 200) !important; }
.text-red-255    { color: rgb(200, 40, 40) !important; }
.text-yellow-255 { color: rgb(200, 200, 40) !important; }

.border-blue-168   { border-color: rgb(30, 30, 140) !important; }
.border-green-168  { border-color: rgb(30, 140, 30) !important; }
.border-cyan-168   { border-color: rgb(30, 140, 140) !important; }
.border-red-168    { border-color: rgb(140, 30, 30) !important; }
.border-yellow-168 { border-color: rgb(140, 140, 30) !important; }
.border-orange-168 { border-color: rgb(140, 76, 30) !important; }

.border-blue-255   { border-color: rgb(60, 60, 200) !important; }
.border-green-255  { border-color: rgb(40, 200, 40) !important; }
.border-cyan-255   { border-color: rgb(40, 200, 200) !important; }
.border-red-255    { border-color: rgb(200, 40, 40) !important; }
.border-yellow-255 { border-color: rgb(200, 200, 40) !important; }

/* Hover variants */
.bg-blue-168-hover:hover   { background-color: rgb(30, 30, 140) !important; }
.bg-green-168-hover:hover  { background-color: rgb(30, 140, 30) !important; }
.bg-cyan-168-hover:hover   { background-color: rgb(30, 140, 140) !important; }

/* ==========================================================================
   Media queries — responsive adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .layout {
        margin-top: 32px;
        margin-bottom: 32px;
    }
}
