/* 기본 스타일 및 폰트 설정 */
:root {
    --primary-color: #d4a373;
    --secondary-color: #faedcd;
    --background-color: #fefae0;
    --card-bg: #ffffff;
    --text-color: #4a4a4a;
    --light-text: #8e8e8e;
    --border-color: #e9e5d9;
    --shadow: 0 8px 24px rgba(212, 163, 115, 0.15);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Gowun Dodum', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.logo-text {
    font-family: 'Nanum Pen Script', cursive;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

/* 화면 전환용 클래스 */
.section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 공통 카드 스타일 */
.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

/* 로그인 섹션 */
.login-card {
    text-align: center;
}

.subtitle {
    color: var(--light-text);
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: #faf9f6;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
}

/* 버튼 스타일 */
.btn {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.primary-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

.primary-btn:hover {
    background-color: #c09060;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.text-btn {
    background: none;
    color: var(--light-text);
    padding: 8px 12px;
}

.text-btn:hover {
    color: var(--text-color);
    background-color: var(--border-color);
}

/* 메인 보드 섹션 */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#welcome-message {
    font-weight: bold;
    color: var(--primary-color);
}

/* 방명록 작성 폼 */
#post-form textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    box-sizing: border-box;
    background-color: #faf9f6;
    transition: border-color 0.3s ease;
}

#post-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
}

.form-actions {
    margin-top: 15px;
    text-align: right;
}

.form-actions .primary-btn {
    width: auto;
    padding: 10px 24px;
}

/* 게시글 목록 */
.list-card h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.post-item {
    background-color: var(--secondary-color);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    position: relative;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.post-author {
    font-weight: bold;
    color: var(--primary-color);
}

.post-date {
    color: var(--light-text);
}

.post-body {
    line-height: 1.5;
    word-break: break-all;
    white-space: pre-wrap;
}

.empty-message {
    text-align: center;
    color: var(--light-text);
    padding: 20px 0;
}