body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px 40px;
    background-color: #0a0a0a;
    color: #d4d4d4;
}

h1 {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    color: #00cc66;
    letter-spacing: 1px;
}

h2, h3 {
    color: #00cc66;
}

a {
    color: #00cc66;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #33ff99;
    text-decoration: underline;
}

p {
    line-height: 1.6;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #141414;
    color: #d4d4d4;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #222222;
}

header a {
    color: #00cc66;
    margin-left: 8px;
}

header a:hover {
    color: #33ff99;
}

main {
    max-width: 800px;
    margin: 0 auto;
}

.story {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #141414;
    border-radius: 8px;
    border: 1px solid #222222;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.story:hover {
    border-color: #00cc66;
    box-shadow: 0 2px 12px rgba(0, 204, 102, 0.1);
}

.story h3 {
    margin-top: 0;
}

hr {
    border: none;
    border-top: 1px solid #222222;
    margin: 10px 0;
}

.more-info {
    font-size: 12px;
    color: #666666;
}

.comment {
    padding: 12px;
    margin-bottom: 10px;
    background-color: #111111;
    border-left: 3px solid #00cc66;
    border-radius: 4px;
}

form {
    margin-top: 10px;
    max-width: 500px;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 12px;
    border: 1px solid #222222;
    border-radius: 6px;
    background-color: #141414;
    color: #d4d4d4;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #00cc66;
    outline: none;
}

input[type="submit"] {
    padding: 10px 20px;
    background-color: #00cc66;
    color: #0a0a0a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

input[type="submit"]:hover {
    background-color: #33ff99;
}

.error {
    color: #ff4444;
    font-weight: bold;
}

/* Vote system */
.vote-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.vote-btn {
    background: none;
    border: 1px solid #222222;
    color: #555555;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
}

.vote-btn:hover {
    border-color: #00cc66;
    color: #00cc66;
}

.vote-btn.voted-up {
    color: #00cc66;
    border-color: #00cc66;
}

.vote-btn.voted-down {
    color: #ff4444;
    border-color: #ff4444;
}

.vote-btn-disabled {
    color: #333333;
    font-size: 18px;
    padding: 4px 10px;
}

.vote-score {
    font-size: 20px;
    font-weight: bold;
    color: #d4d4d4;
    min-width: 30px;
    text-align: center;
}

/* Index page vote count + story layout */
.story-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.vote-count {
    font-size: 14px;
    font-weight: bold;
    color: #00cc66;
    min-width: 40px;
    text-align: center;
    padding: 6px 0;
    background-color: rgba(0, 204, 102, 0.08);
    border: 1px solid rgba(0, 204, 102, 0.25);
    border-radius: 6px;
    line-height: 1;
}

.story-content {
    flex: 1;
}

.story-content h3 {
    margin-top: 0;
}

/* Sort links */
.sort-links {
    color: #666666;
    margin-bottom: 20px;
}

.sort-links a {
    color: #666666;
}

.sort-links a.sort-active {
    color: #00cc66;
    font-weight: bold;
}

/* Emoji bar */
.emoji-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.emoji-btn {
    background: #141414;
    border: 1px solid #222222;
    border-radius: 6px;
    font-size: 20px;
    padding: 6px 10px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.emoji-btn:hover {
    border-color: #00cc66;
    transform: scale(1.15);
}

/* Delete button (distinct from primary submit) */
.btn-delete {
    padding: 4px 12px;
    background-color: transparent;
    color: #ff4444;
    border: 1px solid #ff4444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: normal;
    transition: background-color 0.2s, color 0.2s;
}

.btn-delete:hover {
    background-color: #ff4444;
    color: white;
}

/* Auth pages (login/register) centered card */
.auth-card {
    max-width: 400px;
    margin: 60px auto;
    background-color: #141414;
    padding: 30px 35px;
    border-radius: 10px;
    border: 1px solid #222222;
}

.auth-card h1 {
    font-size: 1.8em;
    margin-top: 0;
}

.auth-card form {
    max-width: 100%;
}

.auth-card .back-link {
    text-align: center;
    margin-top: 15px;
}

/* Story detail page container */
.story-detail {
    max-width: 800px;
    margin: 0 auto;
}

/* Comment meta info line */
.comment-meta {
    font-size: 12px;
    color: #666666;
    margin-top: 8px;
}

/* Post Story button in header */
.btn-post {
    display: inline-block;
    padding: 6px 14px;
    background-color: #00cc66;
    color: #0a0a0a !important;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-post:hover {
    background-color: #33ff99;
    color: #0a0a0a !important;
    text-decoration: none;
}

/* Story detail body card */
.story-body-card {
    background-color: #141414;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}
