﻿/* board.css - Modern & Responsive Style */

.container {
  max-width: 900px;
  margin: 30px auto 40px auto;
  padding: 0 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

h2 {
  margin-bottom: 20px;
  color: #333;
  text-align: center;
  font-weight: 700;
  font-size: 1.8rem;
}

.btn {
  display: inline-block;
  margin-bottom: 15px;
  padding: 10px 22px;
  background-color: #3a86ff;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  user-select: none;
}

.btn:hover {
  background-color: #265fd1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  box-shadow: 0 0 5px #ddd;
  margin-bottom: 20px;
}

thead th {
  background-color: #3a86ff;
  color: white;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid #ddd;
  font-weight: 600;
}

tbody td {
  padding: 10px 8px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

tbody tr:hover {
  background-color: #f0f8ff;
}

tbody td a {
  color: #3a86ff;
  text-decoration: none;
}

tbody td a:hover {
  text-decoration: underline;
}

/* 페이지네비게이션 */
.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a,
.pagination strong {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 14px;
  color: #3a86ff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  user-select: none;
}

.pagination strong {
  background-color: #3a86ff;
  color: white;
  cursor: default;
}

.pagination a:hover {
  background-color: #265fd1;
  color: white;
}

/* form 요소 스타일링 */

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #444;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #3a86ff;
  outline: none;
}

textarea {
  min-height: 120px;
}

.errors {
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.errors ul {
  margin: 0;
  padding-left: 20px;
}

.meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.content {
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.actions {
  margin-top: 20px;
}

.actions a,
.actions button {
  margin-right: 10px;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  user-select: none;
  text-decoration: none;
  display: inline-block;
}

.actions a.btn-primary,
.actions button.btn-primary {
  background-color: #3a86ff;
  color: white;
}

.actions a.btn-primary:hover,
.actions button.btn-primary:hover {
  background-color: #265fd1;
}

.actions a.btn-secondary,
.actions button.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.actions a.btn-secondary:hover,
.actions button.btn-secondary:hover {
  background-color: #545b62;
}

.actions a.btn-danger,
.actions button.btn-danger {
  background-color: #dc3545;
  color: white;
}

.actions a.btn-danger:hover,
.actions button.btn-danger:hover {
  background-color: #a71d2a;
}

/* 반응형 */

@media (max-width: 600px) {
  .container {
    padding: 0 10px;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    display: none;
  }

  tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
  }

  tbody td {
    padding-left: 50%;
    position: relative;
    text-align: left;
    border: none;
    border-bottom: 1px solid #eee;
  }

  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 12px;
    font-weight: 600;
    color: #444;
  }
}
