/* ============================================================
   TURBOEGG BLOG - GITHUB PAGES EDITION
   Aesthetic: Compact Cyberpunk Retro Pixel / Twitter Chirp Hybrid
   Font: Cubic 11 Pixel Font + Terminal Green Palette
   ============================================================ */

@font-face {
    font-family: 'Cubic';
    src: url('https://cdn.jsdelivr.net/gh/tadlearn/webfonts/Cubic.woff2') format('woff2');
    font-display: swap;
}

:root {
    --bg: #000000;
    --bdr: #22262a;
    --bdr-light: #33383f;
    --txt: #39FF14;
    --txt-bright: #00FF00;
    --txt-link: #8CFF8C;
    --txt-muted: #55a840;
    --txt-dim: #71767b;
    --accent: #39FF14;
    --accent-bg: rgba(57, 255, 20, 0.1);
    --accent-hover: rgba(57, 255, 20, 0.2);
    
    --card-bg: #0a0c0e;
    --sidebar-bg: #0d1013;
    --sidebar-box-bg: #12161b;
    
    --nav-w: 200px;
    --feed-w: 590px;
    --sidebar-w: 320px;
    --radius: 0px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
    box-shadow: none !important;
}

button, input, select, textarea, a, .btn-pixel, .btn-nav, .btn-action, .btn-submit, .btn-approve, .btn-reject, .tag-pill, .tag-chip, .user-card, .modal-card, .auth-card, .avatar-img, .post-author-avatar, .nav-footer-avatar, img {
    border-radius: 0 !important;
    box-shadow: none !important;
}

body {
    background-color: var(--bg) !important;
    color: var(--txt) !important;
    font-family: 'Cubic', 'Courier New', monospace, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    letter-spacing: 1px !important;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--txt-bright) !important;
    font-weight: normal;
    letter-spacing: 1.2px;
    line-height: 1.35;
    margin-bottom: 10px;
}

h1 { font-size: 20px !important; }
h2 { font-size: 16px !important; margin-top: 14px; }
h3 { font-size: 14px !important; margin-top: 10px; }

p {
    margin-bottom: 12px;
    word-break: break-word;
}

a {
    color: var(--txt-link);
    text-decoration: underline dotted;
    transition: all 0.15s ease;
    cursor: pointer;
}

a:hover {
    background-color: var(--accent);
    color: #000000 !important;
    text-decoration: none;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

li {
    margin-bottom: 4px;
}

blockquote {
    border-left: 3px solid var(--accent);
    background: rgba(57, 255, 20, 0.05);
    padding: 8px 14px;
    margin: 12px 0;
    color: #b0ffb0;
}

hr {
    border: none;
    border-top: 1px dashed var(--bdr-light);
    margin: 16px 0;
}

/* App Container (Twitter 3-column layout) */
.app-container {
    display: flex;
    justify-content: center;
    max-width: 1160px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Left Navigation */
.nav-sidebar {
    width: var(--nav-w);
    padding: 14px 10px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--bdr);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: var(--txt-bright);
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 12px;
}

.nav-brand:hover {
    background: transparent;
    color: var(--txt-bright) !important;
    text-shadow: 0 0 8px var(--accent);
}

.nav-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 0;
    object-fit: cover;
    border: 1px solid var(--accent);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 0;
    color: var(--txt);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.nav-item:hover, .nav-item.active {
    background-color: var(--accent-bg);
    color: var(--txt-bright) !important;
    text-decoration: none;
}

.nav-footer-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 0;
    border: 1px solid var(--bdr);
    background: var(--sidebar-box-bg);
}

.nav-footer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 0;
}

.nav-footer-name {
    font-size: 12px;
    line-height: 1.2;
    color: var(--txt-bright);
}

/* Center Feed */
.main-feed {
    width: var(--feed-w);
    min-height: 100vh;
    border-right: 1px solid var(--bdr);
}

/* Header Banner & Profile */
.profile-header {
    border-bottom: 1px solid var(--bdr);
    position: relative;
}

.banner-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #000000;
    display: block;
    border-bottom: 1px solid var(--bdr);
    image-rendering: pixelated;
    padding: 6px 0;
}

.profile-info {
    padding: 0 14px 14px 14px;
    position: relative;
}

.avatar-wrapper {
    position: relative;
    margin-top: -38px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-img {
    width: 76px;
    height: 76px;
    border-radius: 0;
    border: 2px solid var(--accent);
    background: #000;
    box-shadow: none !important;
    object-fit: cover;
    image-rendering: pixelated;
}

.profile-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.btn-pixel {
    background: #000;
    color: var(--txt-bright);
    border: 1px solid var(--accent);
    padding: 5px 10px;
    border-radius: 0;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.15s ease;
}

.btn-pixel:hover {
    background: var(--accent);
    color: #000 !important;
    text-decoration: none;
    box-shadow: none !important;
}

.profile-name-area {
    margin-bottom: 8px;
}

.profile-title {
    font-size: 18px;
    color: var(--txt-bright);
    margin-bottom: 2px;
}

.profile-bio {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--txt);
}

/* Feed Search and Filter bar */
.feed-filter-bar {
    padding: 8px 14px;
    border-bottom: 1px solid var(--bdr);
    background: rgba(10, 12, 14, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #000;
    border: 1px solid var(--bdr-light);
    border-radius: 0;
    padding: 4px 10px;
    gap: 6px;
    height: 32px;
    max-width: 100%;
}

.search-input-wrapper svg {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
    max-width: 15px !important;
    fill: var(--txt-muted) !important;
    flex-shrink: 0;
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--txt-bright);
    font-family: inherit;
    font-size: 12px;
    width: 100%;
    line-height: 1;
}

.search-input-wrapper input::placeholder {
    color: var(--txt-dim);
}

.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    padding: 2px 10px;
    background: #000;
    border: 1px solid var(--bdr);
    border-radius: 0;
    font-size: 11px;
    color: var(--txt-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.tag-pill:hover, .tag-pill.active {
    background: var(--accent-bg);
    border-color: var(--accent);
    color: var(--txt-bright) !important;
    text-decoration: none;
}

/* Posts List */
.post-card {
    border-bottom: 1px solid var(--bdr);
    padding: 14px 16px;
    transition: background-color 0.2s;
    position: relative;
}

.post-card:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.post-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 0;
    object-fit: cover;
    border: 1px solid var(--bdr-light);
}

.post-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-size: 13px;
    color: var(--txt-bright);
    font-weight: bold;
}

.post-time {
    font-size: 11px;
    color: var(--txt-muted);
}

.post-title {
    font-size: 16px !important;
    margin-bottom: 8px;
}

.post-title a {
    color: var(--txt-bright);
    text-decoration: none;
}

.post-title a:hover {
    background: transparent;
    color: var(--txt-bright) !important;
    text-shadow: 0 0 6px var(--accent);
}

.post-body {
    font-size: 13px;
    line-height: 1.65;
    color: var(--txt);
}

.post-body p {
    margin-bottom: 10px;
}

.post-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.post-tag-item {
    font-size: 11px;
    color: var(--txt-muted);
    text-decoration: none;
}

.post-tag-item:hover {
    color: var(--txt-bright) !important;
    background: transparent;
}

/* Post Action Bar */
.post-actions {
    display: flex;
    justify-content: space-between;
    max-width: 380px;
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px dashed var(--bdr);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--txt-muted);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 0;
    transition: all 0.2s;
}

.action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.action-btn:hover {
    color: var(--txt-bright);
    background: var(--accent-bg);
}

.action-btn.liked {
    color: #ff3366;
}

.action-btn.liked svg {
    fill: #ff3366;
    animation: heartPop 0.3s ease-in-out;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Right Sidebar */
.right-sidebar {
    width: var(--sidebar-w);
    padding: 14px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.right-sidebar::-webkit-scrollbar {
    width: 3px;
}
.right-sidebar::-webkit-scrollbar-thumb {
    background: var(--bdr);
    border-radius: 0;
}

.sidebar-card {
    background: var(--sidebar-box-bg);
    border: 1px solid var(--bdr);
    border-radius: 0;
    padding: 10px;
}

.sidebar-card-title {
    font-size: 13px;
    color: var(--txt-bright);
    border-bottom: 1px solid var(--bdr);
    padding-bottom: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-card-title svg {
    width: 16px;
    height: 16px;
}

/* Cyberpunk Retro Audio Player Styling */
.audio-player-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-controls {
    display: flex;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    background: #000;
    border: 1px solid var(--bdr-light);
    color: var(--txt-muted);
    font-family: inherit;
    font-size: 10px;
    padding: 4px 2px;
    border-radius: 0;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.mode-btn:hover {
    border-color: var(--accent);
    color: var(--txt-bright);
}

.mode-btn.active {
    background: var(--accent);
    color: #000 !important;
    border-color: var(--accent);
    font-weight: bold;
}

.player-main-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #0a0d10;
    border: 1px solid var(--bdr);
}

.player-btn-group {
    display: flex;
    gap: 3px;
    align-items: center;
}

.btn-player-action {
    width: 26px;
    height: 26px;
    background: #000;
    border: 1px solid var(--bdr-light);
    color: var(--txt-bright);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.15s;
    user-select: none;
}

.btn-player-action:hover {
    background: var(--accent-hover);
    border-color: var(--accent);
}

.btn-player-action.btn-play-main {
    width: 28px;
    height: 28px;
    font-size: 13px;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-player-action.btn-play-main:hover {
    background: var(--accent);
    color: #000;
}

.player-progress-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.player-progress-wrap {
    width: 100%;
    height: 6px;
    background: #151b22;
    border: 1px solid var(--bdr);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.1s linear;
}

.player-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--txt-dim);
    line-height: 1;
}

.current-track-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(57, 255, 20, 0.04);
    border: 1px dashed var(--accent);
}

.current-track-cover {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border: 1px solid var(--bdr);
    background: #000;
    flex-shrink: 0;
}

.current-track-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.current-track-name {
    font-size: 11px;
    font-weight: bold;
    color: var(--txt-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-track-artist {
    font-size: 10px;
    color: var(--txt-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 190px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.playlist-list::-webkit-scrollbar {
    width: 3px;
}

.playlist-list::-webkit-scrollbar-thumb {
    background: var(--bdr-light);
}

.playlist-item {
    padding: 4px 6px;
    border-radius: 0;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--txt);
    transition: all 0.15s;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: var(--accent-bg);
    color: var(--txt-bright);
}

.playlist-item.playing {
    background: var(--accent);
    color: #000 !important;
    font-weight: bold;
}

.playlist-item.playing .playlist-item-num,
.playlist-item.playing .playlist-item-artist {
    color: #000 !important;
}

.playlist-item-num {
    font-size: 9px;
    opacity: 0.8;
    min-width: 14px;
}

.playlist-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-artist {
    font-size: 10px;
    color: var(--txt-dim);
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* Sidebar Badges & Widgets */
.bangumi-badge {
    display: block;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--bdr);
    transition: opacity 0.2s;
}

.bangumi-badge:hover {
    opacity: 0.85;
    background: transparent;
}

.bangumi-badge img {
    width: 100%;
    display: block;
}

.sidebar-gif {
    width: 100%;
    border-radius: 0;
    border: 1px solid var(--bdr);
    display: block;
}

.sidebar-footer {
    font-size: 10px;
    color: var(--txt-dim);
    line-height: 1.5;
    padding-top: 6px;
}

.sidebar-footer a {
    color: var(--txt-muted);
    font-size: 10px;
}

/* Toast Notifications */
.toast-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #000;
    color: var(--txt-bright);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 12px;
    box-shadow: none !important;
    z-index: 1000000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-box.show {
    transform: translateX(-50%) translateY(0);
}

/* Mobile Responsive */
@media (max-width: 1100px) {
    :root {
        --nav-w: 60px;
    }
    .nav-link-text, .nav-footer-name, .nav-brand span {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 10px;
    }
    .nav-brand {
        justify-content: center;
    }
}

@media (max-width: 960px) {
    .right-sidebar {
        display: none;
    }
    .app-container {
        justify-content: flex-start;
    }
    .main-feed {
        width: calc(100vw - var(--nav-w));
        border-right: none;
    }
}

@media (max-width: 600px) {
    :root {
        --nav-w: 0px;
    }
    .nav-sidebar {
        display: none;
    }
    .main-feed {
        width: 100vw;
    }
    .banner-img {
        height: 140px;
    }
    .avatar-img {
        width: 65px;
        height: 65px;
        margin-top: -30px;
    }
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 48px;
        background: #000;
        border-top: 1px solid var(--bdr);
        justify-content: space-around;
        align-items: center;
        z-index: 9999;
    }
    .mobile-nav-btn {
        color: var(--txt-muted);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
    }
    .mobile-nav-btn svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }
    .mobile-nav-btn.active, .mobile-nav-btn:hover {
        color: var(--txt-bright) !important;
        background: transparent;
    }
    .post-card {
        padding: 12px 10px;
    }
}

.mobile-bottom-nav {
    display: none;
}

/* MARKDOWN TABLES & CODE BLOCKS */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 14px 0;
    border: 1px solid var(--bdr);
    background: #000;
}

table.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    color: var(--txt);
}

table.md-table th {
    background: #090c0f;
    border-bottom: 2px solid var(--accent);
    border-right: 1px solid var(--bdr);
    padding: 10px 12px;
    color: var(--txt-bright);
    font-weight: bold;
    white-space: nowrap;
}

table.md-table th:last-child {
    border-right: none;
}

table.md-table td {
    padding: 8px 12px;
    border-bottom: 1px dashed var(--bdr);
    border-right: 1px dashed var(--bdr);
    line-height: 1.5;
}

table.md-table td:last-child {
    border-right: none;
}

table.md-table tr:hover {
    background: rgba(57, 255, 20, 0.04);
}

.inline-code {
    background: rgba(57, 255, 20, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 1px 5px;
    font-family: inherit;
    font-size: 12px;
}

pre {
    background: #000;
    border: 1px solid var(--bdr);
    padding: 14px;
    margin: 14px 0;
    overflow-x: auto;
}

pre code {
    color: var(--txt-bright);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
}

