body {
    margin:0;
    font-family:Arial,sans-serif;
    background:#f4f4f4;
    color:#333;
}

.header {
    position:sticky;
    top:0;
    background:#fff;
    padding:15px;
    box-shadow:0 2px 6px rgba(0,0,0,0.1);
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    z-index:9999; /* fixed search bar overlap */
}

.header a {
    margin-right:15px;
    text-decoration:none;
    font-weight:bold;
    color:#555;
}

.search-bar {
    margin-top:5px;
    width:100%;
    max-width:400px;
    display:flex;
    position:relative; /* ensure input stays above content */
    z-index:10000;     /* extra layer to be sure */
}

.search-bar input {
    flex:1;
    padding:6px 10px;
    border-radius:6px;
    border:1px solid #ccc;
}

.search-bar button {
    padding:6px 10px;
    margin-left:5px;
    border:none;
    background:#007bff;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
}

.content {
    max-width:1200px;
    margin:40px auto;
    background:#fff;
    padding:25px;
    border-radius:12px;
}

.event-layout {
    display:flex;
    gap:30px;
}

.event-media {
    flex:0 0 33%;
    position:relative;
}

.event-media img,
.event-media video {
    width:100%;
    border-radius:12px;
    display:block;
}

.event-text {
    flex:1;
}

h1 {
    margin-top:0;
}

.tags {
    margin-top:20px;
}

.tag {
    display:inline-block;
    padding:4px 10px;
    margin:3px;
    background:#e0e0e0;
    border-radius:20px;
    font-size:13px;
    text-decoration:none;
    color:#333;
}

.tag:hover {
    background:#cfcfcf;
}

.attachment {
    margin-top:20px;
}

.attachment a {
    display:inline-block;
    padding:6px 12px;
    background:#007bff;
    color:#fff;
    border-radius:6px;
    text-decoration:none;
}

.attachment a:hover {
    background:#0056b3;
}

.related {
    margin-top:30px;
    padding:15px;
    background:#eee;
    border-radius:10px;
    position:relative;
}

.related-thumbs-wrapper {
    overflow-x:hidden;
    position:relative;
}

.related-thumbs {
    display:flex;
    gap:15px;
    transition: transform 0.3s ease;
}

.related-event {
    flex:0 0 140px;
    height:100px;
    position:relative;
}

.related-event img {
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:8px;
}

.related-event div {
    position:absolute;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0,0,0,0.6);
    color:#fff;
    text-align:center;
    font-size:12px;
    padding:4px 0;
    border-radius:0 0 8px 8px;
    opacity:0;
    pointer-events:none;
    transition:opacity 0.2s ease;
}

.related-event:hover div {
    opacity:1;
    pointer-events:auto;
}

.related-arrow {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    z-index:2;
    background: rgba(255,255,255,0.9);
    border:none;
    padding:4px 8px;
    border-radius:6px;
    cursor:pointer;
    font-size:18px;
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.related-arrow.left { left:0; }
.related-arrow.right { right:0; }
.related-arrow:hover { background:#fff; transform:translateY(-50%) scale(1.1); }

.bookmark-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #e74c3c;
    transition: all 0.2s ease;
}

.bookmarked {
    background:#e74c3c;
    color:#fff;
}

.vote-btn {
    cursor:pointer;
    font-size:18px;
    margin-right:8px;
    padding:4px 8px;
    border-radius:6px;
    border:none;
    background:#f0f0f0;
    transition:all 0.2s ease;
}

.vote-btn:hover {
    background:#ddd;
}

.vote-btn.upvoted {
    background:#2ecc71;
    color:#fff;
}

.vote-btn.downvoted {
    background:#e74c3c;
    color:#fff;
}

.vote-weight {
    font-size:14px;
    color:#555;
    vertical-align:middle;
}

textarea#new_comment,
textarea.reply-text {
    width:100%;
    height:50px;
    padding:8px;
    border-radius:6px;
    border:1px solid #ccc;
}

button#submit_comment,
button.reply-submit {
    margin-top:5px;
    padding:6px 12px;
    border:none;
    background:#007bff;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
}

.replies {
    margin-left:20px;
    margin-top:10px;
    border-left:2px solid #eee;
    padding-left:10px;
}

.reply-form {
    margin-top:5px;
}

.entity {
    border-bottom:1px dotted #007bff;
    cursor:help;
}

.entity-tooltip {
    position:absolute;
    background:#222;
    color:#fff;
    padding:8px 12px;
    border-radius:6px;
    max-width:260px;
    font-size:13px;
    display:none;
    z-index:9999;
}

.jump-box {
    margin-top:8px;
    display:flex;
    gap:6px;
    align-items:center;
}

.jump-box input {
    padding:6px 10px;
    border-radius:6px;
    border:1px solid #ccc;
    font-size:13px;
}

.jump-box button {
    padding:6px 12px;
    border-radius:6px;
    border:none;
    background:#007bff;
    color:#fff;
    cursor:pointer;
}

@media(max-width:900px) {
    .event-layout {
        flex-direction:column;
    }
    .event-media {
        flex:1;
    }
}
/* =======================
   COMMENTS STYLING
======================= */
#comments_section {
    max-width: 800px;
    margin: 30px auto;
    font-family: Arial, sans-serif;
}

#comments_section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 22px;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 5px;
}

.comment {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}

.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.comment-text {
    margin-bottom: 6px;
    line-height: 1.5;
}

.comment-user {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.comment .vote-btn {
    background: #e3f2fd;
    border: none;
    border-radius: 4px;
    padding: 3px 7px;
    margin-right: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}

.comment .vote-btn:hover {
    background: #bbdefb;
}

.comment .vote-weight {
    font-weight: bold;
    margin-right: 10px;
}

.replies {
    margin-left: 20px;
    margin-top: 10px;
}

.reply-form textarea {
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    resize: vertical;
}

.reply-form button {
    margin-top: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 13px;
}

.reply-form button:hover {
    background: #2563eb;
}
.delete-btn {
    margin-left: 10px;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    background: #e74c3c;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background: #c0392b;
}
.comment .delete-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.comment .delete-btn:hover {
    background: #c0392b;
}