/* =============================================
   FLAPJACK FAN CLUB — Retro Stylesheet
   ============================================= */

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

body {
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Times New Roman', Times, serif;
    color: #2a292b;
    min-height: 100vh;
    padding: 24px 12px 40px;
}

/* ---- Main panel ---- */
#panel {
    max-width: 760px;
    margin: 0 auto;
    background: #e8dfc8;
    border: 3px solid;
    border-color: #f5edd8 #6e5828 #6e5828 #f5edd8;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.7);
}

/* ---- Title bar ---- */
#title-bar {
    background: linear-gradient(135deg, #1a1919 0%, #3a3020 50%, #1a1919 100%);
    padding: 22px 16px 16px;
    text-align: center;
    border-bottom: 3px solid #ad935b;
}
#title-bar h1 {
    color: #ad935b;
    font-size: 2.1em;
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    letter-spacing: 6px;
    text-shadow: 0 0 12px rgba(173,147,91,0.35), 1px 1px 0 #000;
    margin-bottom: 5px;
}
#title-bar .tagline {
    color: #7a6840;
    font-size: 0.78em;
    font-style: italic;
    font-family: Georgia, serif;
}

/* ---- Login status bar ---- */
#login-bar {
    background: #d4c9a8;
    border-bottom: 1px solid #9a7e40;
    padding: 4px 14px;
    text-align: right;
    font-size: 0.72em;
    font-family: Verdana, Geneva, sans-serif;
    color: #4a3f20;
}
#login-bar a { color: #533075; text-decoration: none; }
#login-bar a:hover { text-decoration: underline; }

/* ---- Navigation ---- */
#nav {
    background: #2a292b;
    border-bottom: 2px solid #ad935b;
    text-align: center;
    padding: 0;
    line-height: 1;
}
#nav a {
    display: inline-block;
    color: #c8a96e;
    text-decoration: none;
    padding: 9px 16px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-right: 1px solid #3e3830;
    transition: background 0.1s;
}
#nav a:first-child { border-left: 1px solid #3e3830; }
#nav a:hover { background: #ad935b; color: #1a1919; }
#nav a.active { background: #38301e; color: #c8a96e; }

/* ---- Section sub-nav ---- */
#section-nav {
    background: #1e1c1a;
    border-bottom: 2px solid #6e5828;
    padding: 0 6px;
    overflow-x: auto;
    white-space: nowrap;
    line-height: 1;
}
.section-btn {
    display: inline-block;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    color: #7a6840;
    padding: 8px 13px 7px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.68em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: none;
}
.section-btn:hover {
    background: none;
    color: #c8a96e;
    border-bottom-color: #6e5828;
}
.section-btn:active {
    background: none;
    border-color: none;
    border-bottom-color: #ad935b;
}
.section-btn.active {
    color: #c8a96e;
    border-bottom-color: #ad935b;
    background: none;
}

/* ---- Content area ---- */
#content {
    padding: 18px 20px;
}

/* ---- Retro section box ---- */
.retro-box {
    border: 2px solid;
    border-color: #6e5828 #f5edd8 #f5edd8 #6e5828;
    background: #f0e8d4;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.retro-box h2 {
    font-size: 0.95em;
    font-variant: small-caps;
    letter-spacing: 2px;
    color: #2a292b;
    border-bottom: 1px solid #ad935b;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
.retro-box ul {
    padding-left: 20px;
    line-height: 1.9;
    font-size: 0.92em;
}
.retro-box p {
    font-size: 0.92em;
    line-height: 1.65;
    margin-bottom: 8px;
}
.retro-box p:last-child { margin-bottom: 0; }

/* ---- Footer ---- */
#footer {
    background: #2a292b;
    color: #6a5c30;
    text-align: center;
    padding: 9px;
    font-size: 0.68em;
    font-family: Verdana, Geneva, sans-serif;
    border-top: 2px solid #ad935b;
    letter-spacing: 0.5px;
}
#footer a { color: #ad935b; }

/* ---- Global links ---- */
a { color: #533075; }
a:visited { color: #6e3fa0; }
a:hover { color: #ad935b; }

hr {
    border: none;
    border-top: 1px solid #b89c60;
    margin: 14px 0;
}

/* ---- Forms ---- */
label {
    display: block;
    font-size: 0.78em;
    font-family: Verdana, Geneva, sans-serif;
    color: #4a3f20;
    margin-bottom: 3px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    padding: 5px 7px;
    border: 2px solid;
    border-color: #6e5828 #f0ead0 #f0ead0 #6e5828;
    background: #fffef5;
    color: #2a292b;
    outline: none;
}
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    background: #fffff8;
    border-color: #ad935b #d4c080 #d4c080 #ad935b;
}
textarea { resize: vertical; min-height: 80px; }
.form-group { margin-bottom: 10px; }

button, .btn {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 14px;
    border: 2px solid;
    border-color: #f0ead0 #6e5828 #6e5828 #f0ead0;
    background: #ddd0a8;
    color: #2a292b;
    cursor: pointer;
}
button:hover, .btn:hover { background: #ad935b; color: #fff; }
button:active { border-color: #6e5828 #f0ead0 #f0ead0 #6e5828; }
button.danger {
    background: #d8aaaa;
    border-color: #f5d4d4 #884040 #884040 #f5d4d4;
    color: #5a1a1a;
}
button.danger:hover { background: #b04040; color: #fff; }
button.small { padding: 3px 8px; font-size: 0.68em; }

/* ---- Messages ---- */
.msg-error {
    background: #ffe8e8;
    border: 1px solid #cc4444;
    padding: 6px 10px;
    font-size: 0.8em;
    font-family: Verdana, sans-serif;
    margin-bottom: 10px;
}
.msg-success {
    background: #e8ffe8;
    border: 1px solid #44aa44;
    padding: 6px 10px;
    font-size: 0.8em;
    font-family: Verdana, sans-serif;
    margin-bottom: 10px;
}

/* ---- Status badges ---- */
.status {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px 7px;
    border: 1px solid;
    white-space: nowrap;
}
.status-pending  { background: #fff8d4; border-color: #c8a800; color: #7a6000; }
.status-fetched  { background: #d4ffd4; border-color: #40a840; color: #1e6020; }
.status-not_found { background: #ffd4d4; border-color: #c04040; color: #7a1a1a; }

/* ---- Login modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.78);
    z-index: 300;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 0;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: #e8dfc8;
    border: 3px solid;
    border-color: #f5edd8 #6e5828 #6e5828 #f5edd8;
    padding: 22px;
    max-width: 320px;
    width: 92%;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.6);
}
.modal-box h3 {
    font-variant: small-caps;
    letter-spacing: 2px;
    font-size: 1em;
    border-bottom: 1px solid #ad935b;
    padding-bottom: 7px;
    margin-bottom: 16px;
    color: #2a292b;
}
.modal-actions {
    text-align: right;
    margin-top: 14px;
}
.modal-actions button { margin-left: 6px; }

/* ---- Blog posts ---- */
.post {
    background: #f0e8d4;
    border: 2px solid;
    border-color: #6e5828 #f5edd8 #f5edd8 #6e5828;
    padding: 13px 16px;
    margin-bottom: 14px;
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #b89c60;
    padding-bottom: 7px;
    margin-bottom: 10px;
}
.post-title {
    font-size: 1.05em;
    font-weight: bold;
    font-variant: small-caps;
    letter-spacing: 1px;
}
.post-meta {
    font-size: 0.7em;
    font-family: Verdana, Geneva, sans-serif;
    color: #6a5c30;
    display: flex;
    align-items: center;
    gap: 6px;
}
.post-avatar {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border: 1px solid #9a7e40;
    flex-shrink: 0;
    cursor: pointer;
}
.avatar-hover-card {
    position: fixed;
    z-index: 500;
    pointer-events: none;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #e8dfc8;
    border: 2px solid #ad935b;
    box-shadow: 3px 3px 14px rgba(0,0,0,0.75);
    padding: 8px 10px;
    max-width: 260px;
    min-width: 150px;
}
.ahc-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #9a7e40;
    flex-shrink: 0;
}
.ahc-info { flex: 1; min-width: 0; }
.ahc-username {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    font-weight: bold;
    color: #2a292b;
    margin-bottom: 2px;
}
.ahc-bio {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #4a3f20;
    font-style: italic;
    line-height: 1.45;
    word-wrap: break-word;
}
.ahc-now-playing {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.68em;
    color: #533075;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Album search autocomplete ---- */
.album-search-container { position: relative; }
.album-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    background: #fffef5;
    border: 2px solid #9a7e40;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.4);
}
.album-search-result {
    padding: 6px 9px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.78em;
    cursor: pointer;
    border-bottom: 1px solid #e8dfc8;
}
.album-search-result:last-child { border-bottom: none; }
.album-search-result:hover { background: #ede5ce; }

/* ---- Album cover grid ---- */
.album-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.album-grid-item {
    position: relative;
    flex-shrink: 0;
}
.album-grid-cover {
    width: 88px;
    height: 88px;
    border: 2px solid #6e5828;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.album-grid-placeholder {
    background: #2a2820;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e5828;
    font-size: 2em;
}
.album-grid-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.album-grid-item a { display: block; line-height: 0; }
.album-grid-item a:hover .album-grid-cover { border-color: #ad935b; }
.album-grid-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1c1a;
    border: 1px solid #6e5828;
    color: #c8a96e;
    padding: 7px 10px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.8);
    line-height: 1.6;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}
.album-grid-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #6e5828;
}
.album-grid-year { color: #8a7a50; }
.album-grid-item:hover .album-grid-tooltip { display: block; }

/* ---- Album grid (browser size) ---- */
.album-grid-lg .album-grid-cover { width: 100px; height: 100px; }
.album-poster-rating {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(20,18,16,0.82);
    color: #ad935b;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.62em;
    text-align: center;
    padding: 2px 0;
    pointer-events: none;
    letter-spacing: 0.5px;
}
.carousel-poster.square { width: 140px; height: 140px; }

/* ---- Horizontal scroll lists ---- */
.hlist-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: #6e5828 #2a2820;
}
.hlist-row::-webkit-scrollbar { height: 5px; }
.hlist-row::-webkit-scrollbar-track { background: #2a2820; }
.hlist-row::-webkit-scrollbar-thumb { background: #6e5828; border-radius: 2px; }
.hlist-item {
    flex-shrink: 0;
    width: 100px;
    text-decoration: none;
    display: block;
    color: inherit;
}
.hlist-cover {
    width: 100px;
    height: 100px;
    position: relative;
    border: 2px solid #6e5828;
    background: #2a2820;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e5828;
    font-size: 2em;
    overflow: hidden;
}
.hlist-cover img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.hlist-item:hover .hlist-cover { border-color: #ad935b; }
.hlist-name {
    font-size: 0.72em;
    font-family: Verdana, sans-serif;
    color: #c8a96e;
    margin-top: 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.hlist-sub {
    font-size: 0.64em;
    font-family: Verdana, sans-serif;
    color: #7a6838;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Movie poster grid ---- */
.movie-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}
.movie-grid-item {
    position: relative;
    flex-shrink: 0;
}
.movie-grid-cover {
    width: 100px;
    height: 150px;
    border: 2px solid #6e5828;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background: #2a2820;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e5828;
    font-size: 2em;
}
.movie-grid-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.movie-grid-item a { display: block; line-height: 0; }
.movie-grid-item a:hover .movie-grid-cover { border-color: #ad935b; }
.movie-grid-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1c1a;
    border: 1px solid #6e5828;
    color: #c8a96e;
    padding: 7px 10px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    z-index: 100;
    pointer-events: none;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.8);
    line-height: 1.6;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}
.movie-grid-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #6e5828;
}
.movie-grid-year { color: #8a7a50; }
.movie-grid-item:hover .movie-grid-tooltip { display: block; }
.movie-poster-rating {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(20,18,16,0.82);
    color: #ad935b;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.62em;
    text-align: center;
    padding: 2px 0;
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* ---- Profile page ---- */
.profile-avatar-large {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border: 3px solid #ad935b;
}
.profile-avatar-placeholder {
    background: #d4c9a8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2em;
    color: #8a7a50;
}
.profile-now-playing {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #533075;
    font-style: italic;
}
.post-content {
    font-size: 0.9em;
    line-height: 1.65;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.post-content p { margin-bottom: 0.75em; }
.post-content p:last-child { margin-bottom: 0; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    font-family: Georgia, 'Times New Roman', serif;
    font-variant: small-caps;
    letter-spacing: 1px;
    color: #2a292b;
    margin: 0.9em 0 0.35em;
    border-bottom: 1px solid #d4c488;
    padding-bottom: 2px;
}
.post-content h1 { font-size: 1.2em; }
.post-content h2 { font-size: 1.05em; }
.post-content h3 { font-size: 0.95em; border-bottom: none; }
.post-content ul, .post-content ol {
    padding-left: 22px;
    margin-bottom: 0.75em;
}
.post-content li { margin-bottom: 0.2em; }
.post-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88em;
    background: #d4c9a8;
    border: 1px solid #b89c60;
    padding: 1px 4px;
}
.post-content pre {
    background: #d4c9a8;
    border: 1px solid #b89c60;
    padding: 9px 12px;
    overflow-x: auto;
    margin-bottom: 0.75em;
}
.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.92em;
}
.post-content blockquote {
    border-left: 3px solid #ad935b;
    margin: 0 0 0.75em 0;
    padding: 4px 0 4px 12px;
    color: #6a5c30;
    font-style: italic;
}
.post-content blockquote p { margin-bottom: 0; }
.post-content hr { border: none; border-top: 1px solid #b89c60; margin: 10px 0; }
.post-content a { color: #533075; }
.post-content a:hover { color: #ad935b; }
.post-content table {
    border-collapse: collapse;
    margin-bottom: 0.75em;
    font-size: 0.9em;
    width: 100%;
}
.post-content th {
    background: #2a292b;
    color: #ad935b;
    padding: 5px 8px;
    text-align: left;
}
.post-content td {
    padding: 4px 8px;
    border-bottom: 1px solid #c8b478;
}
.post-content tr:nth-child(even) td { background: #e8e0c8; }
.post-actions {
    text-align: right;
    margin-top: 9px;
    border-top: 1px solid #d4c488;
    padding-top: 7px;
}
.post-image {
    max-width: 100%;
    display: block;
    margin: 8px 0;
    border: 2px solid #6e5828;
}

/* ---- Comments ---- */
.comments-section {
    border-top: 1px solid #d4c488;
    margin-top: 10px;
    padding-top: 8px;
}
.comments-toggle {
    font-size: 0.72em;
    font-family: Verdana, Geneva, sans-serif;
    color: #6a5c30;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.comments-toggle:hover { color: #2a292b; }
.comments-arrow { font-size: 0.8em; }
.comments-body { padding-top: 10px; }
.comment {
    padding: 7px 0;
    border-bottom: 1px solid #e0d4a8;
}
.comment:last-of-type { border-bottom: none; }
.comment-meta {
    font-size: 0.7em;
    font-family: Verdana, Geneva, sans-serif;
    color: #6a5c30;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.comment-content {
    font-size: 0.88em;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding-left: 2px;
}
.comment-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #c8b478;
}

/* ---- Reactions ---- */
.reactions-outer {
    position: relative;
    padding: 6px 0 2px;
}
.reactions-section {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.emoji-picker-wrap {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 200;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.5);
    border: 2px solid #6e5828;
}
emoji-picker {
    --border-radius: 0;
    --border-color: #9a7e40;
    --background: #e8dfc8;
    --button-hover-background: #d4c9a8;
    --indicator-color: #ad935b;
    --input-border-color: #9a7e40;
    --input-font-color: #2a292b;
    --input-placeholder-color: #8a7a50;
    --input-background: #fffef5;
    --category-button-active-background: #d4c488;
    --emoji-size: 1.35rem;
    --num-columns: 9;
    --font-family: Verdana, Geneva, sans-serif;
    width: 352px;
    height: 340px;
}
button.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #ede5ce;
    border: 1px solid;
    border-color: #d4c488 #9a7e40 #9a7e40 #d4c488;
    color: #4a3f20;
    font-size: 0.82em;
    font-family: Verdana, Geneva, sans-serif;
    cursor: pointer;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
    line-height: 1.4;
}
button.reaction-btn:hover {
    background: #ddd4b0;
    color: #2a292b;
    border-color: #ad935b #6e5828 #6e5828 #ad935b;
}
button.reaction-btn:active {
    border-color: #9a7e40 #d4c488 #d4c488 #9a7e40;
}
button.reaction-btn.reacted {
    background: #c8b86a;
    border-color: #e0d080 #7a6428 #7a6428 #e0d080;
    color: #2a292b;
    font-weight: bold;
}
button.reaction-btn.reacted:hover { background: #b8a850; }
.reaction-count {
    font-size: 0.88em;
    color: inherit;
    opacity: 0.85;
}
button.reaction-add-btn {
    font-size: 1em;
    padding: 2px 7px;
    color: #8a7a50;
    border-color: #c8b478 #9a7e40 #9a7e40 #c8b478;
}
button.reaction-add-btn:hover { color: #2a292b; }

/* ---- Polls ---- */
.poll-section {
    border-top: 1px solid #d4c488;
    margin-top: 10px;
    padding-top: 10px;
}
.poll-question {
    font-size: 0.85em;
    font-weight: bold;
    font-family: Verdana, Geneva, sans-serif;
    color: #2a292b;
    margin-bottom: 8px;
}
.poll-vote-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 7px;
}
.poll-results { margin-bottom: 7px; }
.poll-result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.78em;
    font-family: Verdana, Geneva, sans-serif;
}
.poll-result-label {
    width: 130px;
    flex-shrink: 0;
    color: #2a292b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.poll-result-label.my-vote { font-weight: bold; }
.poll-bar-wrap {
    flex: 1;
    height: 13px;
    background: #d4c9a8;
    border: 1px solid #9a7e40;
}
.poll-bar-fill {
    height: 100%;
    background: #ad935b;
}
.poll-result-pct {
    width: 60px;
    text-align: right;
    color: #6a5c30;
    flex-shrink: 0;
}
.poll-meta {
    font-size: 0.7em;
    font-family: Verdana, Geneva, sans-serif;
    color: #8a7a50;
    font-style: italic;
}

/* ---- Music card ---- */
.music-card-wrap { margin: 10px 0; }
.music-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #1e1c1a;
    border: 2px solid #6e5828;
    border-bottom: none;
    padding: 12px 14px;
}
.music-card-art-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}
.music-card-art {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    border: 1px solid #6e5828;
}
.music-card-art-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2820;
    border: 1px solid #6e5828;
    color: #6e5828;
    font-size: 2em;
}
.music-card-info { flex: 1; min-width: 0; }
.music-card-title {
    font-size: 0.95em;
    font-weight: bold;
    font-variant: small-caps;
    letter-spacing: 1px;
    color: #c8a96e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-card-artist {
    font-size: 0.76em;
    font-family: Verdana, sans-serif;
    color: #8a7a50;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-card-album {
    font-size: 0.7em;
    font-family: Verdana, sans-serif;
    color: #5a4e28;
    font-style: italic;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-card-btns { display: flex; gap: 8px; align-items: center; }
button.music-card-play-btn {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.68em;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border: 2px solid;
    border-color: #f0ead0 #6e5828 #6e5828 #f0ead0;
    background: #ddd0a8;
    color: #2a292b;
    cursor: pointer;
}
button.music-card-play-btn:hover { background: #ad935b; color: #fff; }
.music-card-open-link {
    font-family: Verdana, sans-serif;
    font-size: 0.68em;
    color: #8a7a50;
    text-decoration: none;
    letter-spacing: 0.5px;
}
.music-card-open-link:hover { color: #c8a96e; }
.music-embed {
    border: 2px solid #6e5828;
    border-top: none;
    background: #1a1919;
}
.music-embed iframe {
    display: block;
    width: 100%;
    height: 360px;
    border: none;
}

/* ---- Now-playing / now-watching status cards ---- */
.np-card-wrap { margin-bottom: 10px; }
.np-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #1a1916;
    border: 1px solid #4a3c18;
    padding: 8px 10px;
    border-radius: 0;
}
.np-card-label {
    font-size: 0.62em;
    font-family: Verdana, sans-serif;
    color: #6a5828;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}
.np-card-art {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #4a3c18;
}
.np-card-art-placeholder {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252318;
    border: 1px solid #4a3c18;
    color: #4a3c18;
    font-size: 1.3em;
}
.np-card-info { flex: 1; min-width: 0; }
.np-card-title {
    font-size: 0.82em;
    font-weight: bold;
    color: #c0a060;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}
.np-card-sub {
    font-size: 0.7em;
    font-family: Verdana, sans-serif;
    color: #7a6838;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Now-watching movie picker in the post form */
.now-watching-form {
    border-top: 1px dashed #c8b478;
    margin-top: 10px;
    padding-top: 10px;
}
.now-watching-results {
    margin-top: 6px;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #b89c60;
    background: #f5edd8;
}
.now-watching-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: Verdana, sans-serif;
    border-bottom: 1px solid #d8c898;
}
.now-watching-result-item:last-child { border-bottom: none; }
.now-watching-result-item:hover { background: #eddcb0; }
.now-watching-result-item img {
    width: 28px;
    height: 40px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #b89c60;
}
.now-watching-result-item .nw-name { font-weight: bold; color: #3a2e10; }
.now-watching-result-item .nw-year { color: #8a7040; margin-left: 4px; }

/* ---- Pinned post ---- */
.post.post-pinned {
    background: #f5eccf;
    border-color: #ad935b #f5edd8 #f5edd8 #ad935b;
}
.post-pinned-label {
    display: inline-block;
    font-size: 0.58em;
    font-family: Verdana, Geneva, sans-serif;
    font-variant: normal;
    font-weight: normal;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #7a5a10;
    background: #e8d888;
    border: 1px solid #ad935b;
    padding: 1px 5px;
    margin-left: 8px;
    vertical-align: middle;
}
.post-featured-label {
    display: inline-block;
    font-size: 0.58em;
    font-family: Verdana, Geneva, sans-serif;
    font-variant: normal;
    font-weight: normal;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #3a1f5e;
    background: #d8c8f0;
    border: 1px solid #7a50b0;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ---- Post edit form ---- */
.post-edit-form {
    border-top: 1px dashed #ad935b;
    margin-top: 4px;
    padding-top: 12px;
}

/* ---- Requests table ---- */
.req-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78em;
    font-family: Verdana, Geneva, sans-serif;
}
.req-table th {
    background: #2a292b;
    color: #ad935b;
    text-align: left;
    padding: 7px 9px;
    font-variant: small-caps;
    letter-spacing: 1px;
    font-size: 0.95em;
}
.req-table td {
    padding: 7px 9px;
    border-bottom: 1px solid #c8b478;
    vertical-align: top;
}
.req-table tr:nth-child(even) td { background: #e8e0c8; }
.req-table tr:hover td { background: #ddd4b0; }
.req-table .notes-cell {
    color: #6a5c30;
    font-style: italic;
    font-size: 0.9em;
}

/* ---- Admin tabs ---- */
.tab-bar {
    display: flex;
    border-bottom: 2px solid #ad935b;
    margin-bottom: 18px;
    gap: 4px;
}
.tab-btn {
    background: #ccc0a0;
    border: 2px solid;
    border-color: #f0ead0 #6e5828 #ad935b #f0ead0;
    border-bottom: none;
    padding: 5px 16px;
    cursor: pointer;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    bottom: -2px;
    color: #4a3f20;
}
.tab-btn.active {
    background: #e8dfc8;
    border-bottom: 2px solid #e8dfc8;
    color: #2a292b;
    font-weight: bold;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Misc ---- */
.empty-state {
    text-align: center;
    color: #8a7a50;
    font-style: italic;
    font-size: 0.88em;
    padding: 20px 0;
    font-family: Verdana, sans-serif;
}
.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.section-actions h2 {
    font-size: 0.95em;
    font-variant: small-caps;
    letter-spacing: 2px;
    border-bottom: none;
    margin: 0;
}

/* ---- Chat widget ---- */
#chat-widget {
    position: fixed;
    bottom: 0;
    right: 24px;
    width: 272px;
    z-index: 450;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.76em;
}
#chat-tab {
    background: #2a292b;
    color: #c8a96e;
    border: 2px solid #ad935b;
    border-bottom: none;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    letter-spacing: 0.5px;
}
#chat-tab:hover { background: #383530; }
#chat-chevron { margin-left: auto; font-size: 0.78em; }
#chat-unread {
    background: #ad935b;
    color: #1a1919;
    font-size: 0.82em;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
}
#chat-body {
    background: #141312;
    border: 2px solid #ad935b;
    border-top: 1px solid #3a3528;
    display: flex;
    flex-direction: column;
    height: 320px;
}
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#chat-messages::-webkit-scrollbar { width: 5px; }
#chat-messages::-webkit-scrollbar-track { background: #141312; }
#chat-messages::-webkit-scrollbar-thumb { background: #4a3f20; border-radius: 2px; }
.chat-msg { line-height: 1.55; word-wrap: break-word; }
.chat-msg-time {
    color: #3e3828;
    font-size: 0.88em;
    margin-right: 3px;
    flex-shrink: 0;
}
.chat-msg-author {
    color: #ad935b;
    font-weight: bold;
    margin-right: 2px;
    text-decoration: none;
    cursor: pointer;
}
.chat-msg-author:hover { text-decoration: underline; }
.chat-msg-content { color: #a09070; }
#chat-footer { border-top: 1px solid #2e2c28; flex-shrink: 0; }
#chat-auth-notice {
    padding: 8px;
    color: #5a5040;
    text-align: center;
}
#chat-auth-notice a { color: #7a6840; }
#chat-auth-notice a:hover { color: #ad935b; }
#chat-input-row { display: flex; }
#chat-input {
    flex: 1;
    background: #0e0d0c;
    border: none;
    color: #c8a96e;
    padding: 8px 9px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.92em;
    outline: none;
    min-width: 0;
}
#chat-input::placeholder { color: #3a3525; }
#chat-input:focus { background: #111009; }
#chat-send-btn {
    background: #2a292b;
    border: none;
    border-left: 1px solid #2e2c28;
    color: #ad935b;
    padding: 8px 13px;
    cursor: pointer;
    font-size: 0.95em;
    letter-spacing: 0;
    text-transform: none;
    flex-shrink: 0;
}
#chat-send-btn:hover { background: #ad935b; color: #1a1919; }

/* ---- Navidrome Stats ---- */
.stats-play-count-badge {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: Georgia, 'Times New Roman', serif;
}
.stats-play-icon { font-size: 1.3em; color: #ad935b; }
#stats-total-plays {
    font-size: 1.6em;
    font-weight: bold;
    color: #2a292b;
    letter-spacing: -1px;
}
.stats-play-label {
    font-size: 0.82em;
    color: #8a7a50;
    font-variant: small-caps;
    letter-spacing: 1px;
}
.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.stats-list-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #e8deb4;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.84em;
    line-height: 1.4;
}
.stats-list-item:last-child { border-bottom: none; }
.stats-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2a292b;
}
.stats-item-meta {
    flex-shrink: 0;
    color: #8a7a50;
    font-size: 0.9em;
    white-space: nowrap;
}
.stats-toggle-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    cursor: pointer;
    color: #4a3f20;
}
.stats-toggle-label input[type="checkbox"] { cursor: pointer; }

/* ---- Movies page ---- */
.movies-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}
.movies-search-bar input {
    flex: 1;
    padding: 6px 10px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    border: 1px solid #9a7e40;
    background: #f5edd8;
    color: #2a292b;
}
.movies-pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    color: #4a3f20;
}

/* ---- Movie details page ---- */
.movie-detail-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.movie-detail-poster {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border: 2px solid #6e5828;
    flex-shrink: 0;
    background: #2a2820;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e5828;
    font-size: 3em;
    overflow: hidden;
}
.movie-detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.movie-detail-info { flex: 1; min-width: 0; }
.movie-detail-title {
    font-size: 1.2em;
    font-variant: small-caps;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.movie-detail-meta {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.78em;
    color: #6a5c30;
    margin-bottom: 10px;
}
.movie-detail-overview {
    font-size: 0.88em;
    line-height: 1.6;
    color: #2a292b;
    margin-bottom: 12px;
}
.play-btn {
    display: inline-block;
    background: #3a3020;
    color: #ad935b;
    border: 1px solid #ad935b;
    padding: 7px 16px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    text-decoration: none;
    letter-spacing: 1px;
    cursor: pointer;
}
.play-btn:hover { background: #ad935b; color: #1a1919; }

/* ---- Star rating widget ---- */
.star-rating-widget {
    display: flex;
    gap: 3px;
    align-items: center;
    margin: 6px 0;
}
.star-rating-widget .star {
    font-size: 1.5em;
    cursor: pointer;
    color: #6e5828;
    line-height: 1;
    user-select: none;
    transition: color 0.1s;
}
.star { color: #6e5828; }
.star.full, .star[data-fill="full"]  { color: #ad935b; -webkit-text-fill-color: #ad935b; }
.star.half, .star[data-fill="half"]  {
    background: linear-gradient(to right, #ad935b 50%, #6e5828 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.star[data-fill="empty"] { color: #6e5828; -webkit-text-fill-color: #6e5828; }
.star-rating-widget .star:hover,
.star-rating-widget .star.hover,
.star[data-fill="hover"] { color: #d4a840; -webkit-text-fill-color: #d4a840; background: none; }
.star-rating-clear {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #8a7a50;
    cursor: pointer;
    margin-left: 6px;
    text-decoration: underline;
}
.star-rating-clear:hover { color: #c0392b; }
.rating-summary {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    color: #4a3f20;
    margin-bottom: 6px;
}
.rating-avg-big {
    font-size: 1.6em;
    font-family: Georgia, serif;
    color: #ad935b;
    margin-right: 6px;
}

/* ---- Movie comments ---- */
.movie-comment {
    border-top: 1px solid #c8b880;
    padding: 10px 0 6px;
}
.movie-comment-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.movie-comment-author {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.8em;
    font-weight: bold;
    color: #4a3f20;
    text-decoration: none;
}
.movie-comment-author:hover { text-decoration: underline; }
.movie-comment-date {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #8a7a50;
}
.spoiler-badge {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.68em;
    background: #6e5828;
    color: #e8dfc8;
    padding: 1px 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.movie-comment-body {
    font-size: 0.88em;
    line-height: 1.6;
}
.movie-comment-body.spoiler-hidden {
    filter: blur(4px);
    cursor: pointer;
    user-select: none;
}
.movie-comment-body.spoiler-hidden:hover { filter: blur(2px); }
.spoiler-reveal-hint {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #8a7a50;
    font-style: italic;
    margin-top: 2px;
}
.movie-comment-delete {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.68em;
    color: #8a7a50;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-left: auto;
}
.movie-comment-delete:hover { color: #c0392b; }
.comment-form { margin-top: 14px; }
.comment-form textarea {
    width: 100%;
    min-height: 70px;
    padding: 7px 9px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 0.9em;
    border: 1px solid #9a7e40;
    background: #f5edd8;
    color: #2a292b;
    resize: vertical;
    display: block;
    margin-bottom: 6px;
}
.comment-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.watchlist-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #3a7bd5;
    color: #fff;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    pointer-events: none;
    z-index: 10;
    line-height: 1;
    border: 2px solid #1a1510;
    box-sizing: border-box;
}
.watchlist-btn {
    display: inline-block;
    background: transparent;
    color: #3a7bd5;
    border: 1px solid #3a7bd5;
    padding: 6px 14px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    cursor: pointer;
    letter-spacing: 0.5px;
    margin-top: 8px;
}
.watchlist-btn:hover { opacity: 0.75; }
.watchlist-btn.active { background: #3a7bd5; color: #fff; }

.spoiler-check-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.78em;
    color: #4a3f20;
    cursor: pointer;
}

/* ---- Movie carousel ---- */
.movie-carousel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    min-height: 180px;
}
.carousel-btn {
    background: #3a3020;
    color: #ad935b;
    border: 1px solid #6e5828;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9em;
    flex-shrink: 0;
    align-self: center;
}
.carousel-btn:hover:not(:disabled) { background: #ad935b; color: #1a1919; }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-slide {
    flex: 1;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.carousel-poster {
    width: 110px;
    height: 165px;
    flex-shrink: 0;
    border: 2px solid #6e5828;
    background: #2a2820;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e5828;
    font-size: 2.5em;
    overflow: hidden;
    transition: border-color 0.15s;
}
.carousel-slide:hover .carousel-poster { border-color: #ad935b; }
.carousel-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-info { flex: 1; min-width: 0; padding-top: 4px; }
.carousel-title {
    font-size: 1.05em;
    font-variant: small-caps;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
    color: #2a292b;
}
.carousel-meta {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.72em;
    color: #6a5c30;
    margin-bottom: 8px;
}
.carousel-rating {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.82em;
    color: #4a3f20;
    margin-bottom: 10px;
}
.carousel-avg {
    font-size: 1.2em;
    font-family: Georgia, serif;
    color: #ad935b;
    margin-right: 4px;
}
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #9a7e40;
    cursor: pointer;
    border: none;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s;
}
.carousel-dot.active { background: #ad935b; }
