/* 🌿 Safe Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  font-family: sans-serif;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

#root, #__next {
  isolation: isolate;
}
/*----------------------------------------------*/

body {
    margin: 0;
    font-family: sans-serif;
    background-image: url(/petzu/assets/petzbak.gif);
}

header {
    background: #6ea9cf;
    background-image: url(/petzu/assets/watercolor.png);
    color: white;
    padding: 1rem;
    text-align: center;
}

@font-face {
  font-family: 'title';
  src: url("/petzu/assets/Amity Jack.ttf");
}

header h1 {
    font-family: 'title';
    font-size: 4rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: #fff;
    -webkit-text-stroke: 1px #1f1b60;
    text-shadow:
      -1px -1px 0 #1f1b60,
       1px -1px 0 #1f1b60,
      -1px  1px 0 #1f1b60,
       1px  1px 0 #1f1b60;
}

a:link {
  color: #1c7bbb;
  text-decoration: none;
}

a:visited {
  color: #557c96;
}

a:hover {
  color: #1c7bbb;
  text-decoration: underline;
}

a:active {
  color: red;
  text-decoration: none;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #5d717e;
}

h2 {
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #444;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.25rem;
}

h4 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #444;
    font-weight: bold;
}

h5, h6 {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: bold;
}

ul {
    margin-top: 1rem;
    padding-left: 1rem;
}

.layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

nav, main, aside {
    padding: 1rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.small {
    font-size: 0.9rem;
    color: #666;
}

@media (min-width: 768px) {
    .layout {
        flex-direction: row;
    }

    nav {
        width: 20%;
    }

    main {
        width: 60%;
    }

    aside {
        width: 20%;
    }
}

.user-menu a {
    display: block;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.user-menu a:hover {
    text-decoration: underline;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
}

input, textarea, select, button {
    padding: 0.5rem;
    font-size: 1rem;
}

label {
    font-weight: bold;
}

.field-group {
    display: flex;
    flex-direction: column;
}

.tutorial-list {
    max-width: 100%;
    margin: 0 auto;
}

.tutorial-item {
    border-bottom: 1px solid #ccc;
    padding: 1rem 0;
}

.tutorial-item:last-child {
    border-bottom: none;
}

.meta {
    font-size: 0.85rem;
    color: #666;
}

.actions {
    margin-top: 0.5rem;
}

.actions a {
    margin-right: 1rem;
    color: #2b5d8a;
    text-decoration: none;
}

.actions a:hover {
    text-decoration: underline;
}

.meta {
    font-size: 0.9rem;
    color: #666;
}

.attachments {
    margin-top: 1rem;
}

.attachments ul {
    padding-left: 1.2rem;
}

.attachments li {
    margin-bottom: 0.5rem;
}

button {
    margin-top: 0.5rem; 
    padding: 0.5rem; 
    width: 100%;
}

.button {
    display: inline-block;
    padding: 0.5rem .5rem;
    background: #488cb9;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: .75rem;
    border: 1px solid #555;
}

a.button {
    color: white;
}

a.button:hover {
    text-decoration: none;
}

.button:hover {
    background: #58a2d3;
}

.button.danger {
    background-color: #a33;
    color: white;
}

.button.danger:hover {
    background-color: #c44;
}

.button.reply {
    background-color: #fdfdfd;
    color: #000;
    width: 5rem;
    border-width: 1px;
    border-color:#bbbbbb;
}

.button.reply:hover {
    background-color: #f5f5f5;
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.message.success {
    background-color: #d1f7d6;
    color: #265e29;
    border: 1px solid #6ac66a;
}

.message.error {
    background-color: #fddede;
    color: #8a1f1f;
    border: 1px solid #f88;
}
.comments {
    margin-top: 2rem;
}

.comment {
    border: 1px solid #ddd;
    background-color: #fdfdfd;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
}

.comment strong {
    color: #444;
}

.comment time {
    font-size: 0.8rem;
    color: #888;
    margin-left: 0.25rem;
}

.comment p {
    margin: 0.5rem 0 0;
}

.comment-delete-button {
    background: none;
    border: none;
    color: #a33;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 1rem;
}

.comment-delete-button:hover {
    color: #d33;
    text-decoration: underline;
}

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.markdown-toolbar button {
  width: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  background: #f4f4f4;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.markdown-toolbar button:hover {
  background: #e0e0e0;
}

#color-popup {
  display: none;
  position: absolute;
  z-index: 10;
  background: white;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  text-align: center;
  font-family: sans-serif;
}

#color-popup label {
  font-size: 1rem;
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
}

#color-popup input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 60px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  margin-bottom: 1rem;
  display: inline-block;
}

#color-popup input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

#color-popup input[type="color"]::-webkit-color-swatch {
  border: none;
}

.popup-button {
  display: inline-block;
  width: 90px;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0.5rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  background-color: #f4f4f4;
  transition: background 0.2s;
  text-align: center;
}

.popup-button:hover {
  background-color: #e4e4e4;
}

.popup-button.cancel {
  background-color: #f8f8f8;
  color: #888;
}

.popup-button.cancel:hover {
  background-color: #f0f0f0;
}

.popup-button-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.9rem;
}

code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: Consolas, Monaco, monospace;
}

/* Inline code only */
:not(pre) > code {
  background: #eee;
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

/* Code blocks inside <pre> */
pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

dl {
  margin: 1em 0;
}

dt {
  font-weight: bold;
  margin-top: 0.5em;
}

dd {
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}

.video-embed {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 1rem 0;
}
.centered-block {
    text-align: center;
}

.centered-block img {
    display: inline-block;
    max-width: 100%;
    margin: 1rem 0;
}

.subtle-button {
    background: none;
    border: none;
    margin-top: 0.25rem;
    padding-left: 0;
    text-align: left;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.subtle-button:hover {
    color: #000;
}

/* Wrap for heading + hamburger */
#mobile-nav .nav-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Hamburger only */
#mobile-nav .hamburger {
    font-weight: bold;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: #488cb9;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

#mobile-nav .nav-content {
    display: block;
}

/* On small screens */
@media (max-width: 768px) {
    #mobile-nav .nav-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    #mobile-nav .nav-content {
        display: none;
    }

    #mobile-nav .nav-content.open {
        display: block;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 1rem;
    }

    nav {
      background: #FFFFFF00;
      border: none;
    }
}

/* Always show full nav on desktop */
@media (min-width: 768px) {
    #mobile-nav .nav-content {
        display: block !important;
    }

    #mobile-nav .nav-header {
        display: none;
    }
}
