/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f1e8;
    color: #1f2430;
    transition: background 0.3s, color 0.3s;
}

.dark-mode body {
    background: #0d0f14;
    color: #e8ecf5;
}

.top-bar {
    background: #d6c9ae;
    padding: 10px 0;
    border-bottom: 2px solid #b8a888;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .top-bar {
    background: #161821;
    border-bottom-color: #232635;
}

.top-bar-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-img {
    height: 28px;
    width: auto;
    display: block;
    transition: filter 0.3s;
    transform: translateY(-2px);
}

.dark-mode body .logo-img {
    filter: brightness(1.2);
}

.top-bar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-chip {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #b8a888;
    color: #5a4a3a;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.profile-chip:hover {
    background: #f0f0f0;
}

.dev-badge {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    position: relative;
    top: -3px;
    margin-left: px;
    object-fit: contain;
}

.dark-mode body .profile-chip {
    background: #3a3a3a;
    border-color: #4a4a4a;
    color: #e0e0e0;
}

.dark-mode body .profile-chip:hover {
    background: #4a4a4a;
}

.dark-mode body .dev-badge {
    filter: brightness(0.8);
}

.profile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #357abd;
    object-fit: cover;
    display: inline-block;
}

.search-box {
    padding: 5px 10px;
    border: 1px solid #c9d1e0;
    border-radius: 3px;
    width: 200px;
    background: #fff;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .search-box {
    background: #10131b;
    border-color: #222738;
    color: #e8ecf5;
}

.btn {
    padding: 6px 15px;
    background: #fff;
    border: 1px solid #c9d1e0;
    color: #1f2430;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn:hover {
    background: #f0f0f0;
}

.dark-mode body .btn {
    background: #10131b;
    border-color: #222738;
    color: #e8ecf5;
}

.dark-mode body .btn:hover {
    background: #232a39;
}

.theme-toggle {
    padding: 6px 15px;
    background: #4a90e2;
    border: 1px solid #357abd;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: #4a3a2a;
}

.dark-mode body .theme-toggle {
    background: #5aa4ff;
    border-color: #3e7cc9;
    color: #0f1115;
}

.dark-mode body .theme-toggle:hover {
    background: #6ab2ff;
}

.navbar {
    background: #1f2430;
    border-bottom: 1px solid #151821;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .navbar {
    background: #11141b;
    border-bottom-color: #181c25;
}

.navbar-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-size: 14px;
}

.navbar a:hover,
.navbar a.active {
    background: #555;
}

.container {
    max-width: 1080px;
    margin: 15px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    gap: 15px;
}

.layout-simple .container {
    grid-template-columns: 1fr;
}

.sidebar {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 10px;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .sidebar {
    background: #141822;
    border-color: #272d3d;
}

.sidebar-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: border-color 0.3s;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.dark-mode body .sidebar-section {
    border-bottom-color: #3a3a3a;
}

.sidebar-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #4a90e2;
    font-size: 13px;
}

.profile-box {
    text-align: center;
}

.profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 3px;
    background: #4a90e2;
    margin: 0 auto 8px;
    border: 2px solid #357abd;
}

.username {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
}

.user-stats {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
}

.menu-list {
    list-style: none;
}

.menu-list li {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px dotted #ddd;
}

.menu-list li:last-child {
    border-bottom: none;
}

.menu-list a {
    color: #4a90e2;
    text-decoration: none;
}

.menu-list a:hover {
    text-decoration: underline;
}

.main-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.layout-simple .main-feed {
    grid-template-columns: 1fr;
}

.post-box {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 12px;
    grid-column: 1 / -1;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .post-box {
    background: #141822;
    border-color: #272d3d;
}

.post-box-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 13px;
}

.post-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #b8a888;
    font-family: Arial, sans-serif;
    font-size: 13px;
    resize: vertical;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.dark-mode body .post-textarea {
    background: #1a1a1a;
    border-color: #272d3d;
    color: #e0e0e0;
}

.post-actions {
    margin-top: 8px;
    text-align: right;
}

.post-card {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 12px;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .post-card {
    background: #141822;
    border-color: #272d3d;
}

.post-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    transition: border-color 0.3s;
}

.dark-mode body .post-header {
    border-bottom-color: #3a3a3a;
}

.post-profile-pic {
    width: 32px;
    height: 32px;
    border: 1px solid #b8a888;
    border-radius: 3px;
    object-fit: cover;
    display: inline-block;
}

.post-info {
    flex: 1;
}

.post-user {
    font-weight: bold;
    font-size: 12px;
    color: #4a90e2;
    text-decoration: none;
}

.post-user:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 10px;
    color: #999;
}

.post-image {
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    margin: 8px 0;
    flex: 1;
}

.post-footer {
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-size: 11px;
    color: #666;
    transition: border-color 0.3s;
}

.dark-mode body .post-footer {
    border-top-color: #3a3a3a;
}

.post-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.post-links a {
    color: #4a90e2;
    text-decoration: none;
}

.post-links a:hover {
    text-decoration: underline;
}

.news-bar {
    display: none !important;
}

.dark-mode body .news-bar {
    display: none !important;
}


.news-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
    font-size: 12px;
    color: #666;
    transition: color 0.3s;
}

.dark-mode body .news-content {
    color: #c0c0a0;
}

.news-label {
    font-weight: bold;
    color: #f39c12;
    margin-right: 10px;
}

.discord-btn {
    padding: 6px 15px;
    background: #5865F2;
    border: 1px solid #4752C4;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.discord-btn:hover {
    background: #4752C4;
}

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 10px;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .widget {
    background: #141822;
    border-color: #272d3d;
}

.widget-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 13px;
    color: #4a90e2;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 5px;
    transition: border-color 0.3s;
}

.dark-mode body .widget-title {
    border-bottom-color: #3a3a3a;
}

.trending-item {
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 12px;
    transition: border-color 0.3s;
}

.trending-item:last-child {
    border-bottom: none;
}

.dark-mode body .trending-item {
    border-bottom-color: #3a3a3a;
}

.trending-tag {
    font-weight: bold;
    color: #333;
}

.trending-count {
    color: #999;
    font-size: 11px;
}

.user-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
    align-items: center;
}

.user-item:last-child {
    border-bottom: none;
}

.user-thumb {
    width: 32px;
    height: 32px;
    background: #fa709a;
    border: 1px solid #b8a888;
    border-radius: 3px;
}

.user-item-info {
    flex: 1;
    font-size: 12px;
}

.user-item-name {
    font-weight: bold;
    color: #4a90e2;
}

.user-item-meta {
    color: #999;
    font-size: 11px;
}

.small-btn {
    padding: 3px 8px;
    background: #4a90e2;
    color: #fff;
    border: 1px solid #357abd;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
}

.small-btn:hover {
    background: #357abd;
}

/* New social/server UI helpers */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    grid-column: 1 / -1;
}

.layout-simple .card-grid {
    grid-template-columns: 1fr;
}

.rooms-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.layout-simple .rooms-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.room-card,
.event-card,
.people-card,
.photo-card,
.server-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.3s, border-color 0.3s;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.dark-mode body .room-card,
.dark-mode body .event-card,
.dark-mode body .people-card,
.dark-mode body .photo-card,
.dark-mode body .server-card {
    background: #141822;
    border-color: #272d3d;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.room-thumb {
    width: 100%;
    height: 160px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    overflow: hidden;
}

.dark-mode body .room-thumb {
    border-color: #272d3d;
}

.room-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-title {
    font-weight: bold;
    font-size: 14px;
    color: #1b1d24;
}

.dark-mode body .card-title {
    color: #f3f5ff;
}

.card-meta {
    font-size: 11px;
    color: #777;
}

.status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e7f6ea;
    color: #2d7a3e;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #bfe5c9;
}

.status-pill.offline {
    background: #f8e7e7;
    color: #8c2a2a;
    border-color: #e6c0c0;
}

.tag-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 2px 6px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 10px;
    color: #666;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}

.server-banner {
    background: #fff;
    border: 1px solid #c9d1e0;
    padding: 12px;
    grid-column: 1 / -1;
}

.dark-mode body .server-banner {
    background: #151821;
    border-color: #222738;
}

.banner-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
}

.photo-thumb {
    width: 100%;
    height: 160px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
}

.post-feed {
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
}

.people-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    grid-column: 1 / -1;
}

.pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.pager-info {
    font-size: 12px;
    color: #666;
}

.pager .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.people-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dddddd;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.dark-mode body .people-list-item {
    background: #141822;
    border-color: #272d3d;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.people-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #357abd;
    flex: 0 0 auto;
    object-fit: cover;
}

.people-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.people-name {
    font-size: 13px;
    font-weight: bold;
    color: #4a90e2;
    text-decoration: none;
}

.people-name:hover {
    text-decoration: underline;
}

.people-meta {
    font-size: 11px;
    color: #777;
}

.profile-hero {
    background: #ffffff;
    border: 1px solid #b8a888;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.dark-mode body .profile-hero {
    background: #141822;
    border-color: #272d3d;
    box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}

.profile-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 2px solid #357abd;
    object-fit: cover;
}

.profile-title {
    font-size: 16px;
    font-weight: bold;
}

.profile-subtitle {
    font-size: 12px;
    color: #777;
}

.room-carousel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}

.room-carousel-track {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.carousel-btn {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #b8a888;
    border-radius: 4px;
    cursor: pointer;
}

.dark-mode body .carousel-btn {
    background: #141822;
    border-color: #272d3d;
    color: #e0e0e0;
}

.room-card.room-compact {
    padding: 10px;
    gap: 6px;
}

.room-card.room-compact .room-thumb {
    height: 120px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.stat-pill {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dark-mode body .stat-pill {
    background: #141822;
    border-color: #272d3d;
}

.stat-label {
    font-size: 11px;
    color: #777;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}

.filter-tags label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.people-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.rep-pill {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.dark-mode body .rep-pill {
    border-color: #272d3d;
}

.form-card {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dark-mode body .form-card {
    background: #141822;
    border-color: #272d3d;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.form-input {
    padding: 8px 10px;
    border: 1px solid #b8a888;
    border-radius: 3px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
}

.dark-mode body .form-input {
    background: #1a1a1a;
    border-color: #272d3d;
    color: #e0e0e0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    .sidebar, .right-sidebar {
        display: none;
    }
    .search-box {
        width: 140px;
    }
}
/* API playground */
.api-panel {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 12px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dark-mode body .api-panel {
    background: #141822;
    border-color: #272d3d;
}

.api-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field-label {
    font-size: 12px;
    font-weight: bold;
    color: #4a90e2;
}

.text-input {
    padding: 6px 8px;
    border: 1px solid #b8a888;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
}

.dark-mode body .text-input {
    background: #1a1a1a;
    border-color: #272d3d;
    color: #e0e0e0;
}

.api-hint {
    font-size: 11px;
    color: #777;
}

.api-response {
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 3px;
}

.dark-mode body .api-response {
    background: #1a1a1a;
    border-color: #272d3d;
}

.api-response-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #4a90e2;
}

.api-response-body {
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    white-space: pre-wrap;
    color: #333;
}

.dark-mode body .api-response-body {
    color: #e0e0e0;
}

.api-response-body.api-response-error {
    color: #8c2a2a;
}

.market-card,
.support-card {
    background: #fff;
    border: 1px solid #b8a888;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.3s, border-color 0.3s;
}

.dark-mode body .market-card,
.dark-mode body .support-card {
    background: #141822;
    border-color: #272d3d;
}
