body {
    font-family: Arial, sans-serif;
    background: url('/images/bg_tile.jpg') repeat;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 20px;
}

header {
    width: 100%;
    justify-content: center;
}

header h1 {
    padding: 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    margin: 10px auto;
    width: 90%;
    max-width: 600px;
    text-align: center;
    color: #228b22;
    font-size: 2.5em;
}

h1 {
    font-size: 2.5em;
    color: #228b22;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #6e9226;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    gap: 0;
}

nav ul li {
    position: relative;
    margin: 0 4px;
    padding: 0;
    line-height: 0;
}

nav ul li a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    background-color: #6b8e23;
    border-radius: 4px;
    transition: background-color 0.25s, color 0.25s;
    font-size: 1em;
    line-height: 1;
    vertical-align: middle;
    height: 100%;
    box-sizing: border-box;
}

nav ul li a:hover {
    background-color: #ddcc88;
    color: #ffffff;
}

nav ul li ul,
nav ul li ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #6e9226;
    padding: 0;
    min-width: 180px;
    z-index: 1000;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

nav ul li ul li ul {
    top: 0;
    left: 100%;
}

nav ul li:hover > ul,
nav ul li ul li:hover > ul {
    display: block;
}

nav ul li ul li {
    width: 100%;
}

nav ul li ul li a {
    border-radius: 0;
    padding: 10px;
}

nav ul li hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 6px 10px;
}

.content {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 20px;
    width: 98%;
}

button,
button[type="submit"] {
    background-color: #48bb78;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 10px;
}

button:hover,
button[type="submit"]:hover {
    background-color: #38a169;
}

button[type="submit"]:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    background-color: #fff;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

input[type="text"],
input[type="password"],
textarea,
input[type="number"] {
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    box-sizing: border-box;
}

input[type="number"] {
    width: 150px;
}

hr {
    width: 50%;
    margin: 20px auto;
    border: 1px solid #ddd;
    display: block;
    max-width: 45% !important;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.inventory-item {
    border: 1px solid #ccc;
    padding: 15px;
    background-color: #fff;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.shop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 20px auto;
    max-width: 900px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.shop-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin: 10px 0;
}

.visit-shop {
    display: inline-block;
    padding: 8px 15px;
    background-color: #6b8e23;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.25s;
}

.visit-shop:hover {
    background-color: #ddcc88;
}

.pet-showcase {
    display: flex;
    overflow-x: auto;
    padding: 20px;
    gap: 20px;
    scroll-snap-type: x mandatory;
    justify-content: start;
    flex-wrap: nowrap;
}

.pet-card {
    background-color: #fff9e6;
    border: 3px solid #cccccc;
    border-radius: 12px;
    padding: 20px;
    min-width: 260px;
    max-width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
    position: relative;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.pet-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.pet-card h2 {
    margin: 10px 0;
    font-size: 1.5em;
    color: #333;
}

.pet-columns {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 15px;
}

.pet-column {
    flex: 1;
    text-align: left;
}

.pet-column h3 {
    font-size: 1.1em;
    color: #336600;
    margin-bottom: 6px;
}

.active-pet {
    border: 4px solid gold !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5) !important;
}

.active-star {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.4em;
    color: gold;
    text-shadow: 1px 1px 2px #444;
}

.banner-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.section-title {
    font-weight: bold;
    font-style: italic;
    color: #ffffcc;
    background-color: #4a6c1b;
    cursor: default;
    padding: 5px 10px;
    display: block;
    text-align: center;
}

.npc-dialogue {
    background: rgba(255, 255, 240, 0.8);
    border: 2px solid #ccb;
    border-radius: 12px;
    padding: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.npc-dialogue img {
    max-width: 140px;
    border-radius: 8px;
}

.npc-dialogue h3 {
    margin-top: 0;
    color: #336600;
}

nav ul li > a::after {
    content: ' ▾';
    font-size: 0.8em;
}

nav ul li ul li > a::after {
    content: '';
}

.bell-link::after {
    content: none !important;
}

.pet-description {
    white-space: pre-line;
    font-family: Georgia, serif;
    font-size: 0.95em;
    text-align: left;
}

.notif-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8em;
    color: #ffffff;
    text-decoration: none;
}

.notif-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8em;
}

.mini-badges img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.badge-legend { font-size:.9em; color:#335533; }

blockquote {
  margin: 6px 0; padding: 6px 10px;
  border-left: 3px solid #8fbf5a; background: #f7fbf2;
  font-style: italic;
}

.bbcode-code { background:#f4f7f9; border:1px solid #cfd9e3; border-radius:6px; padding:10px; overflow:auto; }
.bbcode-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.95em; }
blockquote { margin:6px 0; padding:6px 10px; border-left:3px solid #8fbf5a; background:#f7fbf2; }
.bbcode-toolbar .bbbtn, .bbcode-toolbar button { padding:4px 8px; border:1px solid #c8d8a8; background:#e9f5da; border-radius:6px; cursor:pointer; }
.bbcode-toolbar .bbbtn:hover, .bbcode-toolbar button:hover { filter:brightness(0.96); }

/* ==== BBCode toolbar buttons (forums + PMs) ==== */
.bbcode-toolbar button,
.bbcode-toolbar .bbbtn {
  appearance: none;
  --bb-bg: #4f8a10;        /* main green */
  --bb-bg-hover: #3d6d0c;  /* hover */
  --bb-bg-active: #325a0a; /* pressed */
  --bb-border: #2b4f08;
  --bb-text: #ffffff;

  background: var(--bb-bg);
  color: var(--bb-text) !important;
  border: 1px solid var(--bb-border);
  border-radius: 8px;
  padding: 4px 10px;
  line-height: 1.1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

.bbcode-toolbar button:hover,
.bbcode-toolbar .bbbtn:hover {
  background: var(--bb-bg-hover);
}

.bbcode-toolbar button:active,
.bbcode-toolbar .bbbtn:active {
  background: var(--bb-bg-active);
  transform: translateY(1px);
}

.bbcode-toolbar button:focus-visible,
.bbcode-toolbar .bbbtn:focus-visible {
  outline: 3px solid #ffe082; /* gold focus ring */
  outline-offset: 1px;
}

/* Ensure the B/I/U/S glyphs inherit the white text color */
.bbcode-toolbar .bbbtn strong,
.bbcode-toolbar .bbbtn em,
.bbcode-toolbar .bbbtn u,
.bbcode-toolbar .bbbtn span {
  color: inherit;
}

.post-actions { margin-left: .5rem; font-size: .9em; }
.post-actions a { margin-right: .5rem; }
.post-edited { opacity: .7; font-size: .85em; margin-top: 4px; }