/* ===== 공통 레이아웃 ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
}

/* ===== 네비게이션 ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    padding: 12px 40px;
    color: #fff;
}

.navbar .logo a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
}

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.menu li {
    position: relative;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease-in-out;
}

.menu a:hover {
    color: #1abc9c;
}

/* 드롭다운 */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 999;
    border-radius: 4px;
}

.dropdown-content li {
    padding: 10px;
}

.dropdown-content li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: block;
}

.dropdown-content li a:hover {
    background-color: #f4f6f9;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ===== 컨테이너 (모든 페이지 공통) ===== */
.container {
    max-width: 960px;
    min-height: 600px; /* ✅ 높이 일정하게 */
    margin: 40px auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ===== 페이지 제목 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #2c3e50;
}

/* ===== 버튼 ===== */
.btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.btn-submit {
    background-color: #3498db;
    color: #fff;
}

.btn-submit:hover {
    background-color: #2980b9;
}

.btn-cancel {
    background-color: #e74c3c;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #c0392b;
}

/* ===== 테이블 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.data-table th {
    background-color: #f5f5f5;
    color: #555;
    font-weight: bold;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.data-table td a {
    color: #3498db;
    text-decoration: none;
}

.data-table td a:hover {
    text-decoration: underline;
}

/* ===== 로그인/회원가입/성공 폼 ===== */
.form-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-container form {
    display: flex;
    flex-direction: column;
}

.form-container label {
    margin: 10px 0 5px;
    font-weight: bold;
    color: #333;
}

.form-container input {
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-container button {
    margin-top: 15px;
    padding: 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.form-container button:hover {
    background: #2980b9;
}

.form-container .links {
    text-align: center;
    margin-top: 15px;
}

.form-container .links a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.form-container .links a:hover {
    text-decoration: underline;
}

/* ===== 상세 페이지 (detail) ===== */
.detail-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.detail-box h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.detail-box .content {
    margin-top: 15px;
    white-space: pre-wrap; /* ✅ 줄바꿈 유지 */
    line-height: 1.6;
}

/* ===== 글쓰기 (write.jsp) ===== */
.write-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.write-container h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #2c3e50;
}

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

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

textarea {
    resize: none;
    height: 200px;
}

.btn-box {
    margin-top: 20px;
    text-align: right;
}
