/* Random GIFs on screen */
.random-gif {
  opacity: 0.92;
  filter: drop-shadow(0 0 2px var(--fg));
  pointer-events: none;
  transition: opacity 0.3s;
}
/* Raw Aesthetic CSS - No preprocessors, pure brutalism */

/* Font declarations — only Blue Screen ships as a real woff2; VT323/Courier Prime
   stay in the font-family stacks as named fallbacks (Courier New) without a 404 fetch. */
@font-face {
    font-family: 'Blue Screen';
    src: url('/fonts/BlueScreen-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* CSS Custom Properties */
:root,
html:not([data-theme]),
html[data-theme="light"] {
    --font-mono: 'Blue Screen', 'VT323', 'Courier Prime', 'Courier New', monospace;
    --font-readable: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --font-post: var(--post-font, var(--font-readable));

    /* Light theme colors */
    --bg: #ffffff;
    --fg: #000000;
    --accent: #000000;
    --muted: #666666;
    --border: #000000;
    --hover: #f0f0f0;

    /* RGB versions for transparency */
    --bg-rgb: 255, 255, 255;
    --fg-rgb: 0, 0, 0;
    --border-rgb: 0, 0, 0;
}

html[data-theme="dark"] {
    --bg: #000000;
    --fg: #ffffff;
    --accent: #ffffff;
    --muted: #999999;
    --border: #ffffff;
    --hover: #111111;

    /* RGB versions for transparency */
    --bg-rgb: 0, 0, 0;
    --fg-rgb: 255, 255, 255;
    --border-rgb: 255, 255, 255;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.4;
    background: transparent;
    color: var(--fg);
    min-height: 100vh;
    overflow-x: hidden;
}
body {
    background: var(--bg);
    color: var(--fg);
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: normal;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Meta styling for dates, locations, weather */
.meta {
    font-family: 'VT323', 'Courier Prime', 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* Ticker bar */
.ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--fg);
    color: var(--bg);
    height: 24px;
    overflow: hidden;
    z-index: 1000;
    border-bottom: none;
}

.ticker-content {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    line-height: 24px;
    font-size: 12px;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

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

/* Hover shake effect */
.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* Theme invert utility */
.theme-invert {
    filter: invert(1);
}

/* Two-column layout containers */
.app-container {
    display: flex;
    min-height: 100vh;
    width:100%;
    margin: 0 auto;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    padding: 20px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    padding: 40px 20px 20px 20px; /* Top padding matches sidebar header */
    min-width: 0; /* Prevents flex item from overflowing */
}

/* Legacy main for compatibility */
main {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: auto;
}

/* Navigation in sidebar */
.sidebar-nav {
    position: static;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 2rem;
}

.sidebar-nav .nav-cell {
    position: relative;
    width: 100%;
    height: 80px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0, 0.25, 1);
}

/* Theme toggle */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 18px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
}

/* Ensure theme toggle inherits correct color */
html[data-theme="dark"] .theme-toggle {
    color: #ffffff;
}

html[data-theme="light"] .theme-toggle,
html:not([data-theme]) .theme-toggle {
    color: #000000;
}

.theme-toggle:hover {
    background: var(--hover);
}

/* Social bar */
.social-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1001;
}

.social-link {
    display: block;
    width: 40px;
    height: 40px;
    border: none;
    color: var(--fg);
    text-decoration: none;
    text-align: center;
    line-height: 38px;
    font-family: var(--font-mono);
    font-size: 12px;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--hover);
}

/* Background canvases */
#bg,
#cat-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}
#bg { opacity: 0.1; }
#cat-bg { opacity: 0.9; }

/* Post styling */
.post {
    font-family: var(--font-post);
}

/* Single post styling - Full width */
.single-post {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(var(--bg-rgb), 0.85);
    backdrop-filter: blur(8px);
    padding: 2rem;
}

.single-post .post-header {
    margin-bottom: 2rem;
    border-bottom: none;
    padding-bottom: 0;
}

.single-post .post-header h1 {
    font-family: var(--font-readable);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.single-post .meta {
    font-family: var(--font-readable);
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.single-post .meta .geo {
    display: inline-flex;
    align-items: center;
}

.single-post .meta .geo:before {
    content: "📍";
    margin-right: 0.25rem;
    font-size: 0.7rem;
}

.single-post .tags {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single-post .tag {
    background: none;
    color: #ff0000;
    padding: 0;
    font-size: 0.8rem;
    text-decoration: none;
    font-family: var(--font-readable);
    font-weight: 500;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.single-post .tag:hover {
    text-decoration: underline;
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: none;
    padding-bottom: 1rem;
}

.post-content {
    margin-bottom: 2rem;
    line-height: 1.6;
    font-family: var(--font-readable);
}

.single-post .post-content {
    font-family: var(--font-readable);
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 400;
}

.post-content p {
    margin-bottom: 1.2rem;
    font-family: var(--font-readable);
}

.single-post .post-content p {
    font-family: var(--font-readable);
    margin-bottom: 1.2rem;
}

.single-post .post-content h1,
.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4,
.single-post .post-content h5,
.single-post .post-content h6 {
    font-family: var(--font-readable);
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.4;
}

.single-post .post-content ul,
.single-post .post-content ol {
    font-family: var(--font-readable);
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.single-post .post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    margin: 1rem auto;
    border: 1px solid var(--border);
}

.post-content a {
    color: var(--fg);
    text-decoration: underline;
}

.post-content a:hover {
    text-decoration: none;
}

.single-post .post-content strong {
    font-weight: bold;
    color: var(--fg);
}

.single-post .post-content em {
    font-style: italic;
    color: var(--muted);
}

.single-post .mini-map {
    border: 1px solid var(--border) !important;
    border-radius: 0 !important;
}

.single-post .mini-map iframe {
    border-radius: 0 !important;
}

/* Tags */
.tags {
    margin: 0.5rem 0;
}

.tag {
    font-size: 0.875rem;
    color: #ff0000;
    margin-right: 10px;
    text-decoration: none;
}

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

/* Home page */
.intro {
    margin-bottom: 3rem;
    text-align: center;
}

.latest-posts {
}

/* Home page minimalistic posts feed */
.home-posts-feed {
  background: rgba(var(--bg-rgb), 0.85);
  backdrop-filter: blur(8px);
}

.home-tweet-like-post {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.home-tweet-like-post:hover {
  background-color: rgba(var(--border-rgb), 0.05);
}

.home-tweet-like-post:last-child {
  border-bottom: none;
}

.home-tweet-like-post .post-content {
  width: 100%;
}

.home-tweet-like-post .post-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.home-tweet-like-post .post-author-name {
  font-family: var(--font-readable);
  font-weight: bold;
  color: var(--fg);
  font-size: 13px;
}

.home-tweet-like-post .post-handle {
  font-family: var(--font-readable);
  color: var(--muted);
  font-size: 13px;
}

.home-tweet-like-post .post-date {
  font-family: var(--font-readable);
  color: var(--muted);
  font-size: 13px;
}

.home-tweet-like-post .post-date:before {
  content: "·";
  margin-right: 6px;
}

.home-tweet-like-post .post-text {
  margin-bottom: 4px;
}

.home-tweet-like-post .post-title {
  margin: 0 0 4px 0;
  font-size: 14px;
  line-height: 1.3;
}

.home-tweet-like-post .post-title a {
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-readable);
  font-weight: 600;
}

.home-tweet-like-post .post-title a:hover {
  text-decoration: underline;
}

.home-tweet-like-post .post-summary {
  font-family: var(--font-readable);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.home-tweet-like-post .post-tags {
  margin: 4px 0 2px 0;
}

.home-tweet-like-post .hashtag {
  color: #ff0000;
  text-decoration: none;
  font-family: var(--font-readable);
  font-size: 13px;
  margin-right: 6px;
}

.home-tweet-like-post .hashtag:hover {
  text-decoration: underline;
}

.home-tweet-like-post .post-meta {
  display: flex;
  gap: 8px;
  font-family: var(--font-readable);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.post-preview {
    padding-bottom: 1rem;
    border-bottom: none;
    font-family: 'Courier New', Courier, monospace !important;
}

.post-preview h3 {
    font-family: var(--font-readable);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-preview a {
    color: var(--fg);
    text-decoration: none;
}

.post-preview a:hover {
    text-decoration: underline;
}

.view-all {
    color: var(--fg);
    text-decoration: none;
    font-weight: bold;
}

.view-all:hover {
    text-decoration: underline;
}

/* Blog archive */
.blog-archive header {
    margin-bottom: 3rem;
    text-align: center;
}

/* Twitter-like post cards */
.posts-list {
    max-width: none;
    width: 100%;
    margin: 0;
}

.post-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.post-item:hover {
    border-color: var(--fg);
}

/* Post author header */
.post-author {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    background: var(--fg);
    color: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: bold;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.post-author-name {
    font-family: var(--font-readable);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg);
}

.post-author-handle {
    font-family: var(--font-readable);
    font-size: 0.8rem;
    color: var(--muted);
}

.post-item h2 {
    font-family: var(--font-readable);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-item h2 a {
    color: var(--fg);
    text-decoration: none;
    font-weight: bold;
}

.post-item h2 a:hover {
    text-decoration: underline;
}

.post-item .meta {
    font-family: var(--font-readable);
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.post-item .meta .geo {
    display: inline-flex;
    align-items: center;
}

.post-item .meta .geo:before {
    content: "📍";
    margin-right: 0.25rem;
    font-size: 0.7rem;
}

.post-item .tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-item .tag {
    background: none;
    color: #ff0000;
    padding: 0;
    font-size: 0.8rem;
    text-decoration: none;
    font-family: var(--font-readable);
    font-weight: 500;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.post-item .tag:hover {
    text-decoration: underline;
}

.excerpt {
    color: var(--fg);
    line-height: 1.5;
    font-size: 0.95rem;
    font-family: var(--font-readable);
}

.excerpt p {
    margin-bottom: 0.5rem;
    font-family: var(--font-readable);
}

.excerpt p:last-child {
    margin-bottom: 0;
}

.excerpt img {
    max-width: 100%;
    height: auto;
    margin: 0.5rem 0;
    border: 1px solid var(--border);
}

.excerpt strong {
    color: var(--fg);
    font-weight: bold;
    font-family: var(--font-readable);
}

.excerpt em {
    color: var(--muted);
    font-style: italic;
    font-family: var(--font-readable);
}

/* Reactions */
.reactions {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.reaction {
    background: none;
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 16px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction:hover {
    background: var(--fg);
    color: var(--bg);
    transform: scale(1.1);
}

.single-post .reactions {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 2rem;
}

/* Tags archive styling */
.tags-archive header {
    margin-bottom: 3rem;
    text-align: center;
}

.tags-cloud {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(var(--bg-rgb), 0.85);
    backdrop-filter: blur(8px);
    padding: 2rem;
}

.tag-item {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.tag-item:hover {
    border-color: var(--fg);
    transform: scale(1.02);
}

.tag-link {
    text-decoration: none;
    color: var(--fg);
    display: block;
}

.tag-name {
    font-family: var(--font-readable);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ff0000;
}

.tag-count {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: var(--fg);
    font-weight: bold;
}

/* Individual tag posts page - Raw style */
.tag-posts-raw header {
    margin-bottom: 3rem;
    text-align: center;
}

.raw-posts-list {
    max-width: none;
    width: 100%;
    margin: 0;
}

.raw-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
}

.raw-post-item:last-child {
    border-bottom: none;
}

.raw-post-link {
    color: var(--fg);
    text-decoration: none;
    font-weight: bold;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.content-type-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

.gallery-item {
    background: none !important;
}

.gallery-item .raw-post-link {
    color: var(--fg);
}

.gallery-item .content-type-icon {
    opacity: 0.8;
}

/* Gallery preview in tag pages */
.gallery-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: none;
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.gallery-item .raw-post-link {
    flex: 1;
}

.raw-post-date,
.content-count {
    font-family: 'VT323', monospace;
    color: var(--muted);
    font-size: 0.9rem;
    margin-left: 1rem;
}

.content-count {
    color: var(--accent);
    font-weight: bold;
    opacity: 0.8;
}

.tag-stats {
    font-family: 'VT323', monospace;
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: var(--muted);
    font-style: italic;
}

/* Mobile tags styling */
@media (max-width: 600px) {
    .tags-cloud {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tag-item {
        padding: 0.75rem;
    }
    
    .tag-name {
        font-size: 1rem;
    }
    
    .tag-count {
        font-size: 0.8rem;
    }
    
    .raw-posts-list {
        margin: 0 1rem;
    }
    
    .raw-post-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }
    
    .raw-post-link {
        gap: 0.4rem;
    }
    
    .content-type-icon {
        font-size: 0.75rem;
    }
    
    .raw-post-date,
    .content-count {
        margin-left: 0;
        margin-top: 0.25rem;
        font-size: 0.8rem;
    }
    
    .gallery-preview {
        gap: 0.75rem;
    }
    
    .gallery-thumb {
        width: 50px;
        height: 50px;
    }
    
    .gallery-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .ticker-content {
        animation: none;
        transform: none;
    }
    
    .hover-shake:hover {
        animation: none;
    }
    
    #bg {
        display: none;
    }
}

/* Main content grid layout - now full width in main-content */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.latest-posts {
    min-width: 0;
}

.latest-posts h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom:0.5rem;
}

.home-gallery h2 {
    /* font-size: 1.2rem; */
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.gallery-preview {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.25rem;
}

.gallery-item-preview {
    position: relative;
}

/* Square container for gallery images */
.gallery-item-square {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio */
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
}

.gallery-item-square img,
.gallery-item-square .image-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-square .image-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.5rem;
    border: none;
}

/* Hide 5th and 6th items on mobile (show only 4) */
@media (max-width: 768px) {
    .gallery-item-preview:nth-child(n+5) {
        display: none;
    }
}

/* Legacy support for old non-square images */
.gallery-item-preview img:not(.gallery-item-square img) {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border: 1px solid var(--border);
    display: block;
}

.image-error:not(.gallery-item-square .image-error) {
    width: 100%;
    height: 80px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.5rem;
}

.gallery-caption {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
    text-align: center;
}

.gallery-fallback {
    color: var(--muted);
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

/* Chat positioning under gallery */
.home-gallery .mini-chat-container {
    position: static;
    margin-top: 1.5rem;
    max-width: 100%;
}

/* Mobile responsiveness for two-column layout */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-width: auto;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .sidebar-nav {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 1rem;
        overflow-x: auto;
    }
    
    .sidebar-nav .nav-cell {
        min-width: 80px;
        height: 60px;
    }
    
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .home-gallery {
        order: -1;
    }
    
    .gallery-preview {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }

    /* Only apply fixed height to old non-square images */
    .gallery-item-preview img:not(.gallery-item-square img) {
        height: 50px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        padding: 15px;
    }

    .main-content {
        padding: 30px 15px 15px 15px; /* Maintains alignment with sidebar header */
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .theme-toggle,
    .social-link {
        width: 35px;
        height: 35px;
        line-height: 33px;
    }
    
    .social-bar {
        bottom: 15px;
        right: 15px;
    }
    
    .ticker-content {
        font-size: 11px;
        gap: 15px;
    }
    
    /* Mobile posts layout */
    .posts-list {
        max-width: 100%;
    }
    
    .post-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .post-author-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .post-author-name {
        font-size: 0.85rem;
    }
    
    .post-author-handle {
        font-size: 0.75rem;
    }
    
    .post-item h2 {
        font-size: 1.1rem;
    }
    
    .post-item .meta {
        font-family: var(--font-readable);
        font-size: 0.85rem;
        gap: 0.25rem;
    }
    
    .post-item .tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .excerpt {
        font-size: 0.9rem;
    }
    
    /* Mobile single post styling */
    .single-post {
        margin: 0 15px;
        padding: 1.5rem;
    }
    
    .single-post .post-header h1 {
        font-size: 1.3rem;
    }
    
    .single-post .post-author-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .single-post .post-author-name {
        font-size: 0.85rem;
    }
    
    .single-post .post-author-handle {
        font-size: 0.75rem;
    }
    
    .single-post .meta {
        font-family: var(--font-readable);
        font-size: 0.85rem;
        gap: 0.25rem;
    }
    
    .single-post .tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .single-post .post-content {
        font-family: var(--font-readable);
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ==================== LOADING SCREEN STYLES ==================== */

/* Hide loading screen when JS is disabled */
html.no-js .loading-screen {
    display: none !important;
}

/* Show app container when JS is disabled */
html.no-js .app-container {
    visibility: visible !important;
    opacity: 1 !important;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loading-logo {
    margin-bottom: 2rem;
}

.loading-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
    display: block;
    margin: 0 auto;
}

.loading-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: 3px;
    margin-bottom: 2rem;
    animation: typewriter 2s steps(15) infinite;
}


/* Loading animations */
@keyframes pulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes typewriter {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.5;
    }
}

/* Dark theme adjustments for loading screen */
html[data-theme="dark"] .loading-bar {
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .loading-bar,
html:not([data-theme]) .loading-bar {
    background: rgba(0, 0, 0, 0.1);
}

/* Ensure main app is hidden until loading completes */
.app-container {
    opacity: 1;
    transition: opacity 0.3s ease-in;
    min-height: 100vh;
}

/* Prevent layout shifts during loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sidebar-logo {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain !important;
    margin: 0 auto 15px auto !important;
    display: block !important;
}

/* Ensure smooth transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== END LOADING SCREEN STYLES ==================== */

/* ==================== MINIMAL TAG PAGES ==================== */

.tag-posts-minimal {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(var(--bg-rgb), 0.85);
    backdrop-filter: blur(8px);
    padding: 2rem;
}

.minimal-posts-list {
    margin-top: 2rem;
}

.minimal-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.minimal-post-item:last-child {
    border-bottom: none;
}

.minimal-post-link {
    color: var(--fg);
    text-decoration: none;
    font-family: var(--font-readable);
    font-size: 1rem;
    line-height: 1.4;
}

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

.content-type-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Dark theme adjustments */
html[data-theme="dark"] .minimal-post-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .minimal-post-item,
html:not([data-theme]) .minimal-post-item {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* ==================== END MINIMAL TAG PAGES ==================== */
