body {
    font-family: "Times New Roman", Times, serif;
    /* ZMIANA: Tło strony na jasno szare */
    background-color: #dedddd;
    color: #36454F;
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    text-align: center;
    margin-bottom: 40px;
    /* NOWOŚĆ: Ustawienie dla pozycjonowania logo */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* NOWOŚĆ: Styl dla logo */
.logo-img {
    position: absolute;
    right: 20px;
    width: 250px; /* Możesz dostosować rozmiar */
    height: auto;
}

header h1 {
    font-size: 4em;
    margin: 0;
}

header h2 {
    font-size: 1.5em;
    font-weight: normal;
    margin: 0;
    color: #808080;
}

main {
    max-width: 800px;
    margin: 0 auto;
}

.controls {
    text-align: right;
    margin-bottom: 20px;
    /* NOWOŚĆ: Ustawienie dla pola nicku i przycisku */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* NOWOŚĆ: Styl dla pola na nick */
#nicknameInput {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* ZMIANA: Styl przycisku */
#addPostBtn {
    background-color: #d9534f; /* Czerwony */
    color: white; /* Biały font */
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#addPostBtn:hover:not(:disabled) {
    background-color: #c9302c; /* Ciemniejszy czerwony */
}

/* NOWOŚĆ: Styl dla wyłączonego przycisku */
#addPostBtn:disabled {
    background-color: #A9A9A9;
    cursor: not-allowed;
}

#posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-meta {
    text-align: right;
    font-size: 0.9em;
    color: #808080;
    margin-bottom: 10px;
}

.post-content {
    font-size: 1.1em;
    line-height: 1.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#addPostForm textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 20px;
}

/* ZMIANA: Styl przycisku w formularzu */
#addPostForm button {
    background-color: #d9534f; /* Czerwony */
    color: white; /* Biały font */
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
}

#addPostForm button:hover {
    background-color: #c9302c; /* Ciemniejszy czerwony */
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2.8em;
    }

    header h2 {
        font-size: 1.2em;
    }

    .post {
        padding: 15px;
    }

    .post-meta {
        font-size: 0.8em;
    }
    
    .post-content {
        font-size: 1em;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
    .logo-img {
        width: 10%;
    }
}

@media (max-width: 480px) {
    header {
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 2.2em;
    }

    header h2 {
        font-size: 1em;
    }

    .controls {
        text-align: center;
    }

    #addPostBtn {
        width: 100%;
        padding: 15px;
    }
    
    .post-meta {
        text-align: left; 
        margin-bottom: 15px;
        margin-top: 0;
    }

    .modal-content {
        margin: 10% auto;
    }
    .logo-img {
        width: 20%;
    }
}