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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

.wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.02);
}

/* ===== 헤더 ===== */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px 24px;
    text-align: center;
    position: relative;
}
.logo {
    display: inline-block;
    text-decoration: none;
}
.logo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}
.logo-text {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.logo-desc {
    font-size: 13px;
    color: #a0a0c0;
    margin-top: 8px;
}
.auth-btn {
    position: absolute;
    top: 20px;
    right: 24px;
}
.btn-login, .btn-logout {
    padding: 6px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-login {
    background: #e94560;
    color: #fff;
}
.btn-login:hover {
    background: #c73e55;
}
.btn-logout {
    background: #2c3e50;
    color: #fff;
}
.btn-logout:hover {
    background: #1e2b38;
}
.user-name {
    color: #a0a0c0;
    font-size: 12px;
    margin-right: 10px;
}

/* ===== 메인 컨테이너 ===== */
.container {
    padding: 28px 24px;
}

/* ===== 글쓰기 버튼 ===== */
.write-area {
    text-align: right;
    margin-bottom: 24px;
}
.btn-write {
    background: #e94560;
    color: #fff;
    padding: 8px 22px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
    transition: 0.2s;
}
.btn-write:hover {
    background: #c73e55;
    transform: translateY(-1px);
}

/* ===== 게시글 목록 ===== */
.post-list {
    list-style: none;
}
.post-item {
    padding: 18px 0;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    transition: 0.2s;
}
.post-item:hover {
    padding-left: 12px;
    background: #fafbfc;
}
.post-title {
    font-size: 16px;
    font-weight: 500;
}
.post-title a {
    text-decoration: none;
    color: #1a1a2e;
}
.post-title a:hover {
    color: #e94560;
}
.post-meta {
    font-size: 12px;
    color: #94a3b8;
}
.delete-link {
    color: #e94560;
    font-size: 11px;
    margin-left: 12px;
    text-decoration: none;
}
.delete-link:hover {
    text-decoration: underline;
}

/* ===== 페이징 ===== */
.pagination {
    text-align: center;
    margin: 40px 0 20px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 6px 13px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 30px;
    text-decoration: none;
    color: #4a5568;
    font-size: 13px;
    transition: 0.2s;
}
.pagination a:hover {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}
.pagination .active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

/* ===== 글보기 ===== */
.view-header {
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid #edf2f7;
}
.view-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.view-info {
    font-size: 13px;
    color: #94a3b8;
}
.view-content {
    padding: 20px 0;
    min-height: 280px;
    line-height: 1.8;
    font-size: 15px;
}
.view-content img {
    max-width: 100%;
    margin: 16px 0;
    border-radius: 12px;
}
.btn-area {
    margin-top: 32px;
    text-align: center;
}
.btn {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-gray {
    background: #e2e8f0;
    color: #4a5568;
}
.btn-gray:hover {
    background: #cbd5e1;
}

/* ===== 폼 ===== */
.form-box {
    max-width: 650px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 22px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    transition: 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}
.form-group textarea {
    height: 200px;
    resize: vertical;
}
.btn-primary {
    background: #e94560;
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: #c73e55;
}
.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
    margin-left: 10px;
}

/* ===== 푸터 ===== */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: #94a3b8;
    border-top: 1px solid #edf2f7;
    background: #fafbfc;
}
.footer a {
    color: #e94560;
    text-decoration: none;
}
.footer a:hover {
    text-decoration: underline;
}

/* ===== 로그인 박스 ===== */
.login-box {
    max-width: 380px;
    margin: 60px auto;
    background: #fff;
    padding: 36px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #edf2f7;
}
.login-box h3 {
    margin-bottom: 20px;
    color: #1a1a2e;
}
.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    font-size: 14px;
}
.login-box button {
    width: 100%;
    padding: 12px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}
.login-box button:hover {
    background: #c73e55;
}
.error {
    color: #e94560;
    margin-top: 12px;
    font-size: 13px;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .wrapper { margin: 0; }
    .header { padding: 20px 16px; }
    .logo-icon { font-size: 36px; }
    .logo-text { font-size: 24px; }
    .auth-btn { position: static; text-align: center; margin-top: 12px; }
    .container { padding: 20px 16px; }
    .post-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .post-meta { font-size: 11px; }
    .view-title { font-size: 20px; }
}