:root {
    --bg: #111827;
    --panel: #1f2937;
    --border: #374151;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --danger: #ef4444;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.header-left h1 { margin: 0; font-size: 1.5rem; }
.header-right { display: flex; gap: 10px; align-items: center; }

/* Cards */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.hidden { display: none !important; }

/* Tabs */
.tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.tab {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}
.category-tabs { flex-wrap: wrap; }

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    margin-bottom: 10px;
}
button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}
button:hover { background: var(--primary-hover); }
button.btn-secondary { background: transparent; border: 1px solid var(--border); }
button.btn-secondary:hover { background: var(--border); }

/* Posts */
.posts-list { list-style: none; padding: 0; }
.post-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
.post-meta {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.post-meta strong { color: var(--text); }
.attach-box {
    background: var(--panel);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.attach-box a { color: var(--primary); text-decoration: none; }

/* Comments */
.comments-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}
.comment-item {
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.comment-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
}
.comment-form { display: flex; gap: 10px; margin-top: 10px; }
.comment-form input { margin-bottom: 0; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

/* Upload Options */
.upload-options {
    display: flex;
    align-items: center;
    margin-top: 5px;
    font-size: 13px;
}
.upload-options label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--muted);
}
.upload-options input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.modal-header h2 { margin: 0; font-size: 1.2rem; }
.close-btn {
    background: transparent; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer;
}
.modal-info {
    color: var(--muted); font-size: 0.9rem; margin-bottom: 15px; text-align: center;
}
.leaderboard-list {
    list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px;
}
.leader-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #1e293b; padding: 10px 15px; border-radius: 8px; border: 1px solid var(--border);
}
.leader-rank {
    font-size: 1.5rem; width: 40px; text-align: center;
}
.leader-info {
    flex: 1; margin-left: 10px;
}
.leader-name { font-weight: bold; }
.leader-stats { font-size: 0.8rem; color: var(--muted); }
.leader-points {
    font-weight: bold; color: #fbbf24; font-size: 1.1rem;
}

/* IDE Styles Removed */

/* Chat Widget Styles Removed */
