/*
    ALIASWEB THEME ENGINE — iPhone 4 era meets early 2000s web
*/
:root {
    --bg-color: #16161d;
    --container-bg: #1e1e2a;
    --container-bg2: #252535;
    --text-primary: #d4d4e0;
    --text-secondary: #8080a0;
    --accent-color: #3399ff;
    --accent-glow: rgba(51, 153, 255, 0.4);
    --border-style: 1px solid #333348;
    --border-chrome: 1px solid #4a4a65;
    --font-main: "Lucida Grande", "Trebuchet MS", "Tahoma", Verdana, Arial, sans-serif;
    --font-mono: "Courier New", Courier, monospace;
    --radius: 6px;
    --gloss-highlight: linear-gradient(to bottom, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.05) 100%);
    --panel-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    --btn-gloss: linear-gradient(to bottom, #4488cc 0%, #2266aa 50%, #1a5599 51%, #1950a0 100%);
    --btn-gloss-green: linear-gradient(to bottom, #44aa55 0%, #2d8844 50%, #257740 51%, #227040 100%);
    --btn-gloss-red: linear-gradient(to bottom, #cc4444 0%, #aa2222 50%, #991a1a 51%, #991919 100%);
    --btn-gloss-orange: linear-gradient(to bottom, #dd8833 0%, #bb6622 50%, #aa5518 51%, #aa5218 100%);
    --btn-gloss-purple: linear-gradient(to bottom, #8855cc 0%, #6633aa 50%, #552899 51%, #552599 100%);
}

body {
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.5' fill='%23ffffff08'/%3E%3C/svg%3E");
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    line-height: 1.45;
    overflow-x: hidden;
    word-break: break-word;
}

*, *::before, *::after {
    box-sizing: border-box;
}

::selection {
    background: var(--accent-color);
    color: #fff;
}

.alias-wrapper {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    overflow-x: hidden;
    margin: 0 auto;
}

/* ========== HEADER ========== */
#app {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    overflow-x: hidden;
}

.header {
    grid-column: 1 / -1;
    background: linear-gradient(to bottom, #2a2a3e 0%, #1e1e2e 100%);
    border: 1px solid #3a3a55;
    border-radius: var(--radius);
    padding: 12px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}

.header > div:last-child {
    position: absolute;
    right: 18px;
}

.header h1 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* ========== PANELS ========== */
.panel {
    background: var(--container-bg);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--panel-shadow);
    background-image: var(--gloss-highlight);
}

.panel-title {
    background: var(--btn-gloss);
    color: #fff;
    padding: 6px 12px;
    margin: -16px -16px 14px -16px;
    font-weight: bold;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    text-align: center;
}

/* ========== PROFILE PIC ========== */
.profile-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
}

.profile-layout .header {
    grid-column: 1 / -1;
}

.profile-col-left {
    min-width: 0;
}

.profile-col-right {
    min-width: 0;
}

.profile-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.profile-panels-grid > .panel {
    margin-top: 0 !important;
}

.profile-side-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px dashed #3a3a55;
}

.profile-pic {
    width: 160px;
    height: 160px;
    background: #111118;
    border: 2px solid #444466;
    border-radius: var(--radius);
    margin-bottom: 14px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.05);
}

.profile-pic img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.alias-name {
    font-size: 1.35em;
    font-weight: bold;
    margin-bottom: 3px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.alias-handle {
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 0.88em;
    text-shadow: 0 0 8px var(--accent-glow);
}

.status-update {
    border-bottom: var(--border-style);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.status-date {
    color: var(--accent-color);
    font-size: 0.82em;
    margin-bottom: 4px;
    text-shadow: 0 0 6px var(--accent-glow);
}

/* ========== DM MESSAGES — iOS 4 bubbles ========== */
#dm-messages {
    background: #111118;
    border: 1px solid #333348;
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.dm-msg {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 12px;
    max-width: 70%;
    font-size: 0.9em;
    line-height: 1.4;
    word-wrap: break-word;
}

.dm-msg.me {
    color: #fff;
    margin-left: auto;
    background: var(--btn-gloss);
    border: 1px solid rgba(0,0,0,0.3);
    border-bottom-right-radius: 4px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dm-msg.them {
    background: var(--container-bg2);
    color: var(--text-primary);
    border: 1px solid #3a3a50;
    border-bottom-left-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* ========== DM THREAD BUTTONS ========== */
.dm-thread-btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    text-align: left;
    background: var(--btn-gloss);
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius);
    color: #fff;
    padding: 10px 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9em;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: filter 0.1s;
}

.dm-thread-btn:hover {
    filter: brightness(1.15);
}

.dm-thread-btn:active {
    filter: brightness(0.9);
}

/* ========== DELETE POST ========== */
.delete-post-btn {
    background: none;
    border: none;
    color: #666680;
    cursor: pointer;
    font-size: 0.8em;
    float: right;
}

.delete-post-btn:hover {
    color: #ff4444;
    text-shadow: 0 0 6px rgba(255,68,68,0.5);
}

/* ========== SETTINGS GEAR ========== */
.settings-gear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-left: 5px;
}

.settings-gear:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-glow);
}

/* ========== USER LIST ========== */
#user-list a {
    display: block;
    padding: 4px 0;
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

#user-list a:hover {
    text-shadow: 0 0 8px var(--accent-glow);
}

/* ========== ADMIN BADGE ========== */
.admin-badge {
    background: var(--btn-gloss-red);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
    border: 1px solid rgba(0,0,0,0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ========== NOTIFICATION BADGE ========== */
.notif-badge {
    background: var(--btn-gloss-red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 4px;
    border: 1px solid rgba(0,0,0,0.3);
}

/* ========== UNREAD DM BADGE ========== */
.unread-badge {
    background: var(--btn-gloss-red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 4px;
    border: 1px solid rgba(0,0,0,0.3);
}

/* ========== EMBED CONTAINER ========== */
.embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 8px;
    border-radius: var(--radius);
    border: 1px solid #333348;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.admin-tools .panel-title {
    background: var(--btn-gloss-red);
}

/* ========== GLITTER BORDER ========== */
.glitter-border {
    animation: glitter 1.5s ease-in-out infinite;
    border-color: #ffcc00 !important;
}

@keyframes glitter {
    0% { border-color: #ffcc00; box-shadow: 0 0 8px rgba(255,204,0,0.5), 0 0 16px rgba(255,105,180,0.3), 0 0 24px rgba(0,191,255,0.3); }
    33% { border-color: #ff69b4; box-shadow: 0 0 10px rgba(255,105,180,0.6), 0 0 20px rgba(0,191,255,0.4), 0 0 30px rgba(255,204,0,0.3); }
    66% { border-color: #00bfff; box-shadow: 0 0 8px rgba(0,191,255,0.5), 0 0 18px rgba(255,204,0,0.4), 0 0 26px rgba(255,105,180,0.3); }
    100% { border-color: #ffcc00; box-shadow: 0 0 8px rgba(255,204,0,0.5), 0 0 16px rgba(255,105,180,0.3), 0 0 24px rgba(0,191,255,0.3); }
}

/* ========== ONLINE INDICATOR ========== */
.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #66ff88, #22cc44);
    margin-left: 6px;
    animation: pulse-green 2s ease-in-out infinite;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.3);
}

.online-dot.offline {
    background: #444466;
    animation: none;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px rgba(34, 204, 68, 0.5); }
    50% { box-shadow: 0 0 10px rgba(34, 204, 68, 0.8), 0 0 16px rgba(34, 204, 68, 0.3); }
}

.last-seen {
    color: var(--text-secondary);
    font-size: 0.72em;
}

/* ========== LAST SEEN IN USER LIST ========== */
.user-last-seen {
    color: var(--text-secondary);
    font-size: 0.7em;
    margin-left: 6px;
}

/* ========== ONLINE DOT IN USER LIST ========== */
.user-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #66ff88, #22cc44);
    margin-left: 5px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.3);
}

/* ========== INTEREST ROW ========== */
.interest-row {
    display: flex;
    gap: 6px;
    margin-bottom: 5px;
}

.interest-label {
    color: var(--accent-color);
    font-weight: bold;
    min-width: 70px;
    font-size: 0.88em;
    text-shadow: 0 0 6px var(--accent-glow);
}

/* ========== CURRENTLY ROW ========== */
.currently-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.currently-label {
    color: var(--accent-color);
    font-weight: bold;
    min-width: 85px;
    font-size: 0.88em;
    text-shadow: 0 0 6px var(--accent-glow);
}

/* ========== QUIZ ENTRY ========== */
.quiz-entry {
    border-bottom: var(--border-style);
    padding: 5px 0;
}

.quiz-q {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.88em;
    text-shadow: 0 0 6px var(--accent-glow);
}

.quiz-a {
    color: var(--text-primary);
    margin-left: 4px;
    font-size: 0.88em;
}

/* ========== POST ACTIONS ========== */
.post-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 6px;
}

.post-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 1.1em;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.post-action-btn:hover {
    color: var(--accent-color);
    text-shadow: 0 0 6px var(--accent-glow);
    background: rgba(51, 153, 255, 0.08);
}

.post-action-btn:active {
    transform: scale(0.95);
    background: rgba(51, 153, 255, 0.15);
}

.post-action-btn.liked {
    color: #ff6677;
    text-shadow: 0 0 6px rgba(255,102,119,0.5);
}

.post-action-btn.liked:hover {
    background: rgba(255, 102, 119, 0.1);
}

.post-action-btn .count {
    font-size: 1em;
    font-weight: bold;
}

/* ========== COMMENTS SECTION ========== */
.comments-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: var(--border-style);
}

.comment-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    padding: 6px 0;
    font-size: 0.9em;
}

.comment-entry > .comment-actions {
    width: 100%;
    flex-basis: 100%;
}

.comment-author {
    color: var(--accent-color);
    font-weight: bold;
    cursor: pointer;
}

.comment-author:hover {
    text-decoration: underline;
    text-shadow: 0 0 6px var(--accent-glow);
}

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

.comment-date {
    color: var(--text-secondary);
    font-size: 0.82em;
    margin-left: auto;
    flex-shrink: 0;
}

.comment-delete {
    color: #ff6666;
    cursor: pointer;
    font-size: 0.85em;
    flex-shrink: 0;
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.comment-action-btn {
    cursor: pointer;
    font-size: 0.92em;
    color: var(--text-secondary);
    padding: 2px 4px;
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
}

.comment-action-btn:hover {
    color: var(--accent-color);
    text-shadow: 0 0 6px var(--accent-glow);
}

.comment-action-btn.liked {
    color: #ff6677;
    text-shadow: 0 0 6px rgba(255,102,119,0.5);
}

.comment-input-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.comment-input-row input {
    flex: 1;
    padding: 7px 10px;
    background: #111118;
    border: 1px solid #333348;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.82em;
    box-sizing: border-box;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.comment-input-row input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0 6px var(--accent-glow);
}

.comment-input-row button {
    padding: 8px 16px;
    background: var(--btn-gloss);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9em;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.comment-input-row button:hover {
    filter: brightness(1.15);
}

.comment-input-row button:active {
    filter: brightness(0.9);
}

/* ========== SHARE POPUP ========== */
.share-popup {
    position: absolute;
    background: var(--container-bg);
    border: var(--border-chrome);
    padding: 8px;
    z-index: 100;
    border-radius: var(--radius);
    display: flex;
    gap: 5px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.share-popup input {
    padding: 6px 10px;
    background: #111118;
    border: 1px solid #333348;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.82em;
    width: 120px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.share-popup input:focus {
    border-color: var(--accent-color);
    outline: none;
}

.share-popup button {
    padding: 6px 12px;
    background: var(--btn-gloss);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.82em;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.share-popup button:hover {
    filter: brightness(1.15);
}

/* ========== EMOJI / GIF BAR (early 2000s flair) ========== */
.sparkle-text {
    animation: sparkle 1.2s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { text-shadow: 0 0 4px #ffcc00, 0 0 8px #ff69b4; }
    100% { text-shadow: 0 0 8px #00bfff, 0 0 14px #ffcc00; }
}

.blink {
    animation: blink-anim 1s step-end infinite;
}

@keyframes blink-anim {
    50% { opacity: 0; }
}

/* ========== TRANSITIONS ========== */
button, .edit-btn, .settings-gear {
    transition: all 0.2s ease-in-out;
}

.top-bar button:active {
    transform: scale(0.96);
}

/* ========== PANEL TITLE GRADIENTS ========== */
.panel {
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.panel:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ========== VLOG GALLERY ========== */
.vlog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.vlog-card {
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.vlog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    border-color: var(--accent-color);
}

.vlog-card:active {
    transform: translateY(-1px);
}

.vlog-card .vlog-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111118;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2em;
    position: relative;
    overflow: hidden;
}

.vlog-card .vlog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vlog-card .vlog-thumb .play-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.vlog-card .vlog-info {
    padding: 10px;
}

.vlog-card .vlog-title {
    font-weight: bold;
    font-size: 0.88em;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vlog-card .vlog-meta {
    font-size: 0.75em;
    color: var(--text-secondary);
}

.vlog-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: #ff6666;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    z-index: 2;
}

.vlog-delete-btn:hover {
    background: rgba(200, 40, 40, 0.9);
    color: #fff;
}

.vlog-tab {
    flex: 1;
    padding: 8px 12px;
    background: var(--container-bg2);
    color: var(--text-secondary);
    border: 1px solid #333348;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.82em;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.vlog-tab.active {
    background: var(--btn-gloss-green);
    color: #fff;
    border-color: rgba(0,0,0,0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.vlog-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px;
    border: 2px dashed #333348;
    border-radius: var(--radius);
    background: #111118;
    color: var(--text-secondary);
    font-size: 0.88em;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.vlog-upload-zone:hover {
    border-color: var(--accent-color);
    background: rgba(var(--accent-color-rgb, 100, 100, 200), 0.05);
}

.vlog-upload-icon {
    font-size: 2em;
}

.vlog-upload-hint {
    font-size: 0.78em;
    color: #666680;
}

.vlog-progress-bar {
    width: 100%;
    height: 6px;
    background: #1a1a2e;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.vlog-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--btn-gloss-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== JOURNAL ========== */
.journal-entry {
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.journal-entry:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-color: var(--accent-color);
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.journal-title {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--accent-color);
}

.journal-meta {
    font-size: 0.78em;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.journal-category {
    display: inline-block;
    background: var(--btn-gloss-purple);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78em;
    font-weight: bold;
}

.journal-body {
    font-size: 0.92em;
    line-height: 1.6;
    color: var(--text-primary);
    margin-top: 8px;
    white-space: pre-wrap;
}

.journal-delete-btn {
    background: none;
    border: none;
    color: #666680;
    cursor: pointer;
    font-size: 0.85em;
    padding: 4px;
    transition: all 0.2s ease-in-out;
}

.journal-delete-btn:hover {
    color: #ff6666;
}

.load-more-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    color: var(--accent-color);
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 0.85em;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.load-more-btn:hover {
    background: var(--container-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.load-more-btn:active {
    transform: scale(0.98);
}

/* ========== RESPONSIVE: Tablets (<=768px) ========== */
@media (max-width: 768px) {
    body { padding: 10px; }
    .alias-wrapper { grid-template-columns: 1fr; gap: 10px; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-panels-grid { grid-template-columns: 1fr; }
    .header { padding: 10px 14px; }
    .header h1 { font-size: 0.95em; }
    .panel { padding: 14px; }
    .panel-title { margin: -14px -14px 10px -14px; }
    .profile-pic { max-width: 200px; margin-left: auto; margin-right: auto; }
    .dm-msg { max-width: 85%; }
    .post-actions { gap: 8px; }
    .post-action-btn { font-size: 0.9em; padding: 8px 10px; }
    .comment-entry { flex-wrap: wrap; }
    .comment-date { margin-left: 0; width: 100%; }
    .top8-grid { grid-template-columns: repeat(4, 1fr); }
    #user-list a { padding: 6px 0; font-size: 0.92em; }
    .search-bar-wrapper { max-width: 200px; }
    .global-search-input:focus { width: 100%; max-width: 200px; }
}

/* ========== RESPONSIVE: Phones (<=480px) ========== */
@media (max-width: 480px) {
    body { padding: 6px; }
    .alias-wrapper { grid-template-columns: 1fr; gap: 8px; }
    .header { padding: 8px 12px; }
    .header h1 { font-size: 0.88em; letter-spacing: 1px; }
    .panel { padding: 12px; border-radius: 4px; overflow-wrap: break-word; word-break: break-word; }
    .panel-title { margin: -12px -12px 8px -12px; font-size: 0.78em; border-radius: 4px 4px 0 0; }
    .alias-name { font-size: 1.15em; }
    .profile-pic { max-width: 160px; }
    .visitor-counter { font-size: 0.72em; padding: 3px 8px; }
    .top8-grid { grid-template-columns: repeat(2, 1fr); }
    .top8-slot { font-size: 0.75em; padding: 6px; }
    .post-actions { gap: 4px; flex-wrap: wrap; }
    .post-action-btn { font-size: 0.85em; min-height: 38px; padding: 7px 10px; }
    .comment-input-row { flex-direction: column; gap: 4px; }
    .comment-input-row button { width: 100%; padding: 10px; min-height: 44px; }
    .dm-thread-btn { padding: 12px; min-height: 44px; font-size: 0.88em; }
    .chat-back-btn { min-height: 44px; font-size: 0.95em; padding: 8px 14px; }
    .panel-close-btn { min-width: 44px; min-height: 44px; font-size: 1.6em; }
    #user-list a { padding: 8px 0; font-size: 0.88em; min-height: 40px; display: flex; align-items: center; }
    .login-title { font-size: 2em; letter-spacing: 1px; }
    .login-subtitle-line { width: 30px; }
    #login-screen { padding: 10px; }
    .login-blurb { padding: 14px 16px; overflow-wrap: break-word; word-break: break-word; }
    .login-blurb p { font-size: 0.82em; }
    .login-form-body { padding: 16px; }
    .login-footer-badge { font-size: 0.6em; padding: 5px 10px; letter-spacing: 0.5px; }
    .settings-overlay { align-items: flex-start; padding-top: 10px; }
    .settings-box { padding: 14px; max-height: 88vh; border-radius: 6px; }
    .settings-box h3 { font-size: 0.88em; }
    .pfp-grid { gap: 6px; }
    .pfp-option { width: 40px; height: 40px; }
    .theme-grid { gap: 6px; }
    .theme-option { width: 30px; height: 30px; }
    .mood-grid { gap: 4px; }
    .mood-option { font-size: 0.75em; padding: 3px 6px; }
    .top-bar { flex-wrap: wrap; gap: 4px; padding: 6px 8px; }
    .top-bar-nav { gap: 4px; }
    .top-bar button { padding: 6px 8px; font-size: 0.72em; }
    .account-panel { min-width: 200px; right: 0; left: auto; }
    .interest-label, .currently-label { min-width: auto; }
    .share-popup { position: fixed; bottom: 0; left: 0; right: 0; top: auto; border-radius: 6px 6px 0 0; padding: 10px; z-index: 200; }
    .dm-msg { max-width: 88%; }
    .admin-tools button { width: 100%; margin-bottom: 5px; min-height: 44px; }
    .construction-bar { height: 8px; }
    .glitter-border { box-shadow: 0 0 6px rgba(255,204,0,0.4), 0 0 12px rgba(255,105,180,0.2), 0 0 18px rgba(0,191,255,0.2); }
    textarea, input[type="text"], input[type="password"] { font-size: 16px !important; }
    .login-submit-btn, .post-actions button, .dm-thread-btn, .emoji-btn, .comment-input-row button, .admin-tools button, #dm-input { min-height: 40px; touch-action: manipulation; }
    .search-bar-wrapper { width: 100%; order: 10; }
    .global-search-input { width: 100%; }
    #dm-messages { min-height: 150px; max-height: 50vh; }
    #dm-input { font-size: 16px !important; padding: 12px; }
    .emoji-grid { grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .emoji-btn { width: 100%; height: auto; padding: 6px; font-size: 1.1em; }
    #dm-chat-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 150; background: var(--panel-bg); border-radius: 0; overflow-y: auto; margin: 0 !important; padding: 10px !important; }
    #dm-chat-panel .panel-title { padding: 10px 0 !important; }
    .photo-preview-thumb { width: 60px; height: 60px; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .vlog-grid { grid-template-columns: 1fr; gap: 8px; }
    .journal-entry { padding: 12px; }
    .journal-header { flex-direction: column; gap: 4px; }
    .guestbook-entry { padding: 8px 0; }
    .comment-entry { padding: 6px 0; font-size: 0.88em; }
    .comment-text, .dm-msg, .quiz-a { overflow-wrap: break-word; word-break: break-word; }
    .global-search-input:focus { width: 100%; }
    .shop-grid { flex-wrap: wrap; }
    .shop-grid .shop-card { flex: 0 0 140px; }
}

/* ========== RESPONSIVE: Very small (<=360px) ========== */
@media (min-width: 900px) {
    #shop-view .alias-wrapper {
        max-width: 1200px;
        margin: 0 auto;
    }

    #shop-view .header,
    #shop-view .panel {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    #shop-view .shop-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        align-items: stretch;
    }
}

@media (max-width: 360px) {
    #login-screen { padding: 10px; }
    .login-title { font-size: 1.5em; letter-spacing: 0.5px; }
    .login-subtitle-line { width: 20px; }
    .login-blurb { padding: 10px 12px; }
    .login-blurb p { font-size: 0.78em; }
    .login-form-body { padding: 12px; }
    .top8-grid { grid-template-columns: repeat(2, 1fr); }
    .header h1 { font-size: 0.82em; }
    .dm-msg { max-width: 92%; font-size: 0.85em; }
    .logged-in-as { display: none; }
    .top-bar button { padding: 6px 8px; font-size: 0.72em; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .emoji-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 0.88em;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: toastIn 0.3s ease-out;
    max-width: 340px;
    word-wrap: break-word;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.toast:hover {
    opacity: 0.85;
    transform: translateX(-4px);
}

.toast.removing {
    animation: toastOut 0.25s ease-in forwards;
}

.toast-success { background: linear-gradient(135deg, #22aa44, #1a7732); border-left: 4px solid #44dd66; }
.toast-error { background: linear-gradient(135deg, #cc3333, #992222); border-left: 4px solid #ff5555; }
.toast-info { background: linear-gradient(135deg, #3377cc, #225599); border-left: 4px solid #55aaff; }
.toast-warning { background: linear-gradient(135deg, #cc8822, #aa6611); border-left: 4px solid #ffaa44; }

.toast-icon {
    font-size: 1.15em;
    flex-shrink: 0;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px) scale(0.95); }
}

/* ========== BUTTON STATES ========== */
.btn-primary {
  padding: 7px 14px;
  background: var(--btn-gloss);
  color: #fff;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 0.85em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-secondary {
  padding: 7px 14px;
  background: var(--container-bg2);
  color: var(--text-primary);
  border: 1px solid #333348;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.85em;
}

.btn-danger {
  padding: 7px 14px;
  background: linear-gradient(to bottom, #cc4444, #aa2222);
  color: #fff;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 0.82em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-purple {
  padding: 7px 14px;
  background: linear-gradient(to bottom, #8855cc, #6633aa);
  color: #fff;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: bold;
  font-size: 0.82em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ========== SKELETON LOADING ========== */
.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, var(--container-bg2) 25%, rgba(255,255,255,0.04) 50%, var(--container-bg2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }

.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--container-bg2) 25%, rgba(255,255,255,0.04) 50%, var(--container-bg2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin: 0 auto 12px;
}

/* ========== VIEW TRANSITIONS ========== */
.view-fade-in {
    animation: viewFadeIn 0.25s ease-out;
}

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

/* ========== PIXEL EMOJI SYSTEM ========== */
.emoji-input-row {
    position: relative;
    margin-bottom: 4px;
}

.emoji-toggle-btn {
    background: var(--container-bg2);
    border: 1px solid #333348;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.1em;
    padding: 3px 8px;
    transition: all 0.2s ease-in-out;
}

.emoji-toggle-btn:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 6px var(--accent-glow);
}

.emoji-picker {
    background: var(--container-bg);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 8px;
    margin-bottom: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    max-width: 320px;
}

.emoji-picker.hidden {
    display: none;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 1.2em;
    image-rendering: pixelated;
}

.emoji-grid-item:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.2);
}

.emoji-grid-item.locked {
    opacity: 0.35;
    cursor: not-allowed;
}

.emoji-grid-item.locked:hover {
    transform: none;
    background: none;
}

.emoji-grid-item .lock-icon {
    font-size: 0.5em;
    position: absolute;
    bottom: 1px;
    right: 1px;
    color: #ff6666;
}

.emoji-category-label {
    font-size: 0.72em;
    color: var(--text-secondary);
    padding: 4px 0 2px;
    grid-column: 1 / -1;
    border-top: var(--border-style);
    margin-top: 4px;
}

.emoji-category-label:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.pixel-emoji {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* ========== SHOP ========== */
.shop-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin-top: 10px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}

.shop-grid .shop-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
}

.shop-card {
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.shop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-color: var(--accent-color);
}

.shop-card.owned {
    border-color: #44aa55;
    opacity: 0.7;
}

.shop-card-preview {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #111118;
}

.shop-card-name {
    font-size: 0.85em;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.shop-card-price {
    font-size: 0.78em;
    color: #ffd700;
    font-weight: bold;
}

.shop-card-price.free {
    color: #44aa55;
}

.shop-buy-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 12px;
    background: var(--btn-gloss-green);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.78em;
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.shop-buy-btn:hover {
    opacity: 0.85;
}

.shop-buy-btn.owned-btn {
    background: #333;
    cursor: default;
}

.coin-package {
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.coin-package:hover {
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255,215,0,0.3);
}

.coin-package-amount {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
}

.coin-package-price {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========== DONATIONS ========== */
.donation-bar-track {
    width: 100%;
    height: 10px;
    background: #1a1a2e;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #333348;
}

.donation-bar-fill {
    height: 100%;
    background: var(--btn-gloss-green);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.supporter-badge {
    display: inline-block;
    background: var(--btn-gloss-purple);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72em;
    font-weight: bold;
    margin-left: 4px;
}

/* ========== PREMIUM BADGES ========== */
.plan-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.68em;
    font-weight: bold;
    margin-left: 4px;
    vertical-align: middle;
}

.plan-badge-plus {
    background: linear-gradient(to bottom, #ffcc00, #ff9900);
    color: #000;
}

.plan-badge-pro {
    background: linear-gradient(to bottom, #ff66cc, #cc33ff);
    color: #fff;
}

/* ========== SPONSORSHIP ========== */
.sponsorship-card {
    background: var(--container-bg2);
    border: var(--border-chrome);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease-in-out;
}

.sponsorship-card:hover {
    border-color: var(--accent-color);
}

.sponsorship-progress {
    width: 100%;
    height: 8px;
    background: #1a1a2e;
    border-radius: 4px;
    overflow: hidden;
    margin: 6px 0;
}

.sponsorship-progress-fill {
    height: 100%;
    background: var(--btn-gloss-orange);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.sponsorship-status {
    font-size: 0.75em;
    color: var(--text-secondary);
}

.sponsorship-funders {
    font-size: 0.75em;
    color: var(--accent-color);
    margin-top: 4px;
}

.sponsorship-pledge-btn {
    padding: 4px 12px;
    background: var(--btn-gloss-orange);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.78em;
    font-weight: bold;
    margin-top: 6px;
}

/* ========== PREMIUM THEMES ========== */
body.theme-neon-night {
    --bg-color: #0a0a1a;
    --container-bg: #111133;
    --container-bg2: #1a1a44;
    --accent-color: #ff00ff;
    --accent-glow: rgba(255, 0, 255, 0.4);
}

body.theme-forest {
    --bg-color: #0a1a0a;
    --container-bg: #152015;
    --container-bg2: #1a2a1a;
    --accent-color: #44cc44;
    --accent-glow: rgba(68, 204, 68, 0.4);
}

body.theme-ocean {
    --bg-color: #0a1520;
    --container-bg: #0f2030;
    --container-bg2: #152838;
    --accent-color: #00aaff;
    --accent-glow: rgba(0, 170, 255, 0.4);
}

body.theme-sunset {
    --bg-color: #1a0f0a;
    --container-bg: #2a1a10;
    --container-bg2: #352215;
    --accent-color: #ff6633;
    --accent-glow: rgba(255, 102, 51, 0.4);
}

body.theme-candy {
    --bg-color: #1a0f1a;
    --container-bg: #2a1530;
    --container-bg2: #351a3a;
    --accent-color: #ff66cc;
    --accent-glow: rgba(255, 102, 204, 0.4);
}

body.theme-midnight {
    --bg-color: #050510;
    --container-bg: #0a0a20;
    --container-bg2: #10102a;
    --accent-color: #7777ff;
    --accent-glow: rgba(119, 119, 255, 0.4);
}

/* ========== LIGHT THEME ========== */
body.light-theme {
    --bg-color: #e8e8f0;
    --container-bg: #ffffff;
    --container-bg2: #f0f0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --accent-color: #2266bb;
    --accent-glow: rgba(34, 102, 187, 0.3);
    --border-style: 1px solid #c0c0d0;
    --border-chrome: 1px solid #a0a0b5;
    background-image: none;
    color: #1a1a2e;
}

body.light-theme .top-bar {
    background: #ffffff;
    border-bottom: 2px solid #c0c0d0;
}

body.light-theme .top-bar button {
    background: linear-gradient(to bottom, #e0e0f0 0%, #c8c8e0 50%, #b8b8d8 51%, #b0b0d5 100%);
    color: #1a1a2e;
    border: 1px solid #999;
    text-shadow: none;
}

body.light-theme .panel {
    background: #ffffff;
    border: 1px solid #c0c0d0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

body.light-theme .panel-title {
    background-image: none;
    background: linear-gradient(to bottom, #e8e8f5, #d0d0e5);
    color: #1a1a2e;
    border-bottom: 1px solid #c0c0d0;
    box-shadow: none;
}

body.light-theme input[type="text"],
body.light-theme input[type="password"],
body.light-theme textarea,
body.light-theme select {
    background: #f8f8ff;
    border: 1px solid #b0b0c5;
    color: #1a1a2e;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

body.light-theme input[type="text"]:focus,
body.light-theme input[type="password"]:focus,
body.light-theme textarea:focus,
body.light-theme select:focus {
    border-color: #2266bb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 0 6px rgba(34, 102, 187, 0.3);
}

body.light-theme .post-action-btn {
    background: #f0f0f5;
    border: 1px solid #c0c0d0;
    color: #333;
}

body.light-theme .post-action-btn:hover {
    background: #e0e0f0;
    border-color: #2266bb;
}

body.light-theme .dm-msg.me {
    background: #2266bb;
    color: #fff;
}

body.light-theme .dm-msg.them {
    background: #e8e8f0;
    color: #1a1a2e;
    border: 1px solid #c0c0d0;
}

body.light-theme .visitor-counter {
    background: #f0f0f5;
    border: 1px solid #c0c0d0;
    color: #228833;
}

body.light-theme .account-panel {
    background: #ffffff;
    border: 1px solid #c0c0d0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

body.light-theme .shop-card {
    background: #f0f0f5;
    border: 1px solid #c0c0d0;
}

body.light-theme .shop-card-preview {
    background: #e8e8f0;
}

body.light-theme .emoji-picker {
    background: #ffffff;
    border: 1px solid #c0c0d0;
}

body.light-theme .login-input {
    background: #f0f0f5;
    border: 2px solid #b0b0c5;
    color: #1a1a2e;
}

body.light-theme .login-input:focus {
    border-color: #2266bb;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1), 0 0 12px rgba(34, 102, 187, 0.3);
}

body.light-theme .login-input::placeholder {
    color: #999;
}

body.light-theme .construction-bar {
    background: repeating-linear-gradient(45deg, #ffcc00, #ffcc00 10px, #f0f0f5 10px, #f0f0f5 20px);
}

/* ========== SEARCH ========== */
.search-bar-wrapper {
    position: relative;
}

.global-search-input {
    width: 160px;
    padding: 5px 10px;
    background: #111118;
    border: 1px solid #333348;
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.78em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.global-search-input:focus {
    width: 220px;
    border-color: var(--accent-color);
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4), 0 0 8px var(--accent-glow);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--container-bg);
    border: 1px solid #4a4a65;
    border-radius: var(--radius);
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.search-results-dropdown.hidden {
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #333348;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(51,153,255,0.1);
}

.search-result-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

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

.search-result-name {
    font-size: 0.85em;
    color: var(--text-primary);
    font-weight: bold;
}

.search-result-meta {
    font-size: 0.72em;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* ========== PHOTO GALLERY ========== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.photo-card {
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #333348;
    transition: all 0.2s ease-in-out;
    position: relative;
    background: #111118;
}

.photo-card:hover {
    border-color: var(--accent-color);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-card .photo-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: #ff6666;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.photo-card:hover .photo-delete-btn {
    opacity: 1;
}

.photo-card .photo-delete-btn:hover {
    background: rgba(200,40,40,0.9);
    color: #fff;
}

.photo-preview-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #333348;
}

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.hidden {
    display: none;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 6px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ff4444;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.5em;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 10001;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-caption {
    color: #aaa;
    font-size: 0.85em;
    margin-top: 12px;
    text-align: center;
}

/* ========== BADGES ========== */
.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
}

.badge-item:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 1.1em;
}

.badge-first-post { background: linear-gradient(135deg, #44aa55, #2d8844); color: #fff; }
.badge-10-friends { background: linear-gradient(135deg, #3399ff, #2266aa); color: #fff; }
.badge-100-visitors { background: linear-gradient(135deg, #ffcc00, #dd9900); color: #000; }
.badge-50-posts { background: linear-gradient(135deg, #cc44aa, #993388); color: #fff; }
.badge-top8-vet { background: linear-gradient(135deg, #ff6633, #cc4422); color: #fff; }
.badge-early-adopter { background: linear-gradient(135deg, #8855cc, #6633aa); color: #fff; }
.badge-supporter { background: linear-gradient(135deg, #ff66cc, #cc33aa); color: #fff; }
.badge-coin-collector { background: linear-gradient(135deg, #ffd700, #cc9900); color: #000; }
.badge-gifter { background: linear-gradient(135deg, #ff4466, #cc2244); color: #fff; }
.badge-journalist { background: linear-gradient(135deg, #66aadd, #4488bb); color: #fff; }

/* ========== VISITORS ========== */
.visitor-entry {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #333348;
}

.visitor-entry:last-child {
    border-bottom: none;
}

.visitor-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

.visitor-name {
    color: var(--accent-color);
    font-size: 0.85em;
    cursor: pointer;
}

.visitor-name:hover {
    text-decoration: underline;
}

.visitor-time {
    color: var(--text-secondary);
    font-size: 0.72em;
    margin-left: auto;
}

/* ========== DM CHAT FULLSCREEN ========== */
#dm-chat-panel.chat-sheet {
    position: fixed;
    left: 50%;
    top: 128px;
    transform: translateX(-50%);
    width: min(92vw, 760px);
    max-height: min(76vh, 760px);
    z-index: 200;
    margin: 0 !important;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    background: var(--container-bg);
    box-shadow: 0 14px 42px rgba(0,0,0,0.45);
}

#dm-chat-panel.chat-sheet .panel-title {
    flex-shrink: 0;
    margin: -12px -12px 10px -12px;
    padding: 10px 12px;
    border-radius: 14px 14px 0 0;
}

#dm-chat-panel.chat-sheet #dm-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
    margin-top: 0;
    padding: 6px 2px;
}

#dm-chat-panel.chat-sheet .dm-msg {
    max-width: min(82%, 560px);
}

.dm-msg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.dm-msg-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.dm-action-btn:hover {
    background: rgba(51,153,255,0.18);
    color: var(--accent-color);
}

.dm-action-btn.liked {
    background: rgba(255,102,102,0.18);
    color: #ff7b7b;
}

.dm-reply-quote {
    margin: 4px 0 6px 0;
    padding: 6px 8px;
    border-left: 2px solid var(--accent-color);
    background: rgba(51,153,255,0.08);
    color: var(--text-secondary);
    border-radius: 4px;
    font-size: 0.75em;
    line-height: 1.35;
}

#dm-reply-preview {
    padding: 8px 10px;
    background: rgba(51,153,255,0.08);
    border: 1px solid rgba(51,153,255,0.25);
    border-radius: var(--radius);
    color: var(--text-primary);
}

.dm-reply-cancel {
    margin-top: 4px;
    border: none;
    background: none;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0;
    font-size: 0.72em;
}

.dm-reply-cancel:hover {
    text-decoration: underline;
}

/* ========== TYPING INDICATOR ========== */
.typing-indicator {
    font-size: 0.78em;
    color: var(--text-secondary);
    padding: 4px 0;
    font-style: italic;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.typing-dots span {
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ========== READ RECEIPTS ========== */
.dm-read-receipt {
    font-size: 0.65em;
    color: rgba(255,255,255,0.4);
    text-align: right;
    margin-top: 2px;
}

.dm-read-receipt.read {
    color: rgba(100, 255, 100, 0.6);
}

body.light-theme .dm-read-receipt {
    color: rgba(0,0,0,0.3);
}

body.light-theme .dm-read-receipt.read {
    color: rgba(34, 102, 187, 0.7);
}

/* Performance: loading skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, var(--panel-bg) 25%, rgba(255,255,255,0.05) 50%, var(--panel-bg) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius);
    min-height: 40px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance: button disabled state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== MORE SECTION (COLLAPSIBLE) ========== */
.more-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 0;
    user-select: none;
    font-weight: bold;
    color: var(--text-primary);
    border-top: 1px solid #333348;
    margin-top: 12px;
}

.more-section-header:hover {
    color: var(--accent-color);
}

.more-toggle-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.more-toggle-icon.open {
    transform: rotate(180deg);
}

.more-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.more-section-content.open {
    max-height: 2000px;
    opacity: 1;
    margin-top: 12px;
}

.more-section-content .panel {
    margin-top: 10px;
}

.embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius);
}
