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

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

body {
    background-color: #000;
    font-family: Arial, sans-serif;
    color: white;
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(to right, #6a00ff, #C71B1B);
}

/* Hamburger standaard verbergen */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

.profile-icon {
    font-size: 22px;
}

.profile-icon img {
    width: 45px;
    height: 45px;
    border-radius: 50%;      /* maakt hem rond */
    object-fit: cover;       /* zorgt dat hij niet uitrekt */
    border: 2px solid #fff;  /* optioneel: witte rand */
    box-shadow: 0 0 5px rgba(0,0,0,0.2); /* subtiele schaduw */
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}

/* CONTAINER */
.container {
    width: 90%;
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}

/* KNOP */
.new-post {
    background: linear-gradient(to right, #6a00ff, #C71B1B);
    border: none;
    width: 350px;
    padding: 15px;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    text-align: center;
}

/* WAARSCHUWING */
.login-warning {
    width: 300px;
    margin: 0 auto 40px auto;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(to right, #6a00ff, #C71B1B);
}

/* BERICHTEN */
.post {
    background: linear-gradient(to right, #6a00ff, #C71B1B);
    width: 100%;
    max-width: 500px;
    margin: 20px auto;

    margin: 20px auto;
    padding: 15px;
    border-radius: 12px;
}

.post-header {
     display: flex;
    flex-direction: column; /* zet alles onder elkaar */
    align-items: center; /* links uitlijnen */
}

.icon {
    margin-right: 10px;
}

.username {
    font-weight: bold;
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
}

footer{
    bottom: 0;
    width: 100%;
    background: linear-gradient(to right, #6a00ff, #C71B1B);
    color: white;
    text-align: center;
    padding: 10px 0;
}

.topbar img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.upvote-btn {
    background: linear-gradient(to left, #6a00ff, #C71B1B);
    color: black;
    border-radius: 6px;
}

.post-actions {
    margin-top: 10px;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    margin-right: 10px;
}

.edit-btn {
    background-color: #4CAF50;
    color: white;
}

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

.post p {
    word-wrap: break-word;   
    overflow-wrap: break-word;  
    white-space: pre-wrap;     
    max-width: 100%;           
}

/* EDIT PAGINA CONTAINER */
.edit-container {
    width: 100%;
    max-width: 600px;
    margin: 50px auto;
    background: linear-gradient(to right, #6a00ff, #C71B1B);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.edit-container h2 {
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: bold;
}

/* FORM */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-form label {
    text-align: left;
    font-weight: bold;
    font-size: 15px;
}

/* TEXTAREA */
.edit-form textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border-radius: 8px;
    border: none;
    resize: none;
    font-size: 15px;
    outline: none;
}

/* BESTAND UPLOAD */
.edit-form input[type="file"] {
    margin-top: 5px;
    padding: 8px;
    background: #222;
    border-radius: 6px;
    border: 1px solid #444;
    color: white;
}

/* HUIDIGE FOTO */
.current-image {
    margin: 10px 0;
}

.current-image img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 8px;
    border: 2px solid white;
}

/* OPSLAAN KNOP */
.save-btn {
    background: linear-gradient(to left, #6a00ff, #C71B1B);
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.save-btn:hover {
    opacity: 0.85;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .edit-container {
        width: 90%;
        padding: 20px;
    }

    .save-btn {
        width: 100%;
    }
}

/* Telefoons (max 600px) */
@media (max-width: 600px) {

    .topbar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .nav-links a {
        margin-left: 10px;
        font-size: 13px;
    }

    .container {
        width: 95%;
        margin: 20px auto;
    }

    .new-post {
        width: 100%;
        max-width: 350px;
    }

    .login-warning {
        width: 90%;
    }

    .post {
        width: 100%;
        padding: 12px;
    }

    .post-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-icon img {
        width: 55px;
        height: 55px;
    }

    .post img {
        max-width: 100%;
        height: auto;
    }

    .upvote-btn {
        width: 100%;
        padding: 10px;
        margin-top: 10px;
    }

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

    .edit-btn, .delete-btn {
        width: 100%;
        text-align: center;
        margin: 0;
    }
}

/* Tablets (600px – 900px) */
@media (min-width: 600px) and (max-width: 900px) {

    .container {
        width: 90%;
    }

    .post {
        width: 90%;
    }

    .new-post {
        width: 70%;
    }
}

/* Telefoons (max 400px) */
@media (max-width: 400px) {

    .topbar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .nav-links a {
        margin-left: 10px;
        font-size: 13px;
    }

    .container {
        width: 95%;
        margin: 20px auto;
    }

    .new-post {
        width: 100%;
        max-width: 350px;
    }

    .login-warning {
        width: 90%;
    }

    .post {
        width: 100%;
        padding: 12px;
    }

    .post-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-icon img {
        width: 55px;
        height: 55px;
    }

    .post img {
        max-width: 100%;
        height: auto;
    }

    .upvote-btn {
        width: 100%;
        padding: 10px;
        margin-top: 10px;
    }

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

    .edit-btn, .delete-btn {
        width: 100%;
        text-align: center;
        margin: 0;
    }
}

@media (max-width: 600px) {

    .topbar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .container {
        width: 95%;
    }

    .post {
        width: 100%;
        padding: 12px;
    }

    .profile-icon img {
        width: 55px;
        height: 55px;
    }

    .new-post {
        width: 100%;
    }

    .upvote-btn {
        width: 100%;
        margin-top: 10px;
    }

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

    .edit-btn, .delete-btn {
        width: 100%;
        text-align: center;
    }
}

/* Tablets (600px – 900px) */
@media (min-width: 600px) and (max-width: 900px) {

    .container,
    .profile-container,
    .leaderboard-container,
    .badges-container {
        width: 90%;
    }

    .post,
    .badge-card,
    .leaderboard-item,
    .profile-card {
        width: 90%;
    }

    .new-post {
        width: 70%;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .hamburger {
        display: block;
        color: white;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: linear-gradient(to right, #6a00ff, #C71B1B);
        margin-top: 10px;
        padding: 10px 0;
        border-radius: 10px;
    }

    .nav-links a {
        padding: 10px;
        display: block;
    }

    /* Actieve menu */
    .nav-links.active {
        display: flex;
    }
}


