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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    z-index: -1;
    opacity: 0.3;
}

/* Main container */
body > * {
    max-width: 900px;
    margin: 0 auto;
}

header {
    display:flex; 
    justify-content: space-between;
    flex-direction: row;
}

h1 {
    color: #ffffff;
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 0.8s ease-out;
}

h1 em {
    color: #3498db;
    font-style: normal;
    text-decoration: underline;
    text-decoration-color: rgba(52, 152, 219, 0.5);
    text-decoration-thickness: 3px;
}

h1 strong {
    color: #3498db;
}

p {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    font-size: 1.1em;
    color: #333;
    text-align: justify;
    animation: fadeInUp 0.8s ease-out;
    backdrop-filter: blur(10px);
}

p strong {
    color: #2980b9;
    font-weight: 700;
}

/* Form styling */
form {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

div {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

input[name='search_query'] {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

input[name='search_query']:focus {
    outline: none;
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

input[name='search_query']::placeholder {
    color: #999;
}

/* Input used on create view for the post content */
form input[name='content'] {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-top: 8px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

form input[name='content']:focus {
    outline: none;
    box-shadow: 0 10px 22px rgba(52, 152, 219, 0.22);
    transform: translateY(-2px);
}

/* Input for autor */
form input[name='autor'] {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-top: 8px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

form input[name='autor']:focus {
    outline: none;
    box-shadow: 0 10px 22px rgba(52, 152, 219, 0.22);
    transform: translateY(-2px);
}

/* Make label clear and readable above the input */
form label {
    color: #ffffff;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

/* Button container for the navigation buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* List styling */
ul {
    list-style: none;
}

li {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

li:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    transform: translateX(5px);
    border-left-color: #2980b9;
}

/* Comment text styling */
.comment-text {
    flex: 1;
    line-height: 1.8;
    color: #333;
    font-size: 1.05em;
    flex-direction: column;
    margin:0;
    gap:0;
}
.comment-data {
   margin: 0;
}

.comment-text strong {
    color: #2980b9;
    font-weight: 700;
}

.comment-time {
    display: block;
    font-size: 0.85em;
    color: #7f8c8d;
    font-style: italic;
}

/* Comment actions container */
.comment-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin: 0;
}

.comment-actions form {
    display: inline-flex;
    margin: 0;
}

/* Edit form styling within comments */
li form:has(input[name='autor']) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

li form:has(input[name='autor']) input {
    width: 100%;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    p {
        padding: 20px;
        font-size: 1em;
    }
    
    button {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    form {
        flex-direction: column;
    }
    
    li form {
        display: flex;
        flex-direction: column;
        margin-right: 0;
    }
}