:root {
  /* Cores de Destaque */
  --primary: #2563eb;
  --primary-hover: #1d4ed8; 
  --accent: #f59e0b;

  /* Tons Neutros */
  --bg-page: #ffffff;
  --bg-surface: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

body {
    margin: 0;
    padding: 0;
}

svg {
    background-color: var(--bg-surface);
    color: var(--primary);
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid var(--border);
    padding: 5px;
    border-radius: 5px;
}

svg:hover {
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

.search-container {
  position: relative;
  width: 75%;
  margin-left: 20%;
  margin-top: 2.5%;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.search-container .search-form {
    position: relative;
    width: 100%;
}

.search-container .search-bar {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.search-container .search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

nav {
  background-color: var(--bg-surface);
  color: var(--text-main);
  width: 100%;
  height: 5%;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}

nav ul li {
  margin-right: 20px;
  height: 100%;
}

nav ul li a {
  color: var(--text-main);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  height: 100%;
}

nav ul li a:hover {
  background-color: var(--primary-hover);
  color: white;
}

.left {
  float: left;
}

.right {
  float: right;
}

aside {
  background-color: var(--bg-surface);
  color: var(--text-main);
  width: 15%;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  border-right: 1px solid var(--border);
  overflow: auto;
}

aside img.logo {
  display: block;
  margin: 0 auto 20px auto;
}

aside a.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.8em;
  font-weight: bold;
  margin-bottom: 64px;
}

aside a.logo:hover {
  color: var(--primary-hover);
}

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

aside ul li {
  margin-bottom: 15px;
}

aside ul li a {
  color: var(--text-main);
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  border-radius: 4px;
}

aside ul li a:hover,
aside ul li a.active {
  background-color: var(--primary-hover);
  color: white;
}

aside ul li ul li:first-child {
  border-top: 2px solid var(--border);
}

aside ul li ul li:last-child {
  border-bottom: 2px solid var(--border);
}

main {
  background-color: var(--bg-page);
  color: var(--text-main);
  margin-left: 20%;
  margin-top: 2.5%;
  padding: 10px;
}

main > .linha,
main > .content-row {
  margin-left: 15%;
  width: 80%;
}

main > .coluna,
main > .content-column {
  margin-left: 15%;
  width: 80%;
}

main > p {
  line-height: 1.6;
  margin-left: -2.5%;
  width: 85%;
}

main > h1 {
  color: var(--primary);
  text-align: left;
  margin-left: -2.5%;
  width: 85%;
}

.linha,
.content-row {
  display: flex;
  flex-direction: row;
  padding: 10px;
  border-bottom: 2px solid var(--border);
}

.linha:last-child,
.content-row:last-child {
    border-bottom: none;
}

.coluna,
.content-column {
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  border-right: 2px solid var(--border);
  min-width: 20%;
}

.coluna > h2,
.content-column > h2 {
  background-color: var(--bg-surface);
  color: var(--primary);
  border: 2px solid var(--border);
  padding: 10px;
  border-radius: 5px;
}

.coluna:first-child,
.content-column:first-child {
    margin-left: -25%;
}

.coluna:last-child,
.content-column:last-child {
    border-right: none;
}

.content-row > .content-column::before {
    content: attr(aria-label);
    background-color: #333;
    color: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    width: 90%;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    display: block;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  width: 80%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
  color: var(--primary);
}

.card p {
  color: var(--text-muted);
}

.content > .card {
    margin: 10px 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.content > .card > .title {
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    width: fit-content;
    text-decoration: none;
    font-weight: bold;
    display: block;
}

.content > .card > .text {
    line-height: 1.6;
    font-size: 24px;
    color: #333;
    text-decoration: none;
    display: block;
    padding: 8px 16px;
}

.content > .card > .title:hover {
    background-color: #555;
}

.content > .card > .text:hover {
    text-decoration: underline;
}

.content-post {
    margin: 10px 10px;
    padding: 15px;
}

.content-post > .title {
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    width: fit-content;
    text-decoration: none;
    font-size: 1.6em;
    font-weight: bold;
    display: block;
}

.content-post > .text {
    line-height: 1.6;
    font-size: 24px;
    color: #333;
    text-decoration: none;
    display: block;
    padding: 8px 16px;
}

hr {
    border: none;
    border-top: 2px solid #ccc;
    margin: 20px 0;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.pagination {
  width: 75%;
  margin: 20px auto;
  text-align: center;
}

.pagination .btn-page,
.pagination .btn-prev,
.pagination .btn-next,
.pagination a {
  color: var(--primary);
  float: none;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid var(--border);
  margin: 0 4px;
  border-radius: 4px;
}

.pagination a.active {
  background-color: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.pagination a:hover:not(.active):not(.disabled) {
  background-color: var(--primary-hover);
  color: white;
}

.breadcrumb {
  font-size: 18px;
  color: var(--text-muted);
  width: 75%;
  margin-top: 7%;
  margin-left: 20%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-surface);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb a:hover {
  background-color: var(--primary-hover);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.breadcrumb span {
  color: var(--text-main);
  font-weight: bold;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 10px;
  margin: 0 20%;
  background-color: #f9f9f9;
  width: 70%;
}

#comment-container {
  display: none;
  flex-direction: row;
}

#comment-container .icons {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  flex-shrink: 0;
  padding-top: 4px;
}

#comment-container .icons a {
  text-decoration: none;
  color: #000;
  font-size: 18px;
  cursor: pointer;
}

#comment-container .icons span {
  margin-right: 10px;
}

#comment-container .comments {
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
  padding-top: 4px;
  cursor: pointer;
}

#comment-container .comment-area {
  background-color: #f0f0f5;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 140px;
}

#comment-container .comment-area .author {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  padding: 4px;
  border-radius: 3px;
  border: 1px solid #aaa;
  background-color: #fff;
  width: fit-content;
  max-width: 100%;
}

#comment-container .comment-area textarea {
  flex: 1;
  width: 100%;
  resize: none;
  font-size: 16px;
  border: none;
  background: transparent;
  font-family: sans-serif;
  outline: none;
  box-sizing: border-box;
  padding-bottom: 35px;
  margin-top: 4px;
}

#comment-container .comment-area .submit {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#comment-container .comment-area .submit:hover {
  background-color: #222;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 20%;
  height: 100%;
  background-color: #fff;
  border-left: 2px solid #ccc;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  overflow-y: auto;
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  position: relative;
}

.modal .close {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 20px;
  cursor: pointer;
}

.modal h3 {
  margin-top: 0;
}

.comment-list p {
  margin: 10px 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

#login-container {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: Arial, sans-serif;
}

#instance-input {
  padding: 4px;
  font-size: 14px;
}

#login-button {
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}
.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translateX(0);
    border-color: #ff0000;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}