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

body {
    font-family: 'Press Start 2P', cursive;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    color: #00ff00;
}

/* Twinkling stars background */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    border-radius: 50%;
    background-color: white;
    transition: transform 0.1s ease-out;
}

/* Layer 1: Far away stars - smallest and dimmest */
.star-layer-1 {
    width: 1px;
    height: 1px;
    box-shadow: 0px 0px 1px 0.5px rgba(255, 255, 255, 0.3);
}

/* Layer 2: Medium distance stars */
.star-layer-2 {
    width: 1.5px;
    height: 1.5px;
    box-shadow: 0px 0px 1px 0.5px rgba(255, 255, 255, 0.5);
}

/* Layer 3: Closest stars - largest and brightest */
.star-layer-3 {
    width: 2px;
    height: 2px;
    box-shadow: 0px 0px 2px 1px rgba(255, 255, 255, 0.7);
}

/* Shooting stars background */
section.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    pointer-events: none;
    z-index: 0;
}

section.stars-container span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1), 0 0 0 8px rgba(255,255,255,0.1), 0 0 20px rgba(255,255,255,0.1);
    animation: animate 3s linear infinite;
    opacity: 0;
}

section.stars-container span::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

@keyframes animate {
    0% {
        transform: rotate(315deg) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: rotate(315deg) translateX(-1000px);
        opacity: 0;
    }
}

section.stars-container span:nth-child(1) {
    top: 0;
    right: 0;
    left: initial;
    animation-delay: 0s;
    animation-duration: 1s;
}
section.stars-container span:nth-child(2) {
    top: 0;
    right: 80px;
    left: initial;
    animation-delay: 0.2s;
    animation-duration: 3s;
}
section.stars-container span:nth-child(3) {
    top: 80px;
    right: 0px;
    left: initial;
    animation-delay: 0.4s;
    animation-duration: 2s;
}
section.stars-container span:nth-child(4) {
    top: 0;
    right: 180px;
    left: initial;
    animation-delay: 0.6s;
    animation-duration: 1.5s;
}
section.stars-container span:nth-child(5) {
    top: 0;
    right: 400px;
    left: initial;
    animation-delay: 0.8s;
    animation-duration: 2.5s;
}
section.stars-container span:nth-child(6) {
    top: 0;
    right: 600px;
    left: initial;
    animation-delay: 1s;
    animation-duration: 3s;
}
section.stars-container span:nth-child(7) {
    top: 300px;
    right: 0px;
    left: initial;
    animation-delay: 1.2s;
    animation-duration: 1.75s;
}
section.stars-container span:nth-child(8) {
    top: 0px;
    right: 700px;
    left: initial;
    animation-delay: 1.4s;
    animation-duration: 1.25s;
}
section.stars-container span:nth-child(9) {
    top: 0px;
    right: 1000px;
    left: initial;
    animation-delay: 0.75s;
    animation-duration: 2.25s;
}
section.stars-container span:nth-child(10) {
    top: 0px;
    right: 450px;
    left: initial;
    animation-delay: 2.75s;
    animation-duration: 2.75s;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    background: #1a1a1a;
    padding: 20px;
    border: 2px solid #00ff00;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    image-rendering: pixelated;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #00ff00;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.nav span {
    color: #00ff00;
    font-size: 0.6em;
    align-self: center;
}

.nav a, .btn {
    text-decoration: none;
    padding: 10px 15px;
    background: #000000;
    color: #00ff00;
    border: 2px solid #00ff00;
    cursor: pointer;
    display: inline-block;
    font-size: 0.6em;
    text-transform: uppercase;
    box-shadow: none;
    font-family: 'Press Start 2P', cursive;
}

.nav a:hover, .btn:hover {
    background: #00ff00;
    color: #000000;
    box-shadow: none;
}

.logout-btn {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: none;
}

.logout-btn:hover {
    background: #ff0000;
    color: #000000;
    box-shadow: none;
}

.content {
    background: #0a0a0a;
    padding: 30px;
    border: 2px solid #00ff00;
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    font-size: 0.7em;
    line-height: 1.8;
}

.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid;
    font-size: 0.6em;
}

.flash.success {
    background: #001a00;
    color: #00ff00;
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.flash.error {
    background: #1a0000;
    color: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #00ff00;
    font-size: 0.8em;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #00ff00;
    font-size: 0.8em;
    background: #000000;
    color: #00ff00;
    font-family: 'Press Start 2P', cursive;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    box-shadow: none;
    background: #0a0a0a;
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: #006600;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    font-family: 'Press Start 2P', cursive;
}

.btn-primary {
    background: #000000;
    color: #00ff00;
    padding: 12px 30px;
    border: 2px solid #00ff00;
    font-size: 0.7em;
    cursor: pointer;
    box-shadow: none;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: #00ff00;
    color: #000000;
    box-shadow: none;
}

.btn-danger {
    background: #000000;
    color: #ff0000;
    padding: 10px 15px;
    border: 2px solid #ff0000;
    cursor: pointer;
    box-shadow: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    text-transform: uppercase;
}

.btn-danger:hover {
    background: #ff0000;
    color: #000000;
    box-shadow: none;
}

code {
    background: #1a1a1a;
    padding: 4px 8px;
    border: 1px solid #00ff00;
    font-family: 'Press Start 2P', cursive;
    color: #00ff00;
    font-size: 0.7em;
}

h2, h3 {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    margin-bottom: 20px;
    font-size: 1.2em;
}

a {
    color: #00ff00;
    text-decoration: underline;
}

a:hover {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

p {
    line-height: 1.8;
}

/* Utility classes */
.mb-30 {
    margin-bottom: 30px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.ml-10 {
    margin-left: 10px;
}

.pt-30 {
    padding-top: 30px;
}

.p-20-0 {
    padding: 20px 0;
}

.p-40-0 {
    padding: 40px 0;
}

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

.text-green {
    color: #00ff00;
}

.text-red {
    color: #ff0000;
}

.text-dark-green {
    color: #006600;
}

.no-decoration {
    text-decoration: none;
}

.info-box {
    background: #1a1a1a;
    border: 2px solid #00ff00;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.back-link {
    margin-bottom: 30px;
}

.back-link a {
    color: #00ff00;
    text-decoration: none;
}

.post-box {
    border: 2px solid #00ff00;
    padding: 20px;
    background: #0a0a0a;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.comments-section {
    border-top: 2px solid #00ff00;
    padding-top: 30px;
    box-shadow: 0 -5px 20px rgba(0, 255, 0, 0.1);
}

.comment-form {
    margin-bottom: 30px;
}

.comment-box {
    border: 2px solid #00ff00;
    padding: 15px;
    margin-bottom: 15px;
    background: #0a0a0a;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.comment-text {
    color: #00ff00;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.min-h-100 {
    min-height: 100px;
}

.min-h-300 {
    min-height: 300px;
}

.max-h-500 {
    max-height: 500px;
}

.post-title {
    color: #00ff00;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.post-content {
    color: #00ff00;
    line-height: 1.8;
    margin-bottom: 15px;
}

.post-meta {
    color: #00ff00;
}

/* Post card styles */
.post-card {
    border: 2px solid #00ff00;
    padding: 20px;
    margin-bottom: 15px;
    background: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.post-card:hover {
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4);
}

.post-card-title {
    margin-bottom: 10px;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.post-card-title a {
    color: #00ff00;
    text-decoration: none;
}

.post-card-preview {
    color: #00ff00;
    margin-bottom: 10px;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-card-meta {
    color: #00ff00;
}

.post-card-actions {
    display: flex;
    gap: 10px;
}

.post-card-actions form {
    display: inline;
}

.post-card-actions .btn {
    font-size: 14px;
    padding: 5px 15px;
}

.empty-state {
    color: #00ff00;
    text-align: center;
    padding: 40px 0;
}

.empty-state a {
    color: #00ff00;
}

.error-state {
    color: #ff0000;
    text-align: center;
    padding: 40px 0;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 0.9em;
        width: 100%;
        text-align: center;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .nav a, .btn {
        font-size: 0.5em;
        padding: 8px 12px;
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
    }
    
    .content {
        padding: 15px;
        font-size: 0.6em;
    }
    
    h2, h3 {
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    .form-group input, .form-group textarea {
        font-size: 0.7em;
        padding: 10px;
    }
    
    .btn-primary {
        font-size: 0.6em;
        padding: 10px 20px;
        width: 100%;
    }
    
    .btn-danger {
        font-size: 0.5em;
        padding: 8px 12px;
    }
    
    .post-card {
        padding: 15px;
    }
    
    .post-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .post-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .flash {
        font-size: 0.5em;
        padding: 10px;
    }
    
    code {
        font-size: 0.6em;
        padding: 3px 6px;
        word-break: break-all;
    }
    
    /* Shooting stars - reduce on mobile for performance */
    section.stars-container span::before {
        width: 150px;
    }
    
    section.stars-container span:nth-child(n+6) {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 5px;
        font-size: 12px;
    }
    
    .header {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 0.7em;
    }
    
    .nav a, .btn {
        font-size: 0.45em;
        padding: 6px 8px;
    }
    
    .content {
        padding: 10px;
        font-size: 0.55em;
    }
    
    .form-group input, .form-group textarea {
        font-size: 0.65em;
        padding: 8px;
    }
    
    .btn-primary {
        font-size: 0.55em;
    }
    
    h2, h3 {
        font-size: 0.9em;
    }
    
    .post-card {
        padding: 10px;
    }
}

