:root {
    /* Updated to your Pastille colorscheme */
    --bg-color: #fdfdfd; /* Fallback for the tiled background */
    --site-bg: url("images/startile.png");
    --text-color: #4E223D;
    --accent-color: #DA587E;
    --accent-hover: #FB8AAB;
    --border-color: #FB8AAB;
    --link-color: #DA587E;
    --card-bg: #ffffff;
    --hover-bg: #FFE1C6;
}

body { 
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--bg-color);
    background-image: var(--site-bg);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 700px; 
    margin: 0 auto; 
    padding: 2rem 1rem; 
}

h1 { 
    text-align: center; 
    font-weight: 300; 
    letter-spacing: 1px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    margin: 0 auto 2rem auto;
    width: 100%;
    padding-bottom: 10px;
}

/* Form Styling */
form { 
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    margin-bottom: 3rem;
    box-shadow: 0 4px 0 var(--border-color); /* Added a slight "pop" to match the aesthetic */
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* This is the key fix */
}

.form-row input {
    flex: 1;
    min-width: 200px; /* Forces a wrap if the screen is narrower than ~410px */
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row input {
        width: 93%;
    }
}

input, textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-color);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--hover-bg);
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    align-self: flex-start;
}

button:hover { 
    background-color: var(--accent-hover); 
}

/* Entries Styling */
.entry { 
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px; 
    margin-bottom: 20px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--hover-bg);
    padding-bottom: 5px;
}

.entry-author { font-weight: bold; color: var(--accent-color); }
.entry-date { font-size: 0.8rem; color: #999; }
.entry-time { font-size: 0.8rem; color: #999; }
.entry-website { font-size: 0.85rem; margin-left: 5px; }
.entry-website a { color: var(--link-color); text-decoration: none; }

.permalink {
    background: var(--hover-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.7rem;
    color: var(--accent-color);
}

.admin-reply {
    margin: 15px 0 0 15px;
    padding: 12px;
    background: var(--hover-bg); /* Use the soft peach/cream for replies */
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.admin-controls { margin-top: 15px; display: flex; gap: 10px; }
.btn-delete { background-color: #ff4d4d; }

.hidden { display: none !important; }

footer {
    margin-top: 4rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0.7;
}
footer a { color: inherit; text-decoration: none; margin: 0 5px; }
