* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    background: linear-gradient(135deg, #1e0e3d 0%, #0f1a41 50%, #142c5c 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 20px;
}

/* Glassmorphism card styling */
.glass {
    background: var(--glass-bg);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    margin: 10px 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

header h1 {
    font-size: 2.5rem;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(229, 46, 113, 0.2);
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

nav a:hover {
    background: var(--glass-bg);
    transform: translateY(-3px);
}

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post {
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow), 0 10px 20px rgba(0, 0, 0, 0.2);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #e6e6fa;
}

.post-content {
    color: #ccccdc;
    margin-bottom: 20px;
    line-height: 1.5;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
}

button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.delete-btn {
    background: rgba(255, 59, 59, 0.1);
}

.delete-btn:hover {
    background: rgba(255, 59, 59, 0.3);
}

.newpostcontainer {
    width: 100%;
}

.newpostcontainer h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

input, textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus, textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

#submit-btn {
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    color: white;
    border: none;
    padding: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
}

#submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.5);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-message {
    background: linear-gradient(90deg, rgba(30, 144, 255, 0.2), rgba(0, 191, 255, 0.2));
    border-left: 4px solid #00bfff;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

.status-message.error {
    background: linear-gradient(90deg, rgba(255, 69, 0, 0.2), rgba(255, 99, 71, 0.2));
    border-left: 4px solid #ff4500;
}

.status-message.success {
    background: linear-gradient(90deg, rgba(50, 205, 50, 0.2), rgba(60, 179, 113, 0.2));
    border-left: 4px solid #32cd32;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#status-container {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    nav {
        width: 100%;
        justify-content: space-between;
    }
}
