body {
  background-color: #f9f9f9;
  padding-top: 60px;
}

#nav {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.rounded-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  padding: 20px;
  margin-bottom: 20px;
}

.reset-box {
  max-width: 400px;
  margin: 80px auto;
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.reset-box h2 {
  font-weight: bold;
  margin-bottom: 20px;
}

.form-control {
  border-radius: 8px;
  padding: 10px 12px;
}

.btn-reset {
  background-color: #e4b571;
  color: white;
  font-weight: 500;
  border-radius: 8px;
  padding: 10px 18px;
  width: 100%;
}

.btn-reset:hover {
  background-color: #cc6f4b;
}

.text-small {
  font-size: 0.9rem;
}

.notion-style-btn {
  padding: 6px 18px;
  font-size: 0.95rem;
  background-color: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.notion-style-btn:hover {
  background-color: #eaeaea;
  border-color: #ccc;
  color: #111;
  text-decoration: none;
}

.tag-btn {
  border-radius: 50px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  padding: 5px 15px;
  font-size: 0.9rem;
  transition: all 0.2s ease-in-out;
}
.tag-btn:hover {
  background-color: #f0f0f0;
}
.tag-btn.active {
  background-color: #444;
  color: white;
  border-color: #444;
}

.community-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  background-color: #fff;
}

.community-img-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 比例 (9/16 = 0.5625) */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.community-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.sidebar {
  position: sticky;
  top: 90px;
}
.btn-join {
  background-color: #ffd700;
  font-weight: bold;
}
.badge-custom {
  background-color: #eee;
  color: #333;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.85rem;
}
footer {
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.custom-link {
  color: #e4b571;
  text-decoration: underline;
  font-weight: 500;
}
.custom-link:hover {
  color: #cc6f4b;
  text-decoration: none;
}

.form-control {
  border-radius: 8px;
  padding: 10px 12px;
}

.text-small {
  font-size: 0.9rem;
}

.notion-style-btn.btn-lg {
  font-size: 1.1rem;
  padding: 16px 24px;
  background-color: #c38f48;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.notion-style-btn.btn-lg:hover {
  background-color: #ae7c3a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
  color: #fff;
}

.nav-item {
  display: flex;
  align-items: center;
}

.upload-box {
  border: 2px dashed #ccc;
  border-radius: 10px;
  height: 220px;
  background-color: #fffdf8;
  cursor: pointer;
  transition: border-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.upload-box:hover {
  border-color: #999;
}
.upload-icon {
  color: #999;
  font-size: 2.5rem;
}

.tag-btn {
  cursor: pointer;
}

.dropdown-menu {
  border-radius: 12px;
  font-size: 0.95rem;
  padding: 8px 0;
  min-width: 180px;
}

.dropdown-item {
  padding: 8px 16px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.navbar .dropdown-toggle {
  color: #333 !important;
  font-weight: 500;
}

.navbar .dropdown-toggle:hover {
  color: #111 !important;
}

#previewContainer img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

.tag-btn {
  border-radius: 50px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
  padding: 6px 14px;
  margin: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.tag-btn.active {
  background-color: #444;
  color: white;
  border-color: #444;
}

@media (max-width: 576px) {
  .upload-box {
    height: 180px;
  }
  .upload-icon {
    font-size: 2rem;
  }
}

/* 新增文章卡片樣式 */
.course-add {
  border: 2px dashed #ddd;
  background-color: #f9f9f9;
  color: #666;
  transition: all 0.2s ease;
}

.course-add:hover {
  border-color: #e4b571;
  background-color: #fffaf2;
  color: #e4b571;
}

.add-icon {
  font-size: 2rem;
  color: #999;
}

.course-add:hover .add-icon {
  color: #e4b571;
}

.hidden {
  display: none !important;
}

#header-user-action {
  padding-left: 8px;
  padding-right: 8px;
}

.text-pre-line {
  white-space: pre-line;
}

.nav-link {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.required {
  color: #dc3545;
  font-weight: bold;
}