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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

main {
    padding: 40px 30px;
}

.form-section {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 4px solid #667eea;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-help {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.posts-section h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 1.5rem;
    text-align: center;
}

.posts-grid {
    display: grid;
    gap: 25px;
}

.post-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-header {
    margin-bottom: 15px;
}

.post-author {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.post-date {
    color: #999;
    font-size: 0.9rem;
    margin-top: 5px;
}

.post-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

.post-content b {
    color: #333;
    font-weight: 700;
}

.post-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid #667eea;
    transition: color 0.2s;
}

.post-content a:hover {
    color: #764ba2;
}

.post-content li {
    margin-left: 25px;
    margin-bottom: 8px;
}

.read-more {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    transition: color 0.2s;
}

.read-more:hover {
    color: #764ba2;
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    color: #999;
}

.empty-state p {
    font-size: 1.1rem;
}

footer {
    background: #f9f9f9;
    padding: 20px 30px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    color: #764ba2;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    main, .form-section {
        padding: 20px;
    }

    .post-card {
        padding: 20px;
    }
}
