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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

.post-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-form h3 {
    margin-bottom: 15px;
    color: #555;
}

.post-form textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 10px;
}

.post-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.post-form button {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.post-form button:hover:not(:disabled) {
    background: #5a6fd8;
}

.post-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.demo-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

.posts-container h2 {
    margin-bottom: 20px;
    color: #555;
}

.post {
    background: white;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 12px;
}

.post-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}

.post-time {
    font-size: 0.9rem;
    color: #666;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.action-btn:hover {
    color: #667eea;
}

.refresh-section {
    text-align: center;
    margin-top: 30px;
}

#refresh-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#refresh-btn:hover {
    background: #218838;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Replies styling */
.replies {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.reply {
    background: #f8f9fa;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #e9ecef;
}

.reply:last-child {
    margin-bottom: 0;
}

.reply-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.reply-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
}

.reply-author {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 2px;
}

.reply-time {
    font-size: 12px;
    color: #6c757d;
}

.reply-content {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 14px;
    color: #495057;
}

.reply-actions {
    display: flex;
    gap: 15px;
}

.reply-action-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.3s;
}

.reply-action-btn:hover {
    color: #495057;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .post {
        padding: 15px;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .reply {
        padding: 10px;
    }
    
    .reply-avatar {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}
