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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #5568d3;
}

.btn-primary {
    background-color: #667eea;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background-color: #5568d3;
}

.post-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.post-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    cursor: pointer;
    display: flex;
    gap: 20px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background-color: #f9f9f9;
}

.post-thumbnail {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail.empty {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.post-content-wrapper {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.post-number {
    font-size: 0.9rem;
    color: #999;
    font-weight: 600;
}

.post-title {
    font-size: 1.5rem;
    color: #667eea;
    text-decoration: none;
    display: inline;
}

.post-title:hover {
    color: #5568d3;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.post-meta span {
    margin-right: 15px;
}

.post-preview {
    color: #555;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.post-detail-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.post-detail-meta {
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.post-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.back-link:hover {
    text-decoration: underline;
}

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

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.comments-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.comments-title span {
    color: #667eea;
}

.comment-form-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.comment-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.comment-input:focus,
.comment-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-comment {
    background-color: #667eea;
    padding: 10px 20px;
}

.btn-comment:hover {
    background-color: #5568d3;
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    background-color: #f9f9f9;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-content {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-comments p {
    font-size: 1rem;
}
