/* Geocities Whimsigoth Social Media Styling */

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

:root {
    --void-black: #0a0a0f;
    --deep-purple: #2d1b3d;
    --mystic-purple: #4a2c5e;
    --cosmic-purple: #6b4691;
    --ethereal-lavender: #9d7cb8;
    --blood-red: #8b1538;
    --moon-silver: #c0c0d8;
    --star-gold: #d4af37;
    --shadow-grey: #1a1a24;
    --crystal-blue: #72cfff;
}

@font-face {
    font-family: 'Comic Sans MS';
    src: local('Comic Sans MS'), local('Comic Sans');
    font-display: swap;
}

html {
    overflow-x: hidden;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: var(--void-black);
    color: var(--moon-silver);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.ambient-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Mystical animated background */
.mystical-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url('night-sky.gif'),
        radial-gradient(circle at 20% 50%, var(--deep-purple) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--mystic-purple) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, var(--blood-red) 0%, transparent 40%),
        linear-gradient(180deg, rgba(10, 10, 15, 0.85) 0%, rgba(26, 26, 36, 0.85) 100%);
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: auto, cover, cover, cover, cover;
    z-index: -1;
    animation: cosmicShift 20s ease-in-out infinite alternate;
}

@keyframes cosmicShift {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

/* COMIC SANS HEADER - The Sacred Font */
.main-header {
    background: #4b2142;
    border-bottom: 3px solid var(--star-gold);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(107, 70, 145, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: headerGlow 3s ease-in-out infinite alternate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@keyframes headerGlow {
    from { box-shadow: 0 4px 20px rgba(107, 70, 145, 0.5); }
    to { box-shadow: 0 4px 30px rgba(212, 175, 55, 0.6); }
}

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

.site-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.title-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.site-title {
    font-family: 'Comic Sans MS', 'Comic Sans', 'Comic Neue', 'Chalkboard SE', 'Marker Felt', cursive !important;
    font-size: 3.5rem;
    color: var(--star-gold);
    text-shadow:
        2px 2px 0 var(--blood-red),
        4px 4px 0 var(--void-black),
        0 0 20px var(--cosmic-purple);
    margin-bottom: 10px;
    letter-spacing: 2px;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.tagline {
    font-family: Georgia, serif;
    font-style: italic;
    color: var(--ethereal-lavender);
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--cosmic-purple);
}

.user-nav {
    position: static;
    align-self: flex-end;
    display: flex;
    gap: 10px;
}
.nav-welcome {
    color: var(--star-gold);
    margin-right: 6px;
    display: flex;
    align-items: center;
    font-weight: bold;
}
.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.nav-badge {
    background: var(--crystal-blue);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(114, 207, 255, 0.6);
}

/* Container and Layout */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    gap: 20px;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr;
    }
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 12px;
        gap: 16px;
        margin: 20px auto;
    }
    .left-sidebar {
        order: 2;
    }
    .feed-container {
        order: 1;
    }
    .card {
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .post-card {
        padding: 16px;
    }
    .post-footer {
        flex-wrap: wrap;
    }
    .post-avatar {
        width: 40px;
        height: 40px;
    }
    .comment-avatar {
        width: 28px;
        height: 28px;
    }
    .main-header {
        padding: 16px;
    }
    .user-nav {
        position: static;
        margin-top: 12px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .site-title-row {
        gap: 6px;
        flex-wrap: nowrap;
    }
    .title-icon {
        width: 28px;
        height: 28px;
    }
    .site-title {
        font-size: clamp(1.5rem, 7vw, 2.8rem);
        margin-bottom: 6px;
        letter-spacing: 0.5px;
        white-space: nowrap;
    }
    .tagline {
        font-size: 1rem;
    }
    .card h2 {
        font-size: 1.15rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .feed-header h2 {
        font-size: 1.6rem;
        white-space: normal;
    }
    .compose-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .compose-card textarea {
        padding: 12px;
    }
    .btn-primary {
        width: 100%;
        padding: 12px 16px;
    }
    .rule-hints {
        margin-right: 0;
    }
    .heading-nowrap {
        white-space: normal;
    }
    .image-upload-label {
        padding: 10px 12px;
    }
    .image-preview-container {
        max-width: 100%;
    }
}

/* Mystical Cards */
.card {
    background: #4b2142;
    border: 2px solid var(--cosmic-purple);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(107, 70, 145, 0.3);
    position: relative;
    overflow: hidden;
}

.card::before {
    display: none;
}

.card h2 {
    font-family: Georgia, serif;
    color: var(--star-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px var(--cosmic-purple);
    border-bottom: 1px solid var(--cosmic-purple);
    padding-bottom: 10px;
}

.heading-nowrap {
    display: inline-block;
    white-space: nowrap;
}

.mystical-card {
    border-image: linear-gradient(45deg, var(--cosmic-purple), var(--blood-red), var(--cosmic-purple)) 1;
}

.character-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 20px;
}

.character-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

/* Rules List */
.rules-date {
    text-align: center;
    font-size: 0.9rem;
    color: var(--ethereal-lavender);
    margin-bottom: 12px;
}

.rules-list {
    max-height: 400px;
    overflow-y: auto;
}

.rule-item {
    background: rgba(42, 27, 61, 0.6);
    border-left: 3px solid var(--star-gold);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.rule-name {
    color: var(--star-gold);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.rule-description {
    color: var(--ethereal-lavender);
    font-size: 0.9rem;
    font-style: italic;
}

.rules-archive-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    color: var(--star-gold);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.rules-archive-link:hover {
    color: var(--ethereal-lavender);
}

.archive-rule-item .rule-date {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--ethereal-lavender);
}

.archive-container {
    grid-template-columns: 1fr;
    max-width: 900px;
}

.archive-card {
    width: 100%;
}

.archive-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.title-tome {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.archive-intro {
    text-align: center;
    margin-bottom: 16px;
}

.archive-header .user-nav {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* User Info Card */
#userInfo {
    text-align: center;
}

.username-display {
    font-size: 1.4rem;
    color: var(--star-gold);
    margin-bottom: 10px;
    font-weight: bold;
}

.focus-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
    margin-bottom: 8px;
}

.user-card-heading {
    font-size: 0.8rem;
    color: var(--star-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.focus-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
}

.focus-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.focus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.focus-image-large {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
}

.focus-name {
    font-size: 0.95rem;
    color: var(--star-gold);
    font-weight: bold;
}

.focus-description {
    font-size: 0.8rem;
    color: var(--ethereal-lavender);
    font-style: italic;
}

.runes-display {
    font-size: 2rem;
    color: var(--ethereal-lavender);
    margin: 15px 0;
}

.runes-label {
    display: block;
}

.streak-bonus {
    color: #6bdc6b;
    font-weight: bold;
    margin-left: 6px;
    font-size: 0.9em;
}

/* Compose Card */
.compose-card textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(10, 10, 15, 0.8);
    border: 2px solid var(--cosmic-purple);
    border-radius: 8px;
    color: var(--moon-silver);
    padding: 15px;
    font-family: Georgia, serif;
    font-size: 1rem;
    resize: vertical;
}

.compose-card textarea:focus {
    outline: none;
    border-color: var(--star-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.rule-hints {
    flex: 1;
    margin-right: 15px;
    font-size: 0.85rem;
    color: var(--ethereal-lavender);
}

/* Feed */
.feed-header {
    text-align: center;
    margin-bottom: 20px;
}

.feed-header h2 {
    font-family: Georgia, serif;
    color: var(--star-gold);
    font-size: 2rem;
    text-shadow: 0 0 15px var(--cosmic-purple);
    white-space: nowrap;
}

.feed-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Post Card - Mastodon Style */
.post-card {
    background: linear-gradient(135deg, var(--shadow-grey) 0%, rgba(45, 27, 61, 0.8) 100%);
    border: 2px solid var(--mystic-purple);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.post-card:hover {
    border-color: var(--star-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cosmic-purple);
    flex-wrap: wrap;
}

.post-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--blood-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 12px;
    border: 2px solid var(--star-gold);
    flex-shrink: 0;
}

.post-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.post-username {
    color: var(--star-gold);
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.post-focus {
    display: inline-flex;
    align-items: center;
}

.post-focus .focus-icon {
    width: 18px;
    height: 18px;
}

.post-runes {
    color: var(--ethereal-lavender);
    font-weight: normal;
    font-size: 0.95rem;
    white-space: nowrap;
}

.post-runes .streak-bonus {
    margin-left: 4px;
    font-size: 0.85em;
}

.post-timestamp {
    color: var(--ethereal-lavender);
    font-size: 0.85rem;
    font-style: italic;
}

.btn-delete {
    background: transparent;
    color: var(--blood-red);
    border: 1px solid var(--blood-red);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: var(--blood-red);
    color: var(--star-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.post-content {
    color: var(--moon-silver);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.ghost-word {
    color: #c9f2ff;
    text-shadow: 0 0 6px rgba(201, 242, 255, 0.8), 0 0 12px rgba(107, 70, 145, 0.8);
    filter: drop-shadow(0 0 4px rgba(201, 242, 255, 0.7));
    font-weight: 600;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(107, 70, 145, 0.3);
}

/* Comments */
.comments-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(107, 70, 145, 0.6);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--ethereal-lavender);
    font-size: 0.95rem;
}

.comment-count {
    background: rgba(107, 70, 145, 0.3);
    border: 1px solid var(--cosmic-purple);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--star-gold);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(26, 26, 36, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(107, 70, 145, 0.4);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--cosmic-purple), var(--blood-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid var(--star-gold);
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.comment-username {
    color: var(--star-gold);
    font-weight: bold;
}

.comment-timestamp {
    color: var(--ethereal-lavender);
    font-style: italic;
}

.comment-text {
    color: var(--moon-silver);
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.comment-composer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input {
    width: 100%;
    background: rgba(10, 10, 15, 0.7);
    border: 1px solid var(--cosmic-purple);
    border-radius: 6px;
    color: var(--moon-silver);
    padding: 10px;
    font-family: Georgia, serif;
    resize: vertical;
    min-height: 60px;
}

.comment-input:focus {
    outline: none;
    border-color: var(--star-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.comment-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-comment {
    padding: 6px 14px;
    font-size: 0.9rem;
}

.comment-login-hint {
    margin-top: 8px;
    color: var(--ethereal-lavender);
    font-size: 0.8rem;
    font-style: italic;
    display: none;
}

.rules-badge {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background: var(--cosmic-purple);
    color: var(--star-gold);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid var(--star-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: 2px solid var(--star-gold);
    border-radius: 8px;
    font-family: Georgia, serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cosmic-purple), var(--blood-red));
    color: var(--star-gold);
    text-shadow: 0 0 5px var(--void-black);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blood-red), var(--cosmic-purple));
    box-shadow: 0 0 15px var(--star-gold);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--star-gold);
}

.btn-secondary:hover {
    background: var(--mystic-purple);
    box-shadow: 0 0 10px var(--cosmic-purple);
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary.btn-disabled:hover {
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 40px 0;
}

.modal-content {
    position: relative;
    margin: 0 auto;
    width: 90%;
    max-width: 500px;
    animation: modalAppear 0.3s ease;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
.modal-large {
    max-width: 900px;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: var(--star-gold);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--blood-red);
    text-shadow: 0 0 10px var(--star-gold);
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-message {
    margin: 12px 0 20px;
    color: var(--moon-silver);
    line-height: 1.5;
}

.modal input {
    padding: 12px;
    background: rgba(10, 10, 15, 0.8);
    border: 2px solid var(--cosmic-purple);
    border-radius: 8px;
    color: var(--moon-silver);
    font-family: Georgia, serif;
    font-size: 1rem;
}

.modal input:focus {
    outline: none;
    border-color: var(--star-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.chat-subtitle,
.notification-subtitle {
    margin-top: 4px;
}
.notification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 18px;
}
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.notification-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
}
.notification-item.unread {
    border-color: rgba(114, 207, 255, 0.6);
    box-shadow: 0 0 12px rgba(114, 207, 255, 0.3);
}
.notification-title {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 6px;
}
.notification-time {
    font-size: 0.8rem;
    color: var(--ethereal-lavender);
}
.notification-detail {
    font-size: 0.95rem;
}
.notification-tag {
    margin-top: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--crystal-blue);
}
.chat-tabs {
    display: flex;
    gap: 10px;
    margin: 16px 0 10px;
}
.chat-tab {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 6px 14px;
    background: transparent;
    color: var(--ethereal-lavender);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.chat-tab.active {
    background: var(--crystal-blue);
    color: #fff;
    box-shadow: 0 0 12px rgba(114, 207, 255, 0.4);
}
.chat-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 14px;
    min-height: 360px;
}
.chat-thread-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}
.chat-thread {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.chat-thread.active {
    border-color: rgba(114, 207, 255, 0.6);
    box-shadow: 0 0 10px rgba(114, 207, 255, 0.3);
}
.chat-thread-avatar {
    font-size: 1.4rem;
}
.chat-thread-avatar.large {
    font-size: 2rem;
}
.chat-thread-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.chat-thread-title {
    font-weight: bold;
}
.chat-thread-subtitle {
    font-size: 0.8rem;
    color: var(--ethereal-lavender);
}
.thread-badge {
    background: var(--crystal-blue);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.7rem;
}
.chat-thread-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-thread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-thread-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-messages {
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 12px;
    overflow-y: auto;
    max-height: 320px;
}
.chat-message {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}
.chat-message.self {
    background: rgba(114, 207, 255, 0.2);
    align-self: flex-end;
}
.chat-message-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ethereal-lavender);
    margin-bottom: 6px;
}
.chat-composer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.chat-composer input {
    flex: 1 1 180px;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: inherit;
}
.chat-composer #chatRecipientInput {
    flex: 0 0 220px;
    max-width: 220px;
}
.chat-composer #chatMessageInput {
    flex: 2 1 240px;
}
.chat-composer input:focus {
    outline: none;
    border-color: var(--crystal-blue);
    box-shadow: 0 0 10px rgba(114, 207, 255, 0.5);
}

@media (max-width: 768px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }
    .chat-thread-list {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
    }
    .chat-thread {
        min-width: 200px;
    }
}

.award-modal {
    display: none;
    position: fixed;
    z-index: 1200;
    inset: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.award-card {
    position: relative;
    background: linear-gradient(145deg, rgba(45, 27, 61, 0.98), rgba(26, 19, 46, 0.95));
    border: 2px solid var(--star-gold);
    border-radius: 16px;
    padding: 26px;
    width: min(520px, 92vw);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(212, 175, 55, 0.25);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.award-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: 1px solid var(--star-gold);
    color: var(--star-gold);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.award-close:hover {
    color: var(--blood-red);
    border-color: var(--blood-red);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

.award-card-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.award-crystal-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.35));
}

.crystal-award-image {
    width: min(240px, 60vw);
    height: auto;
    max-height: 240px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.35));
}

.award-crystal-name {
    font-size: 1.6rem;
    color: var(--star-gold);
    font-weight: bold;
    text-shadow: 0 0 12px rgba(107, 70, 145, 0.5);
}

.award-crystal-subtitle {
    color: var(--ethereal-lavender);
    font-size: 0.95rem;
    margin-top: 6px;
}

.rune-award-details {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rune-award-detail {
    color: var(--ethereal-lavender);
    font-size: 0.9rem;
}

.rune-award-detail.streak-highlight {
    color: #6bdc6b;
    font-weight: bold;
}

.invite-output {
    margin-top: 20px;
    padding: 15px;
    background: rgba(26, 19, 46, 0.7);
    border: 1px solid var(--cosmic-purple);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invite-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invite-label {
    color: var(--ethereal-lavender);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.invite-value {
    color: var(--star-gold);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.invite-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.invite-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--moon-silver);
    font-size: 0.9rem;
}

.invite-toggle input {
    accent-color: var(--cosmic-purple);
}

.error-message {
    color: var(--blood-red);
    font-size: 0.9rem;
    padding: 8px;
    background: rgba(139, 21, 56, 0.2);
    border-radius: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Decorative Elements */
.decorative-divider {
    text-align: center;
    color: var(--cosmic-purple);
    margin: 15px 0;
    font-size: 1.2rem;
}

.gothic-text {
    color: var(--moon-silver);
    line-height: 1.6;
    margin-bottom: 10px;
}

.small-text {
    font-size: 0.8rem;
    color: var(--ethereal-lavender);
    font-style: italic;
}

.invite-description {
    margin-bottom: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(42, 27, 61, 0.4);
    border-radius: 5px;
}

.rune-icon {
    height: 1em;
    width: auto;
    vertical-align: -0.15em;
    margin: 0 4px;
}

.inline-crystal-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

.post-username .inline-crystal-row {
    margin-left: 4px;
}

#userInfo .inline-crystal-row {
    justify-content: center;
    margin: 8px 0;
}

.crystal-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    margin: 0 4px;
    object-fit: contain;
}

.inline-crystal-row .crystal-icon {
    margin: 0;
}

.dinosaur-icon {
    font-size: 1.5rem;
}

/* Footer */
.mystical-footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--void-black) 0%, var(--deep-purple) 100%);
    border-top: 2px solid var(--star-gold);
    margin-top: 50px;
    color: var(--ethereal-lavender);
}

/* Loading state */
.loading {
    text-align: center;
    color: var(--ethereal-lavender);
    font-style: italic;
    padding: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--void-black);
}

::-webkit-scrollbar-thumb {
    background: var(--cosmic-purple);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--star-gold);
}

/* Logout button */
.btn-logout {
    background: transparent;
    color: var(--blood-red);
    border: 2px solid var(--blood-red);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: Georgia, serif;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--blood-red);
    color: var(--star-gold);
    box-shadow: 0 0 10px var(--blood-red);
}

/* Image Upload Section */
.image-upload-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(10, 10, 15, 0.6);
    border: 2px dashed var(--cosmic-purple);
    border-radius: 8px;
    color: var(--ethereal-lavender);
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

.image-upload-label:hover {
    border-color: var(--star-gold);
    color: var(--star-gold);
    background: rgba(107, 70, 145, 0.2);
}

.upload-icon {
    font-size: 1.2rem;
}

.upload-text {
    font-family: Georgia, serif;
    font-size: 0.95rem;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    max-width: 300px;
}

.image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid var(--cosmic-purple);
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    background: var(--blood-red);
    color: var(--star-gold);
    border: 2px solid var(--star-gold);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: var(--star-gold);
    color: var(--blood-red);
    transform: scale(1.1);
}

/* Post Images in Feed */
.post-image-container {
    margin: 12px 0;
}

.post-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    border: 2px solid var(--mystic-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.post-image:hover {
    border-color: var(--star-gold);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transform: scale(1.01);
}

/* Image Modal */
.image-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.image-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    border: 3px solid var(--star-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--star-gold);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-modal-close:hover {
    color: var(--blood-red);
    text-shadow: 0 0 15px var(--star-gold);
    transform: scale(1.2);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    background: var(--shadow-grey);
    border: 2px solid var(--cosmic-purple);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(107, 70, 145, 0.3);
    color: var(--moon-silver);
    font-family: Georgia, 'Times New Roman', serif;
    min-width: 280px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.2rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-success {
    border-color: #2d7a2d;
}

.toast-success .toast-icon {
    background: #2d7a2d;
    color: #90ee90;
}

.toast-error {
    border-color: var(--blood-red);
}

.toast-error .toast-icon {
    background: var(--blood-red);
    color: #ffb3b3;
}

.toast-warning {
    border-color: var(--star-gold);
}

.toast-warning .toast-icon {
    background: #7a6a2d;
    color: var(--star-gold);
}

.toast-info {
    border-color: var(--cosmic-purple);
}

.toast-info .toast-icon {
    background: var(--cosmic-purple);
    color: var(--ethereal-lavender);
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
}

/* Aura Button */
.aura-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--cosmic-purple);
    border-radius: 16px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--ethereal-lavender);
    font-family: Georgia, serif;
    font-size: 0.9rem;
}

.aura-button:hover {
    border-color: var(--star-gold);
    background: rgba(107, 70, 145, 0.3);
    transform: scale(1.05);
}

.aura-button.has-aura {
    border-color: var(--star-gold);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(107, 70, 145, 0.3));
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.aura-button.has-aura .aura-icon {
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.6));
}

.aura-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.aura-count {
    color: var(--star-gold);
    font-weight: bold;
    min-width: 12px;
    text-align: center;
}

.aura-button-small {
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 12px;
}

.aura-button-small .aura-icon {
    width: 14px;
    height: 14px;
}

.aura-button-small .aura-count {
    font-size: 0.8rem;
}

/* Post footer layout update */
.post-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Comment actions */
.comment-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 6px;
}

/* Crystals label in user card */
.crystals-label {
    display: block;
    margin-top: 8px;
}

.post-crystals {
    font-size: 0.85rem;
    color: var(--ethereal-lavender);
}
