* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

.hidden {
    display: none !important;
}

.w-100 {
    width: 100%;
}

.header {
    background-color: #ffffff;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.4rem;
    color: #4f46e5;
}

#user-info {
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 8px;
}

.main-content {
    margin-top: 24px;
    margin-bottom: 40px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

input[type="text"], input[type="password"], textarea {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    border-color: #4f46e5;
}

button {
    background-color: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background-color: #4338ca;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: #ef4444;
}

.btn-sm:hover {
    background-color: #dc2626;
}

.toggle-text {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: #666;
}

.toggle-text span {
    color: #4f46e5;
    text-decoration: underline;
    cursor: pointer;
}

.write-card textarea {
    width: 100%;
    height: 90px;
    resize: none;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.write-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    font-size: 0.9rem;
    cursor: pointer;
}

.post-item {
    padding: 20px 20px 12px 20px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.post-author {
    font-weight: 700;
    color: #1f2937;
}

.post-date {
    font-size: 0.8rem;
    color: #9ca3af;
}

.post-content {
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 1rem;
    color: #374151;
    margin-bottom: 12px;
}

.post-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
    display: flex;
    gap: 8px;
}

.btn-action {
    background: none;
    color: #6b7280;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-action:hover {
    background: #f3f4f6;
}

.btn-action.liked {
    color: #ef4444;
    font-weight: bold;
}

.comments-section {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-item {
    font-size: 0.9rem;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e2e8f0;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-header {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.comment-author {
    font-weight: 700;
    color: #4b5563;
}

.comment-date {
    font-size: 0.75rem;
    color: #9ca3af;
}

.comment-content {
    color: #374151;
    word-break: break-all;
}

.reply-item {
    margin-left: 20px;
    background-color: #f1f5f9;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 4px;
}

.btn-reply-toggle {
    font-size: 0.75rem;
    color: #4f46e5;
    background: none;
    padding: 0;
    margin-top: 4px;
}

.btn-reply-toggle:hover {
    background: none;
    text-decoration: underline;
}

.comment-form, .reply-form {
    display: flex;
    gap: 6px;
}

.comment-form input, .reply-form input {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.comment-form button, .reply-form button {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.reply-form {
    margin-top: 6px;
    margin-left: 20px;
}