﻿/* ============================================================
   90s Nostalgia Website ΓÇö Enhanced Stylesheet
   ============================================================ */

/* ---------- Keyframe Animations ---------- */

@keyframes window-glow-pulse-opacity {
    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }
}

@keyframes rainbow-hr {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

@keyframes hue-rotate-border {
    0% {
        border-color: #ff00ff;
        filter: none;
    }

    33% {
        border-color: #00ffff;
    }

    66% {
        border-color: #ffff00;
    }

    100% {
        border-color: #ff00ff;
    }
}

/* Removed window-glow-pulse for performance optimization */

@keyframes blink-cursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ---------- Starfield Canvas ---------- */

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
}

/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #00ff00;
    font-family: 'Comic Sans MS', cursive, 'Courier New', Courier, monospace;
    margin: 0;
    padding: 10px;
    text-shadow: 0 0 4px rgba(0, 255, 0, .45);
    cursor: crosshair;
    min-height: 100vh;
}

a {
    color: #00ffff;
    text-shadow: 0 0 6px rgba(0, 255, 255, .5);
}

.popout-link {
    float: right;
    font-size: 11px;
    color: #fff !important;
    text-decoration: none;
    text-shadow: none;
    opacity: 0.7;
}

.popout-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ---------- Header / Marquee ---------- */

.header-banner {
    background: linear-gradient(135deg, #000080 0%, #1a0040 50%, #000080 100%);
    color: #ffff00;
    font-size: 24px;
    border: 4px outset #888;
    padding: 10px 14px;
    margin-bottom: 20px;
    text-shadow: 0 0 8px #ffff00, 0 0 20px #ff00ff;
    position: relative;
    z-index: 1;
}

.header-banner marquee b {
    letter-spacing: 1px;
}

/* ---------- Layout ---------- */

.container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.page-shell {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
}

body.low-perf *, body.low-perf .window::before, body.low-perf hr {
    animation: none !important;
}

.col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.left-col {
    max-width: 280px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.right-col {
    max-width: 320px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* ---------- Window Chrome (Win95 style) ---------- */

.window {
    background-color: rgba(0, 0, 0, 0.88);
    border: 3px outset #777;
    padding: 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, .6);
    position: relative;
}

.window::before {
    content: '';
    position: absolute;
    inset: -3px;
    box-shadow: 0 0 22px rgba(255, 0, 255, .45);
    opacity: 0.55;
    animation: window-glow-pulse-opacity 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.window::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px inset rgba(255, 255, 255, .08);
    pointer-events: none;
}

.window-title {
    background: linear-gradient(90deg, #000080, #0000cd, #000080);
    color: #fff;
    padding: 6px 12px;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #444;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .7);
    display: flex;
    align-items: center;
    gap: 6px;
}

.window-title::before {
    content: 'Γûá';
    font-size: 10px;
    color: #c0c0c0;
}

.window-content {
    padding: 15px;
}

.center-content {
    text-align: center;
}

/* ---------- Profile & Blog ---------- */

.profile-pic {
    width: 150px;
    border: 3px solid #ff00ff;
    border-radius: 5px;
    animation: hue-rotate-border 4s linear infinite;
}

.blog-post {
    text-align: left;
    background: linear-gradient(180deg, #1a1a2e 0%, #111 100%);
    padding: 12px;
    margin-bottom: 10px;
    border: 1px inset #555;
    border-left: 3px solid #ff00ff;
    transition: border-left-color .3s;
}

.blog-post:hover {
    border-left-color: #00ffff;
}

.blog-title-graphic {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border: 2px solid #555;
    margin-bottom: 10px;
    display: block;
}

.featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 2px solid #555;
    margin: 15px 0;
    background: #000;
}

/* ---------- Comments ---------- */
.comments-section {
    margin-top: 20px;
    padding: 10px;
    background: #000;
    border: 1px dashed #444;
}

.comments-section h4 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px dotted #ffd700;
    padding-bottom: 5px;
}

.comment-item {
    margin-bottom: 15px;
    padding: 10px;
    background: #0a0a0a;
    border-left: 3px solid #00ff00;
    font-size: 14px;
}

.comment-author {
    color: #ff00ff;
    font-weight: bold;
}

.comment-form-box {
    margin-top: 20px;
    padding: 15px;
    background: #111;
    border: 2px outset #555;
}

.comment-form-box h5 {
    color: #ff00ff;
    margin-top: 0;
    margin-bottom: 10px;
}

/* ---------- Rainbow HR ---------- */

hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000);
    background-size: 200% 100%;
    animation: rainbow-hr 3s linear infinite;
    margin: 12px 0;
}

/* ---------- Chat & Guestbook ---------- */

.chat-window {
    height: 380px;
    display: flex;
    flex-direction: column;
}

.chat-window .window-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#chat-login {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

#chat-login input {
    padding: 6px 8px;
    background: #0a0a14;
    color: #00ff00;
    border: 2px inset #555;
    font-family: inherit;
    font-size: 13px;
}

#chat-login input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, .4);
}

#chat-messages {
    list-style-type: none;
    margin: 0;
    padding: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    background-color: #0a0a14;
    border: 2px inset #555;
    margin-bottom: 10px;
    font-size: 13px;
}

#chat-messages li {
    padding: 5px 0;
    border-bottom: 1px dotted #222;
}

#chat-messages li span.user {
    color: #ff00ff;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 0, 255, .5);
}

.chat-msg-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-msg-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #444;
}

.clickable-user {
    cursor: pointer;
}

.clickable-user:hover {
    text-decoration: underline;
    filter: brightness(1.3);
}

.mention {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 255, 255, .5);
}

.mention-highlight {
    background: rgba(0, 255, 255, 0.08);
    border-left: 2px solid #00ffff;
    padding-left: 6px !important;
}

.chat-msg-timestamp {
    font-size: 10px;
    color: #666;
    margin-right: 5px;
    min-width: 50px;
}

.chat-msg-whisper {
    font-style: italic;
    color: #ffd700 !important;
}

.chat-msg-edited {
    font-size: 9px;
    color: #555;
    margin-left: 5px;
    font-style: italic;
}

.chat-reply-preview {
    font-size: 11px;
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    border-left: 2px solid #444;
    padding: 2px 6px;
    margin-bottom: 2px;
    margin-left: 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.chat-reply-preview:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-msg-actions {
    display: none;
    gap: 4px;
    margin-left: auto;
}

#chat-messages li:hover .chat-msg-actions {
    display: flex;
}

.chat-action-btn {
    background: none !important;
    border: none !important;
    padding: 2px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.chat-action-btn:hover {
    opacity: 1;
    box-shadow: none !important;
}

.chat-like-count {
    font-size: 11px;
    color: #e94560;
    margin-left: 2px;
}

.chat-replying-to-bar {
    display: none;
    background: #16213e;
    padding: 4px 8px;
    border-top: 1px solid #4ecca3;
    font-size: 11px;
    color: #4ecca3;
    align-items: center;
    justify-content: space-between;
}

.chat-replying-to-bar.visible {
    display: flex;
}

.chat-cancel-reply {
    cursor: pointer;
    color: #e94560;
    font-weight: bold;
}

#chat-form {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.typing-indicator {
    display: none;
    background: rgba(20, 20, 35, 0.92);
    border: 1px solid rgba(78, 204, 163, 0.4);
    border-radius: 8px;
    margin: 0 0 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.typing-indicator.visible {
    display: block !important;
}

.typing-indicator-header {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #4ecca3;
    background: rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.typing-indicator-header::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ecca3;
    animation: typing-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes typing-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.typing-indicator-list {
    list-style: none;
    margin: 0;
    padding: 4px 6px;
    max-height: 80px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.typing-indicator-list li {
    font-size: 12px;
    color: #ccc;
    padding: 2px 4px;
    border-radius: 4px;
}

.mention-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #0a0a14;
    border: 2px solid #00ff00;
    border-bottom: none;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.mention-item {
    padding: 6px 10px;
    color: #00ff00;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px dotted #222;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(0, 255, 0, 0.12);
    color: #00ffff;
}

#chat-form input {
    flex-grow: 1;
    padding: 6px 8px;
    background-color: #0a0a14;
    color: #00ff00;
    border: 2px inset #555;
    font-family: inherit;
    text-shadow: 0 0 4px rgba(0, 255, 0, .3);
}

#chat-form input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, .4);
}

/* ---------- Shared Button Style ---------- */

button,
.small-form button,
#chat-form button,
#guestbook-form button {
    background: linear-gradient(180deg, #e0e0e0 0%, #b0b0b0 45%, #a0a0a0 55%, #c0c0c0 100%);
    border: 2px outset #fff;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
    padding: 5px 12px;
    color: #000;
    text-shadow: none;
    transition: box-shadow .15s;
}

button:hover {
    box-shadow: 0 0 8px rgba(0, 255, 255, .5);
}

button:active {
    border-style: inset;
    background: linear-gradient(180deg, #a0a0a0 0%, #c0c0c0 100%);
}

/* ---------- Guestbook ---------- */

#guestbook-form input,
#guestbook-form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 6px 8px;
    background-color: #0a0a14;
    color: #ffff00;
    border: 2px inset #555;
    box-sizing: border-box;
    font-family: inherit;
    text-shadow: 0 0 3px rgba(255, 255, 0, .3);
}

#guestbook-form input:focus,
#guestbook-form textarea:focus {
    outline: none;
    border-color: #ffff00;
    box-shadow: 0 0 6px rgba(255, 255, 0, .3);
}

#guestbook-form textarea {
    height: 60px;
    resize: none;
}

#guestbook-entries {
    margin-top: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.guestbook-entry {
    background: linear-gradient(180deg, #1a1a2e 0%, #111 100%);
    border: 1px solid #333;
    border-left: 3px solid #00ffff;
    padding: 10px;
    margin-bottom: 10px;
    transition: border-left-color .3s;
}

.guestbook-entry:hover {
    border-left-color: #ff00ff;
}

.guestbook-entry .author {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 255, 255, .4);
}

.guestbook-entry .date {
    font-size: 0.8em;
    color: #888;
}

/* ---------- Guestbook Toggle ---------- */

.guestbook-toggle-btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a14 100%);
    border: 2px outset #555;
    color: #00ffff;
    text-shadow: 0 0 6px rgba(0, 255, 255, .4);
    transition: box-shadow .15s, border-color .15s;
}

.guestbook-toggle-btn:hover {
    box-shadow: 0 0 10px rgba(0, 255, 255, .5);
    border-color: #00ffff;
}

.guestbook-toggle-btn:active {
    border-style: inset;
}

.stage-hide-btn {
    display: none; /* hidden until a live stage actually exists */
}

/* ---------- Stage ---------- */

.stage-window .window-content {
    padding: 0;
}

#stage-content {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#stage-content iframe,
#stage-content video {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    min-width: 0;
}

#stage-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#stage-content .stage-text {
    padding: 15px;
    color: #00ff00;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    width: 100%;
}

#stage-content .stage-html {
    padding: 15px;
    width: 100%;
    overflow: auto;
}

#stage-content .stage-markdown {
    padding: 15px;
    width: 100%;
    overflow: auto;
    color: #00ff00;
    font-size: 14px;
    line-height: 1.6;
}

#stage-content .stage-markdown h1,
#stage-content .stage-markdown h2,
#stage-content .stage-markdown h3,
#stage-content .stage-markdown h4,
#stage-content .stage-markdown h5,
#stage-content .stage-markdown h6 {
    color: #ff00ff;
    margin: 0.5em 0;
}

#stage-content .stage-markdown a {
    color: #00ffff;
}

#stage-content .stage-markdown code {
    background: #111;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #ffff00;
}

#stage-content .stage-markdown pre {
    background: #111;
    padding: 10px;
    border: 1px inset #555;
    overflow-x: auto;
}

#stage-content .stage-markdown pre code {
    padding: 0;
    background: none;
}

#stage-content .stage-markdown blockquote {
    border-left: 3px solid #ff00ff;
    margin: 0.5em 0;
    padding: 5px 15px;
    color: #ccc;
}

#stage-content .stage-markdown img {
    max-width: 100%;
    height: auto;
}

#stage-content .stage-markdown ul,
#stage-content .stage-markdown ol {
    padding-left: 25px;
}

#stage-content .stage-markdown hr {
    border: none;
    border-top: 1px solid #555;
    margin: 1em 0;
}

/* ---------- Playlists ---------- */

.playlist-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 10px 0;
    text-align: left;
}

.playlist-list li {
    background-color: #111;
    border: 1px inset #555;
    padding: 6px 8px;
    margin-bottom: 5px;
    cursor: pointer;
    color: #00ffff;
    text-decoration: underline;
    text-shadow: 0 0 6px rgba(0, 255, 255, .35);
    transition: background-color .2s, text-shadow .2s;
}

.playlist-list li:hover {
    background-color: #222;
    text-shadow: 0 0 12px rgba(0, 255, 255, .65);
}

.small-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.small-form input {
    background-color: #0a0a14;
    color: #00ff00;
    border: 2px inset #555;
    padding: 4px 6px;
    font-family: inherit;
    font-size: 12px;
}

.small-form input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, .4);
}

/* ---------- Indie Web Badge Ticker ---------- */

.badge-ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 10px;
}

.badge-ticker {
    flex: 1;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.75);
    border: 2px inset #555;
    padding: 4px 0;
    cursor: default;
    user-select: none;
}

.badge-ticker-track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 0 3px;
}

.badge-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.badge-ticker-track a {
    display: inline-block;
    flex-shrink: 0;
    line-height: 0;
    text-shadow: none;
}

.badge-ticker-track img {
    width: 88px;
    height: 31px;
    display: block;
    border: 1px solid #333;
    image-rendering: pixelated;
    transition: border-color 0.2s;
}

.badge-ticker-track a:hover img {
    border-color: #00ffff;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

.badge-mention-link {
    color: #ffd700;
    font-size: 11px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.35);
}

.badge-mention-link:hover {
    color: #00ffff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.55);
}

.badge-ticker-arrow {
    background: #000080;
    color: #fff;
    border: 2px outset #888;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Comic Sans MS', cursive, 'Courier New', monospace;
    text-shadow: none;
    transition: background 0.15s;
}

.badge-ticker-arrow:hover {
    background: #0000cd;
    border-style: inset;
}

.badge-ticker-arrow.active {
    background: #0000cd;
    border-style: inset;
    box-shadow: 0 0 6px rgba(0, 100, 255, 0.6);
}

/* ---------- Footer / Status Bar ---------- */

.status-bar {
    position: relative;
    clear: both;
    width: 100%;
    z-index: 1;
    margin-top: 20px;
    background: linear-gradient(180deg, #c0c0c0, #a0a0a0);
    border: 2px outset #ddd;
    padding: 4px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #000;
    text-shadow: none;
    font-family: 'Courier New', monospace;
}

.status-bar span {
    border: 1px inset #999;
    padding: 2px 8px;
    background: #d4d4d4;
}

.status-bar .visitor-count {
    color: #800000;
    font-weight: bold;
}

/* ---------- Webring ---------- */

.webring {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #c0c0c0;
    text-shadow: none;
}

.webring a {
    color: #ffff00;
    text-decoration: none;
    text-shadow: 0 0 4px rgba(255, 255, 0, .4);
    cursor: pointer;
}

.webring a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 0, .7);
}

/* ---------- Custom Scrollbars ---------- */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #111;
    border: 1px inset #333;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00cc00, #009900);
    border: 1px outset #00ff00;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ff00, #00cc00);
}

/* ---------- Selection ---------- */

::selection {
    background: #ff00ff;
    color: #000;
}

/* ---------- Blog Excerpts (Homepage) ---------- */

.new-post-link {
    font-size: 12px;
    color: #ffff00 !important;
    text-decoration: none;
    text-shadow: 0 0 4px rgba(255, 255, 0, .4);
    margin-left: 8px;
}

.new-post-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 255, 0, .7);
}

.blog-excerpt-title {
    margin: 4px 0 6px;
}

.blog-excerpt-title a {
    color: #ff00ff;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255, 0, 255, .4);
}

.blog-excerpt-title a:hover {
    text-decoration: underline;
    text-shadow: 0 0 12px rgba(255, 0, 255, .7);
}

.blog-excerpt-text {
    font-size: 12px;
    color: #aaa;
    margin: 4px 0 6px;
    line-height: 1.4;
}

.blog-thumb {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border: 1px solid #555;
    margin: 4px 0;
}

.read-more-link {
    font-size: 12px;
    color: #00ffff !important;
    text-decoration: none;
    text-shadow: 0 0 4px rgba(0, 255, 255, .4);
}

.read-more-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(0, 255, 255, .7);
}

/* ---------- Blog Carousel ---------- */

.blog-carousel-window {
    width: 100%;
}

.blog-carousel-content {
    padding: 12px 15px 10px;
    text-align: left;
}

#blog-carousel-slide {
    display: grid;
    /* grid-template-columns is set dynamically by JS to exactly visibleCount columns */
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
    overflow: hidden; /* prevent any card from accidentally wrapping */
    align-items: start; /* don't stretch short cards to match tall neighbours */
}

/* Cap image height inside carousel cards so one tall image can't inflate the row */
#blog-carousel-slide .blog-title-graphic {
    max-height: 120px;
}

#blog-carousel-slide .blog-post {
    margin-bottom: 0;
}

.blog-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

.blog-nav-btn {
    background: linear-gradient(180deg, #0a0a3e, #000);
    border: 2px outset #777;
    color: #00ffff;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 14px;
    transition: color 0.2s, border-color 0.2s;
}

.blog-nav-btn:hover:not(:disabled) {
    color: #ff00ff;
    border-color: #ff00ff;
}

.blog-nav-btn:disabled {
    color: #444;
    border-color: #444;
    cursor: default;
}

.blog-carousel-counter {
    font-size: 12px;
    color: #aaa;
}

/* ---------- Post Page (Full Article) ---------- */

.post-page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
}

.post-window {
    margin-bottom: 20px;
}

.post-meta {
    margin-bottom: 12px;
    font-size: 13px;
}

.post-date {
    color: #ffff00;
    text-shadow: 0 0 4px rgba(255, 255, 0, .3);
}

.post-updated {
    color: #888;
    font-size: 11px;
}

.post-featured-image {
    margin-bottom: 15px;
}

.featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border: 2px outset #555;
}

.post-body {
    line-height: 1.7;
    font-size: 14px;
    color: #ddd;
    text-shadow: none;
}

.post-body h1,
.post-body h2,
.post-body h3 {
    color: #00ff00;
    text-shadow: 0 0 4px rgba(0, 255, 0, .3);
    margin-top: 20px;
}

.post-body img {
    max-width: 100%;
    border: 2px outset #555;
    margin: 10px 0;
}

.post-body a {
    color: #00ffff;
    text-shadow: 0 0 4px rgba(0, 255, 255, .3);
}

.post-body pre {
    background: #000;
    border: 2px inset #555;
    padding: 12px;
    overflow-x: auto;
    border-left: 3px solid #00ff00;
    margin: 15px 0;
}

.post-body code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #00ff00;
    text-shadow: 0 0 4px rgba(0, 255, 0, .4);
}

.post-body p code {
    background: #111;
    padding: 2px 5px;
    border: 1px dotted #555;
}

.back-link {
    color: #ffff00 !important;
    text-decoration: none;
    text-shadow: 0 0 4px rgba(255, 255, 0, .3);
    font-size: 13px;
}

.back-link:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(255, 255, 0, .6);
}

/* ---------- Compose Editor ---------- */

.compose-window {
    margin-bottom: 20px;
}

.compose-label {
    display: block;
    color: #00ffff;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    margin-top: 10px;
    text-shadow: 0 0 4px rgba(0, 255, 255, .3);
}

.compose-input {
    width: 100%;
    padding: 6px 8px;
    background-color: #0a0a14;
    color: #00ff00;
    border: 2px inset #555;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

.compose-input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, .4);
}

.compose-image-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.compose-image-row .compose-input {
    flex: 1;
}

.upload-btn {
    background: linear-gradient(180deg, #e0e0e0 0%, #b0b0b0 45%, #a0a0a0 55%, #c0c0c0 100%);
    border: 2px outset #fff;
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px;
    color: #000;
    text-shadow: none;
    font-size: 12px;
    font-family: inherit;
    white-space: nowrap;
}

.upload-btn:hover {
    box-shadow: 0 0 8px rgba(0, 255, 255, .5);
}

.compose-content-area {
    margin-bottom: 20px;
}

/* ---------- Media Modal ---------- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-window {
    background: #0a0a14;
    border: 3px solid #555;
    border-top-color: #aaa;
    border-left-color: #aaa;
    width: 90%;
    max-width: 500px;
    box-shadow: 4px 4px 0 #000;
}

.modal-header {
    background: darkblue;
    color: white;
    padding: 2px 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: silver;
    color: black;
    border: 1px solid #000;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
}

.modal-content {
    padding: 15px;
}

.media-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
}

.media-tab {
    background: #222;
    color: #888;
    border: 2px inset #555;
    padding: 5px 10px;
    cursor: pointer;
}

.media-tab.active {
    background: #0a0a14;
    color: #00ff00;
    border: 2px outset #555;
    border-bottom: 2px solid #0a0a14;
    margin-bottom: -7px;
}

.media-panel {
    text-align: center;
    margin-bottom: 15px;
}

.preview-box {
    border: 2px inset #555;
    background: #000;
    margin-bottom: 15px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-box canvas {
    max-width: 100%;
    max-height: 250px;
    display: block;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.filter-btn {
    padding: 5px;
    font-size: 12px;
}

.filter-btn.active {
    border: 2px inset #555;
    color: #00ffff;
    background: #111;
}

.compose-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    border-top: 1px dotted #555;
    padding-top: 20px;
}

.publish-btn {
    background-color: #004400;
    color: #00ff00;
    font-size: 18px;
    padding: 10px 20px;
    font-weight: bold;
}

.publish-btn:hover {
    background-color: #006600;
    box-shadow: 0 0 10px #00ff00;
}

.delete-btn {
    background-color: #440000;
    color: #ff4444;
}

.delete-btn:hover {
    background-color: #660000;
    box-shadow: 0 0 10px #ff0000;
}

.compose-status {
    margin-top: 15px;
    font-size: 14px;
    color: #ffff00;
    min-height: 20px;
}

/* ---------- Microphone Tooltip ---------- */
.mic-tooltip {
    position: absolute;
    bottom: 120%;
    right: 40px;
    background: #ffffcc;
    color: #000;
    border: 2px outset #555;
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
    z-index: 1000;
    white-space: nowrap;
    display: none;
    box-shadow: 2px 2px 0px #000;
}

.mic-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }

    .left-col,
    .right-col {
        max-width: 100%;
        position: static;
        top: auto;
    }

    .post-page-wrapper {
        max-width: 100%;
    }
}

/* Desktop Gallery Styles for games.html */
body.desktop-mode {
    background: #008080; /* Classic Windows 95 Desktop color */
    background-image: none; /* Override starfield */
    padding: 20px;
    height: 100vh;
    overflow: hidden;
    position: relative;
    font-family: 'Tahoma', sans-serif;
}

.desktop-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 30px 40px;
    height: calc(100vh - 80px); /* Leave room for status bar */
    padding: 10px;
}

.desktop-icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    padding: 5px;
    border: 1px dotted transparent;
}

.desktop-icon:hover, .desktop-icon:focus {
    background: rgba(0, 0, 128, 0.5); /* Classic highlight */
    border: 1px dotted white;
    outline: none;
}

.desktop-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 5px;
    image-rendering: pixelated;
    border: 2px outset #ccc; /* Retro border for icons */
    background: #c0c0c0;
}

.desktop-icon span {
    font-size: 11px;
    background: #000080;
    color: white;
    padding: 1px 4px;
    line-height: 1.2;
    text-shadow: 1px 1px 0 #000;
}

.desktop-icon:hover span {
    background: #0000ff;
}

/* Game split view styling for game.html */
.game-split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

.game-frame-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #111;
    position: relative;
}

.game-header {
    background: #16213e;
    color: #4ecca3;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: bold;
    border-bottom: 2px solid #0f3460;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header a {
    color: #5fcaff;
    text-decoration: none;
    font-size: 12px;
}

.game-header a:hover {
    color: white;
}

.game-frame-wrapper iframe {
    flex: 1;
    width: 100%;
    border: none;
}

.game-chat-wrapper {
    width: 350px;
    min-width: 300px;
    border-left: 3px ridge #aaa;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
}

.game-chat-wrapper iframe {
    flex: 1;
    width: 100%;
    border: none;
}

/* ---------- Existing Media Grid ---------- */
.existing-media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.media-item-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.existing-media-grid img,
.existing-media-grid video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #444;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
    background: #000;
}

.existing-media-grid img:hover,
.existing-media-grid video:hover {
    border-color: #ff00ff;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.6);
}

.delete-media-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: 1px outset #fff;
    cursor: pointer;
    font-size: 10px;
    padding: 2px 4px;
    display: none;
    z-index: 10;
}

.media-item-container:hover .delete-media-btn {
    display: block;
}

.delete-media-btn:hover {
    background: red;
    box-shadow: 0 0 5px red;
}

/* ---------- Featured Image (Title Graphic) ---------- */
.featured-img {
    max-width: 100%;
    height: auto;
    border: 2px solid #555;
    margin-bottom: 15px;
    display: block;
}

/* ---------- Self-hosted Video in Posts ---------- */
.post-body video,
.window-content video {
    max-width: 100%;
    border: 2px solid #555;
    background: #000;
    display: block;
    margin: 10px 0;
}

/* ---------- Prompts / Key Takeaways Content ---------- */
#prompts-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid #555;
    margin: 8px 0;
}

/* ========== Canvas Studio Panel ========== */
.canvas-toggle-btn {
    font-size: 18px;
    cursor: pointer;
    background: none !important;
    border: none !important;
    padding: 0 5px;
    color: #ffff00;
    transition: text-shadow 0.2s;
    box-shadow: none !important;
}
.canvas-toggle-btn:hover { text-shadow: 0 0 8px rgba(255,255,0,.8); box-shadow: none !important; }
.canvas-toggle-btn.active { color: #00ffff; text-shadow: 0 0 10px rgba(0,255,255,.8); }

.canvas-panel {
    display: none;
    position: fixed;
    bottom: 60px;
    right: 10px;
    width: 520px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 80px);
    background: rgba(10, 10, 20, 0.97);
    border: 2px solid #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 200;
    flex-direction: column;
    overflow: hidden;
    font-size: 12px;
}
.canvas-panel.open { display: flex; }

.canvas-panel-header {
    background: linear-gradient(135deg, #1a0040 0%, #000080 50%, #1a0040 100%);
    color: #ff00ff;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 2px solid #555;
    cursor: default;
}
.canvas-panel-header .close-btn {
    cursor: pointer;
    color: #ff4444;
    font-size: 16px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}
.canvas-panel-header .close-btn:hover { color: #ff8888; box-shadow: none !important; }

.canvas-tabs {
    display: flex;
    background: #111;
    border-bottom: 1px solid #333;
}
.canvas-tab {
    flex: 1;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    background: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    font-size: 12px;
    font-family: inherit;
    box-shadow: none !important;
}
.canvas-tab:hover { color: #ccc; box-shadow: none !important; }
.canvas-tab.active { color: #00ffff; border-bottom-color: #00ffff; }

.canvas-tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.canvas-tab-content.active { display: flex; }

.canvas-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #0a0a14;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    align-items: center;
}
.canvas-toolbar label { color: #aaa; font-size: 10px; }
.canvas-toolbar input[type="color"] {
    width: 28px; height: 24px; border: 1px solid #555; background: #000; cursor: pointer; padding: 0;
}
.canvas-toolbar input[type="range"] { width: 60px; cursor: pointer; }
.canvas-toolbar button, .canvas-toolbar select {
    padding: 3px 8px;
    background: #1a1a2e !important;
    color: #00ff00;
    border: 1px solid #555 !important;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.canvas-toolbar button:hover { background: #2a2a4e !important; border-color: #00ff00 !important; box-shadow: none !important; }
.canvas-toolbar button.active-tool { background: #003300 !important; border-color: #00ff00 !important; box-shadow: 0 0 5px rgba(0,255,0,.4) !important; }

.canvas-draw-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    overflow: hidden;
    min-height: 280px;
    position: relative;
}
#draw-canvas {
    background: #fff;
    cursor: crosshair;
    image-rendering: auto;
    max-width: 100%;
    max-height: 100%;
}

.canvas-actions {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #0a0a14;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}
.canvas-actions button {
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #555;
    font-family: inherit;
}
.btn-share-canvas {
    background: #ff00ff !important;
    color: #fff !important;
    border-color: #ff00ff !important;
    font-weight: bold;
}
.btn-share-canvas:hover { box-shadow: 0 0 10px rgba(255,0,255,.5) !important; }

.canvas-import-row {
    display: flex;
    gap: 4px;
    padding: 4px 6px;
    background: #0d0d1a;
    border-bottom: 1px solid #222;
    align-items: center;
}
.canvas-import-row button {
    padding: 3px 8px;
    background: #1a1a2e !important;
    color: #ffff00;
    border: 1px solid #555 !important;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.canvas-import-row button:hover { background: #2a2a4e !important; border-color: #ffff00 !important; box-shadow: none !important; }

.canvas-effects-row {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    background: #0d0d1a;
    border-bottom: 1px solid #222;
    align-items: center;
    flex-wrap: wrap;
}
.canvas-effects-row button {
    padding: 2px 6px;
    background: #1a1a2e !important;
    color: #ff00ff;
    border: 1px solid #444 !important;
    cursor: pointer;
    font-size: 10px;
    font-family: inherit;
}
.canvas-effects-row button:hover { background: #2a2a4e !important; border-color: #ff00ff !important; box-shadow: none !important; }
.canvas-effects-row .sticker-btn {
    font-size: 16px;
    padding: 1px 4px;
    cursor: pointer;
    background: none !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
}
.canvas-effects-row .sticker-btn:hover { border-color: #ffff00 !important; background: rgba(255,255,0,.1) !important; }
.canvas-effects-row .sticker-btn.selected { border-color: #00ffff !important; background: rgba(0,255,255,.15) !important; }

.webcam-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.webcam-overlay.open { display: flex; }
.webcam-overlay video {
    max-width: 90%;
    max-height: 200px;
    border: 2px solid #00ff00;
}
.webcam-overlay button {
    padding: 6px 16px;
    background: #00ff00 !important;
    color: #000;
    border: none !important;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
}

.gallery-user-tabs {
    display: flex;
    gap: 2px;
    padding: 4px 6px;
    background: #111;
    overflow-x: auto;
    border-bottom: 1px solid #333;
}
.gallery-user-tab {
    padding: 4px 10px;
    background: #1a1a2e !important;
    color: #aaa;
    border: 1px solid #333 !important;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    font-family: inherit;
}
.gallery-user-tab:hover { color: #fff; border-color: #ff00ff !important; box-shadow: none !important; }
.gallery-user-tab.active { color: #ff00ff; border-color: #ff00ff !important; background: #2a0040 !important; }

.gallery-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: auto;
}
.gallery-view img {
    max-width: 100%;
    max-height: 300px;
    border: 2px solid #555;
    image-rendering: auto;
}
.gallery-view .gallery-empty {
    color: #555;
    font-style: italic;
}
.gallery-view .gallery-actions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
}
.gallery-view .gallery-actions button {
    padding: 4px 12px;
    background: #1a1a2e !important;
    color: #00ffff;
    border: 1px solid #00ffff !important;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.gallery-view .gallery-actions button:hover { background: #002a2a !important; box-shadow: none !important; }

.canvas-share-link {
    color: #ff00ff !important;
    cursor: pointer;
    text-decoration: underline;
}
.canvas-share-link:hover { color: #ffaaff !important; }

.canvas-share-message {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.canvas-share-preview {
    width: min(100%, 220px);
    padding: 6px;
    border: 1px solid #444;
    background: rgba(15, 15, 25, 0.92);
    font-style: normal;
}

.canvas-share-preview img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border: 1px solid #555;
    background: #000;
    cursor: pointer;
}

.canvas-share-preview-placeholder {
    color: #777;
    font-size: 11px;
    line-height: 1.4;
}

.canvas-share-preview-meta {
    color: #888;
    font-size: 10px;
    margin-top: 4px;
}

.canvas-share-preview button {
    margin-top: 6px;
    padding: 4px 8px;
    background: #1a1a2e !important;
    color: #00ffff;
    border: 1px solid #00ffff !important;
    cursor: pointer;
    font-size: 10px;
    font-family: inherit;
}

.canvas-share-preview button:hover {
    background: #002a2a !important;
    box-shadow: none !important;
}

/* ---------- Leaderboard Ticker ---------- */
.leaderboard-ticker-wrapper {
    background: #000;
    border: 2px inset #555;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 10px;
    padding: 4px 0;
    position: relative;
    flex-shrink: 0;
    min-height: 28px;
    box-shadow: 0 0 5px rgba(0,255,255,0.2) inset;
}

.leaderboard-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 25s linear infinite;
}

.leaderboard-ticker-wrapper:hover .leaderboard-ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.leaderboard-item {
    display: inline-flex;
    align-items: center;
    margin-right: 30px;
    font-size: 13px;
    font-weight: bold;
    color: #ff00ff;
    cursor: pointer;
    transition: color 0.2s, text-shadow 0.2s;
}

.leaderboard-item:hover {
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
    text-decoration: underline;
}

.leaderboard-item img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid #555;
    object-fit: cover;
}

.leaderboard-item .points {
    color: #ffff00;
    margin-left: 6px;
    font-family: 'Courier New', monospace;
}

/* =============================================
   Canvas Studio Panel
   ============================================= */

.canvas-panel {
    display: none;
    position: fixed;
    bottom: 60px;
    right: 10px;
    width: 520px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 80px);
    background: rgba(10, 10, 20, 0.97);
    border: 2px solid #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3), inset 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 200;
    flex-direction: column;
    overflow: hidden;
    font-size: 12px;
}
.canvas-panel.open { display: flex; }

.canvas-panel-header {
    background: linear-gradient(135deg, #1a0040 0%, #000080 50%, #1a0040 100%);
    color: #ff00ff;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 2px solid #555;
    cursor: default;
}
.canvas-panel-header .close-btn {
    cursor: pointer;
    color: #ff4444;
    font-size: 16px;
    background: none;
    border: none;
}
.canvas-panel-header .close-btn:hover { color: #ff8888; }

.canvas-tabs {
    display: flex;
    background: #111;
    border-bottom: 1px solid #333;
}
.canvas-tab {
    flex: 1;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 12px;
    font-family: inherit;
}
.canvas-tab:hover { color: #ccc; }
.canvas-tab.active { color: #00ffff; border-bottom-color: #00ffff; }

.canvas-tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.canvas-tab-content.active { display: flex; }

.canvas-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #0a0a14;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    align-items: center;
}
.canvas-toolbar label { color: #aaa; font-size: 10px; }
.canvas-toolbar input[type="color"] {
    width: 28px; height: 24px; border: 1px solid #555; background: #000; cursor: pointer; padding: 0;
}
.canvas-toolbar input[type="range"] { width: 60px; cursor: pointer; }
.canvas-toolbar button, .canvas-toolbar select {
    padding: 3px 8px;
    background: #1a1a2e;
    color: #00ff00;
    border: 1px solid #555;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.canvas-toolbar button:hover { background: #2a2a4e; border-color: #00ff00; }
.canvas-toolbar button.active-tool { background: #003300; border-color: #00ff00; box-shadow: 0 0 5px rgba(0,255,0,.4); }

.canvas-draw-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    overflow: hidden;
    min-height: 280px;
    position: relative;
}
#draw-canvas {
    background: #fff;
    cursor: crosshair;
    image-rendering: auto;
    max-width: 100%;
    max-height: 100%;
}

.canvas-actions {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #0a0a14;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}
.canvas-actions button {
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #555;
    font-family: inherit;
}
.btn-share-canvas {
    background: #ff00ff !important;
    color: #fff !important;
    border-color: #ff00ff !important;
    font-weight: bold;
}
.btn-share-canvas:hover { box-shadow: 0 0 10px rgba(255,0,255,.5); }

.canvas-import-row {
    display: flex;
    gap: 4px;
    padding: 4px 6px;
    background: #0d0d1a;
    border-bottom: 1px solid #222;
    align-items: center;
}
.canvas-import-row button {
    padding: 3px 8px;
    background: #1a1a2e;
    color: #ffff00;
    border: 1px solid #555;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.canvas-import-row button:hover { background: #2a2a4e; border-color: #ffff00; }

.canvas-effects-row {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    background: #0d0d1a;
    border-bottom: 1px solid #222;
    align-items: center;
    flex-wrap: wrap;
}
.canvas-effects-row button {
    padding: 2px 6px;
    background: #1a1a2e;
    color: #ff00ff;
    border: 1px solid #444;
    cursor: pointer;
    font-size: 10px;
    font-family: inherit;
}
.canvas-effects-row button:hover { background: #2a2a4e; border-color: #ff00ff; }
.canvas-effects-row .sticker-btn {
    font-size: 16px;
    padding: 1px 4px;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
}
.canvas-effects-row .sticker-btn:hover { border-color: #ffff00; background: rgba(255,255,0,.1); }
.canvas-effects-row .sticker-btn.selected { border-color: #00ffff; background: rgba(0,255,255,.15); }

.webcam-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.webcam-overlay.open { display: flex; }
.webcam-overlay video { max-width: 90%; max-height: 200px; border: 2px solid #00ff00; }
.webcam-overlay button { padding: 6px 16px; background: #00ff00; color: #000; border: none; font-weight: bold; cursor: pointer; font-size: 12px; }

.gallery-user-tabs {
    display: flex;
    gap: 2px;
    padding: 4px 6px;
    background: #111;
    overflow-x: auto;
    border-bottom: 1px solid #333;
}
.gallery-user-tab {
    padding: 4px 10px;
    background: #1a1a2e;
    color: #aaa;
    border: 1px solid #333;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    font-family: inherit;
}
.gallery-user-tab:hover { color: #fff; border-color: #ff00ff; }
.gallery-user-tab.active { color: #ff00ff; border-color: #ff00ff; background: #2a0040; }

.gallery-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: auto;
}
.gallery-view img { max-width: 100%; max-height: 300px; border: 2px solid #555; image-rendering: auto; }
.gallery-view .gallery-empty { color: #555; font-style: italic; }
.gallery-view .gallery-actions { margin-top: 8px; display: flex; gap: 6px; }
.gallery-view .gallery-actions button {
    padding: 4px 12px;
    background: #1a1a2e;
    color: #00ffff;
    border: 1px solid #00ffff;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}
.gallery-view .gallery-actions button:hover { background: #002a2a; }

.canvas-share-link { color: #ff00ff; cursor: pointer; text-decoration: underline; }
.canvas-share-link:hover { color: #ffaaff; }

.canvas-share-preview {
    margin-top: 6px;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.35);
    max-width: 220px;
}
.canvas-share-preview img { width: 100%; border-radius: 6px; display: block; cursor: pointer; }
.canvas-share-preview-meta { margin-top: 4px; color: #9aa; font-size: 10px; }
.canvas-share-preview button {
    margin-top: 6px;
    background: #0f3460;
    color: #4ecca3;
    border: 1px solid #4ecca3;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}
.canvas-share-preview-placeholder { color: #888; font-size: 11px; }

.canvas-toggle-btn {
    font-size: 18px;
    cursor: pointer;
    background: none !important;
    border: none !important;
    padding: 0 5px;
    color: #fff0ff;
    transition: text-shadow 0.2s;
    box-shadow: none !important;
}
.canvas-toggle-btn:hover { text-shadow: 0 0 8px rgba(255,0,255,0.8); box-shadow: none !important; }
.canvas-toggle-btn.active { color: #00ffff; text-shadow: 0 0 10px rgba(0,255,255,0.8); }
