/* Base Reset and Typography */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0A1D14;
    color: #E0E0E0;
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Links */
a {
    color: #0AE98A;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}
a:hover {
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Headings */
h1, h2 {
    font-weight: 300;
    color: #FFFFFF;
}

h1 {
    padding-bottom: 15px;
    border-bottom: 2px solid #1D5C3F;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2.post-title {
    background-color: #0AE98A;
    color: #0A1D14;
    padding: 5px;
    margin: 20px 0 0;
    transition: all 0.3s ease;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 10px rgba(10,233,138,0.1);
}
h2.post-title:hover {
    background-color: #1D5C3F;
    color: #E0E0E0;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(10,233,138,0.2);
}

/* Tags */
p.tags {
    font-size: 0.875rem;
    color: #E5FF50;
}
p.tags a {
    color: #17FAFA;
    padding: 2px 6px;
    margin-left: 5px;
    border-radius: 3px;
    background-color: rgba(23,250,250,0.1);
    transition: all 0.3s ease;
}
p.tags a:hover {
    color: #FFFFFF;
    background-color: rgba(23,250,250,0.2);
}

/* Content and Sidebar */
#content {
    float: left;
    width: 65%;
    padding: 0 2.5%;
    
}

#sidebar {
    float: right;
    width: 25%;
    padding: 25px;
    background: linear-gradient(135deg, #153F2B, #1D5C3F);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 1.5rem;
}

/* Post body */
div.text-body {
    background-color: #153F2B;
    border: 1px solid #1D5C3F;
    border-radius: 0 0 4px 4px;
    padding: 25px;
    margin-top: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}
div.text-body:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Buttons */
.btn-detail {
    background-color: #0AE98A;
    color: #0A1D14;
    margin-top: 10px;
    margin-right: 5px;
    border: none;
    /* padding: 12px 24px; */
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(10,233,138,0.2);
}
.btn-detail:hover {
    background-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10,233,138,0.3);
}
.btn-detail a {
    color: #0A1D14;
}

/* Date */
p.date {
    color: #0AE98A;
    font-size: 0.875rem;
    font-style: italic;
    margin-bottom: 15px;
}

/* Forms */
label {
    display: block;
    margin-bottom: 8px;
    color: #0AE98A;
    font-weight: 500;
}
input, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    background: #153F2B;
    border: 2px solid #1D5C3F;
    color: #E0E0E0;
    border-radius: 4px;
    transition: all 0.3s ease;
}
input:focus, textarea:focus {
    border-color: #0AE98A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(10,233,138,0.2);
}
input[type=submit] {
    width: auto;
    background: #0AE98A;
    color: #0A1D14;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 24px;
    transition: all 0.3s ease;
}
input[type=submit]:hover {
    background-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(10,233,138,0.3);
}

/* Error Messages */
.errorlist {
    color: #E9A845;
    padding-left: 0;
    list-style-type: none;
    background-color: rgba(233,168,69,0.1);
    border-radius: 4px;
    padding: 10px 15px;
}

/* Comments */
.comment {
    background: #153F2B;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.comment:nth-child(even) {
    background: #1D5C3F;
}
.comment .info {
    font-weight: bold;
    font-size: 0.875rem;
    color: #0AE98A;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(10,233,138,0.2);
    padding-bottom: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.post, .comment, #sidebar {
    animation: fadeIn 0.5s ease-out;
}



/* Media Queries for Responsive Design */
@media screen and (max-width: 1024px) {
    #content, #sidebar {
        width: 95%;
        float: none;
        margin: 0 auto;
    }

    #sidebar {
        margin-top: 30px;
    }
}

@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2em;
    }

    h2.post-title {
        font-size: 1.5em;
    }

    .btn-detail {
        display: block;
        width: 100%;
        text-align: center;
    }

    div.text-body {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2.post-title {
        font-size: 1.3em;
        padding: 10px;
    }

    #content, #sidebar {
        width: 100%;
        padding: 10px;
    }

    input, textarea {
        font-size: 16px; /* Prevents zoom on focus in iOS */
    }

    .comment {
        padding: 15px;
    }
}

/* Improve touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    a, .btn-detail, input[type=submit] {
        padding: 12px 22px;
    }

    input, textarea, select {
        font-size: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #050d09;
    }

    #sidebar {
        background: linear-gradient(135deg, #0c2318, #123c29);
    }

    div.text-body, .comment {
        background-color: #0c2318;
    }

    input, textarea {
        background: #0c2318;
    }
}