@import url('https://fonts.googleapis.com/css2?family=Tiny5&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');
@font-face {
  font-family: 'BoldPixels';
  src: url('../fonts/BoldPixels.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
  
    h2 {
        font-size: 20px;
        font-weight: 100;
      }
    
    h3 {
        font-size: 17px;
        font-weight: 100;
      }

    .community-container {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
    }
    .left-column, .right-column {
      flex: 1;
      min-width: 300px;
    }
    .search-results {
      margin-top: 15px;
    }
    .user-card, .friend-card {
      display: flex;
      align-items: center;
      gap: 15px;
      padding: 10px;
      border: 1px solid #27313d;
      margin-bottom: 10px;
    }
    .user-avatar, .friend-avatar {
      width: 48px;
      height: 48px;
    }
    .user-info, .friend-info {
      flex-grow: 1;
    }
    .user-info a, .friend-info a {
      text-decoration: none;
    }
    .username {
        font-size: 18px;
        color: #cadbe6;
        transition: color 0.3s;
    }
    .username:hover {
        color: #e3f4ff;
    }
    .username.role-creative-director, .username.role-creative-director:hover { color: #e67e22; }
    .username.role-game-designer, .username.role-game-designer:hover { color: #9b59b6; }
    .username.role-game-dev, .username.role-game-dev:hover { color: #f0244d; }
    .username.role-moderator, .username.role-moderator:hover { color: #43bb49; }
    
    .user-actions, .friend-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        margin-left: auto;
    }
    
    .btn-icon {
        width: 25px;
        height: 25px;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-width: 1px;
        border-style: solid;
        background-color: transparent;
        cursor: pointer;
    }

    .btn-icon[disabled] {
        background-color: #27313d;
        border-color: #27313d;
    }

    .btn-icon[disabled] img {
        opacity: 0.5;
    }

    .btn-icon img {
        width: 20px;
        height: 20px;
        transition: filter 0.3s;
    }

    .btn-icon.btn-accept img {
        filter: invert(65%) sepia(23%) saturate(1142%) hue-rotate(75deg) brightness(94%) contrast(88%); /* green */
    }
    .btn-icon.btn-reject img {
        filter: invert(30%) sepia(50%) saturate(2250%) hue-rotate(330deg) brightness(90%) contrast(95%); /* red */
    }
    .btn-icon.btn-warning img {
        filter: invert(83%) sepia(30%) saturate(5419%) hue-rotate(349deg) brightness(97%) contrast(93%); /* yellow */
    }
    .btn-icon.invite-btn img, .btn-icon.btn-open img, .btn-icon.send-energy-btn img {
        filter: invert(91%) sepia(10%) saturate(319%) hue-rotate(170deg) brightness(93%) contrast(88%); /* default color */
    }

    button.btn-icon:not([disabled]):hover img {
        filter: brightness(0) saturate(100%) invert(1); /* white */
    }

    .btn-icon.btn-accept { border-color: #43bb49; }
    .btn-icon.btn-reject { border-color: #dc3545; }
    .btn-icon.btn-warning { border-color: #f1c40f; }
    .btn-icon.invite-btn, .btn-icon.btn-open, .btn-icon.send-energy-btn { border-color: #cbdde8; }


    button.btn-icon.btn-accept:not([disabled]):hover { background-color: #43bb49; }
    button.btn-icon.btn-reject:not([disabled]):hover { background-color: #dc3545; }
    button.btn-icon.btn-warning:not([disabled]):hover { background-color: #f1c40f; }
    button.btn-icon.invite-btn:not([disabled]):hover, button.btn-icon.btn-open:not([disabled]):hover, button.btn-icon.send-energy-btn:not([disabled]):hover { background-color: #e3f4ff; }

    button.btn-icon.invite-btn:not([disabled]):hover img, button.btn-icon.btn-open:not([disabled]):hover img, button.btn-icon.send-energy-btn:not([disabled]):hover img {
        filter: invert(7%) sepia(16%) saturate(1379%) hue-rotate(188deg) brightness(92%) contrast(92%); /* dark color on white hover */
    }

span.item-name {
    font-size: 14px;
}

.visitors-section {
  margin-top: 20px;
  width: 100%;
}

span.visitor-time {
  font-size: 12px;
  font-weight: 100;
}

.visitors-section h2 {
  font-size: 20px;
  border-bottom: 1px solid #27313d;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.visitors-container {
    display: flex;
}

.visitors-grid {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.visitor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 90px;
}

.visitor-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid #27313d;
  object-fit: cover;
  margin-bottom: 5px;
  transition: transform 0.2s;
}

.visitor-name {
  font-size: 16px;
  font-weight: 100;
  margin-top: -5px;
  color: #cadbe6;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.visitor-name:hover {
    color: #e3f4ff;
}

.visitor-timestamp {
  font-size: 12px;
  color: #6c757d;
  margin-top: 2px;
}

.visitor-name.role-creative-director {
  color: #e67e22;
}

.visitor-name.role-game-designer {
  color: #9b59b6;
}

.visitor-name.role-game-dev {
  color: #f0244d;
}

.visitor-name.role-moderator {
  color: #43bb49;
}


@media (max-width: 480px) {
  .visitors-grid {
    justify-content: center;
  }
}


.post-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.report-button-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #27313d;
    text-align: left;
}

.mod-panel-container {
    margin-top: 20px;
}

#reports-table a, 
#mod-actions-table a,
#leaderboard-table .player-info a,
#levels-table .player-info a {
  color: #cadbe6;
  text-decoration: none;
  transition: color 0.3s;
}

#reports-table a:hover, 
#mod-actions-table a:hover,
#leaderboard-table .player-info a:hover,
#levels-table .player-info a:hover {
  color: #e3f4ff;
}

.overlay {
    position

}

#duck-name-input, .markdown-textarea {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #27313d;
    color: #f0f0f0;
    font-size: 15px;
}

.markdown-textarea {
    min-height: 120px;
    resize: vertical;
}

.action-button {
    padding: 12px 25px;
}

.action-button:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

.hunger-bar-bg {
    width: 90%;
    height: 25px;
    background-color: #34495e;
    margin: 15px auto;
    padding: 4px;
    box-sizing: border-box;
}

.hunger-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #f39c12);
    transition: width 0.5s ease-in-out;
}

.description-section {
    margin-top: 20px;
    border-top: 1px solid #27313d;
    padding-top: 20px;
}

.duck-adoption-box, .duck-status-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.pixelated-large {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}

#duck-name-input {
    width: 80%;
    margin: 10px auto;
    text-align: center;
}

.hunger-bar-container {
    width: 80%;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.hunger-bar-background {
    width: 70%;
    height: 20px;
    background-color: #34495e;
    border: 1px solid #27313d;
    overflow: hidden;
}

.hunger-bar-foreground {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.5s ease-in-out;
}

#description-section {
    width: 100%;
    margin-top: 20px;
}

#duck-description {
    background-color: rgba(17, 21, 31, 0.8);
    border: 1px solid #27313d;
    padding: 15px;
    min-height: 100px;
    text-align: left;
    margin-bottom: 10px;
}

#duck-desc-textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 10px;
}

body {
  font-family: Tiny5, sans-serif;
  margin: auto;
  padding: 50px 20px 20px 20px;
  background-image: url('../assets/interface/dark_mode_bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #f0f0f0;
  position: relative;
  z-index: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.global-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: rgba(17, 21, 31, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  border-bottom: 1px solid #27313d;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}

.desktop-nav {
  display: none;
}

.desktop-nav a {
  color: #cadbe6;
  text-decoration: none;
  margin: 0 12px;
  font-size: 18px;
  transition: color 0.3s;
}

.desktop-nav a:hover {
  color: #e3f4ff;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1010;
}

.hamburger-menu span {
  width: 30px;
  height: 3px;
  background-color: #f0f0f0;
  transition: all 0.3s linear;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: rgba(17, 21, 31, 0.9);
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1005;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav a {
  font-size: 1.5em;
  color: #cadbe6;
  text-decoration: none;
  padding: 20px 0;
  width: 100%;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

.mobile-nav a:hover {
  background-color: #2a2a3a;
  color: #e3f4ff;
}

.container {
  max-width: 800px;
  margin: 30px auto;
  background-color: rgba(17, 21, 31, 0.8);
  padding: 20px 30px;
}

.account-section {
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #27313d;
}

div#redeem-message {
    margin-top: 20px;
    margin-bottom: 20px;
}

input[type="file"]#avatar-upload {
  display: none;
}

.avatar-upload-label {
  display: inline-block;
  padding: 5px 20px;
  color: #cbdde8;
  border: 1px solid #cbdde8;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  background-color: transparent;
  font-size: 15px;
  font-family: Tiny5, sans-serif;
  text-align: center;
}

.avatar-upload-label:hover {
  background-color: #e3f4ff;
  color: #0d0d17;
}

.form-container {
  max-width: 500px;
  margin: 20px auto;
  background-color: rgba(17, 21, 31, 0.8);
  padding: 30px;
}

.form-section {
  margin-bottom: 25px;
}

h1 {
  font-family: 'Tiny5', sans-serif;
  margin-bottom: 20px;
  color: #f0f0f0;
  font-size: 25px;
}

.links {
  margin-top: 20px;
  text-align: center;
}

.links a {
  color: #cadbe6;
  text-decoration: none;
  margin: 0 10px;
  padding: 5px 10px;
  transition: background-color 0.3s, color 0.3s;
}

.links a:hover {
  background-color: #2a2a3a;
  color: #e3f4ff;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.with-icon {
  position: relative;
}

.form-group.with-icon .input-icon {
  position: absolute;
  top: 65%;
  right: 12px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  pointer-events: none;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #e3f4ff;
  font-weight: normal;
}

input, textarea, select {
  display: block;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #27313d;
  background-color: transparent;
  color: #f0f0f0;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s;
  resize: vertical;
}

.form-group.with-icon input {
  padding-right: 50px;
}

input:disabled, textarea:disabled {
  color: #4c5d71;
  background-color: #1c222b;
}

input::placeholder,
textarea::placeholder {
  color: #4c5d71;
  opacity: 1;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #007bff;
}

#element-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23f0f0f0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-6.5%200-12.3%203.2-16.1%208.1-3.8%204.9-4.7%2011.6-2.9%2017.8l130.6%20227.4c3.8%206.5%2010.5%2010.3%2017.8%2010.3s14-3.8%2017.8-10.3L289.9%2090.3c1.8-6.2.9-12.9-2.9-17.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  cursor: pointer;
  resize: none;
  padding-right: 40px;
}

#element-select option {
  background-color: #11151f;
  color: #f0f0f0;
}

#current-element-display {
    font-family: 'Tiny5', cursive;
    font-size: 25px;
    margin-bottom: 20px;
    text-align: left;
    display: block;
    width: fit-content;
    margin-left: 0;
    margin-right: auto;
}

button {
  padding: 10px 20px;
  color: #cbdde8;
  border: 1px solid #cbdde8;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  background-color: transparent;
  font-size: 15px;
  font-family: Tiny5, sans-serif;
}

.button-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

button:hover:not(:disabled) {
  background-color: #e3f4ff;
  color: #0d0d17;
}

button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
  border-color: #6c757d;
  color: #f0f0f0;
}

.button-wrapper {
  text-align: left;
  margin-top: 10px;
}

.button-wrapper button {
  margin-left: 10px;
  margin-bottom: 10px;

}

.button-wrapper button:first-child {
  margin-left: 0;
}

.sort-controls {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.sort-controls button {
  margin: 0 5px;
}

.sort-controls button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

button.btn-danger {
  background-color: transparent;
  color: #dc3545;
  border-color: #dc3545;
}

button.btn-danger:hover {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}

.loading, .error-message {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #cadbe6;
}

.message {
  padding: 10px 29px;
  margin: auto;
  text-align: center;
  font-size: 14px;
}

.error-message, .message.error-message {
  background-color: #4a2525;
  color: #ff8a8a;
  border: 1px solid #d94545;
  width: auto;
}

.success-message, .message.success-message {
  background-color: #1c3a1e;
  color: #a5d6a7;
  border: 1px solid #59aa5c;
  width: auto;
}

.hidden {
  display: none;
}

#game-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#game {
  border: 1px solid #27313d;
  background-color: rgba(17, 21, 31, 0.8);
}

.role-creative-director {
  color: #e67e22;
}

.role-game-designer {
  color: #9b59b6;
}

.role-game-dev {
  color: #f0244d;
}

.role-moderator {
  color: #43bb49;
}

.user-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

div#global-message-container {
    margin-top: 23px;
    margin-bottom: -20px;
}

.user-profile-link {
  color: #cadbe6;
  text-decoration: none;
  font-size: 18px;
  cursor: context-menu;
}

.user-profile-link:hover {
  color: #e3f4ff;
}

.user-role {
  font-size: 13px;
  margin-top: -3px;
  cursor: context-menu;
}

.profile-element {
  text-align: center;
  font-size: 20px;
}

.profile-join-date {
  text-align: center;
  font-size: 15px;
  color: #cadbe6;
  margin-top: -10px;
  margin-bottom: 20px;
}

.element-fire { color: #e69622; }
.element-water { color: #4f8bff; }
.element-nature { color: #86e071; }
.element-ground { color: #bf945d; }
.element-shadow { color: #696969; }
.element-light { color: #ffe068; }
.element-life { color: #c5f069; }
.element-storm { color: #7c55dd; }
.element-soul { color: #ff9cfb; }
.element-air { color: #e0e0e0; }
.element-mind { color: #70f2ea; }

.element-magic {
  background: radial-gradient(circle, #f04589, #6a00ff, #635ff9, #ff7e00, #ffe300);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 15s linear infinite;
  background-size: 400% auto;
}

.element-magma {
  background: radial-gradient(circle, #ff0000, #ff8f00, #7e4831);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 15s linear infinite;
  background-size: 400% auto;
}

.element-mist {
  background: radial-gradient(circle, #e0e0e0, #c4c4c4, #a1a1a1, #858585, #787878);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 15s linear infinite;
  background-size: 400% auto;
}

.element-frost {
  background: radial-gradient(circle, #d3ebf9, #00f7ff, #83f1df, #7487fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 15s linear infinite;
  background-size: 400% auto;
}

.element-crystal {
  background: radial-gradient(circle, #8a2be2, #4169e1, #32e07e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 15s linear infinite;
  background-size: 400% auto;
}

.element-death {
  color: #a53333;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

.profile-header {
  position: relative;
}

.speech-bubble {
  position: absolute;
  top: 25px;
  left: calc(50% + 80px);
  background-color: #2a2a3a;
  padding: 10px 15px;
  border: 1px solid #27313d;
  font-size: 0.9em;
  width: auto;
  white-space: nowrap; 
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent #2a2a3a transparent transparent;
}

.avatar-small {
  width: 40px;
  height: 40px;
  vertical-align: middle;
  border: 1px solid #27313d;
}

.avatar-preview {
  width: 128px;
  height: 128px;
  border: 1px solid #27313d;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  color: #6c757d;
  font-size: 14px;
}

.file-info {
  font-size: 15px;
  color: #cadbe6;
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px 15px;
  text-align: left;
}

th {
  background-color: transparent;
  border-bottom: 1px solid #27313d;
}

#leaderboard-body tr, #levels-body tr {
    border-bottom: 1px solid #27313d;
}

#leaderboard-body tr:last-child, #levels-body tr:last-child {
    border-bottom: none;
}


tr:hover {
  background-color: #2a2a3a;
}

.rank {
  font-size: 20px;
  text-align: center;
}

.player-info {
  display: flex;
  align-items: center;
}

.player-info .player-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.player-info img {
  width: 40px;
  height: 40px;
  margin-right: 15px;
  object-fit: cover;
}

.player-info a {
  color: #cadbe6;
  font-size: 18px;
  text-decoration: none;
}

.player-info a:hover {
  color: #e3f4ff;
}

.player-element {
    font-size: 15px;
    font-weight: 100;
    margin-top: 2px;
}

.points {
  font-size: 18px;
  font-weight: 100;
  text-align: right;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.profile-header {
  text-align: center;
  margin-bottom: 30px;
}

.profile-avatar-large {
  width: 126px;
  height: 126px;
  border: 1px solid #27313d;
  margin-bottom: 15px;
  object-fit: cover;
}

.profile-username {
  font-size: 30px;
  font-weight: 100;
  margin: 0;
}

.profile-details {
  text-align: left;
  width: 100%;
}

.profile-role {
  font-family: Tiny5;
  font-size: 20px;
  color: #cadbe6;
  margin-top: -30px;
  margin-bottom: 20px;
  text-align: center;
}

.profile-description {
  font-size: 1em;
  line-height: 1.6;
  color: #cadbe6;
  background-color: transparent;
  border: 1px solid #27313d;
  padding: 15px;
  margin-bottom: 20px;
}

.achievements-section {
  margin-top: 20px;
  width: 100%;
}

.achievements-section h2 {
  font-size: 25px;
  border-bottom: 1px solid #27313d;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.achievement-item {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: 1px solid #27313d;
  padding: 15px;
  margin-bottom: 10px;
}

.achievement-icon {
  width: 46px;
  height: 56px;
  margin-right: 20px;
  image-rendering: pixelated;
}

.achievement-text {
  flex-grow: 1;
}

.achievement-title {
  font-size: 1.2em;
  margin: 0 0 5px 0;
}

.achievement-description {
  margin: 0;
  font-size: 1em;
  color: #cadbe6;
}

.profile-description h1, .profile-description h2, .profile-description h3 {
  margin-top: 0;
  padding-bottom: 5px;
}
.profile-description p {
  margin-top: 0;
}
.profile-description a {
  color: #cadbe6;
}
.profile-description code {
  background-color: #2a2a3a;
  padding: 2px 4px;
}
.profile-description pre {
  background-color: #2a2a3a;
  padding: 10px;
  overflow-x: auto;
}

.currency-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}
  
  .currency-icon {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}
  
  .currency-value {
    font-size: 20px;
}

@media (min-width: 769px) {
  .hamburger-menu {
    display: none;
  }
  .desktop-nav {
    display: flex;
  }
}

@media (max-width: 768px) {
  body {
    padding: 70px 10px 10px 10px;
  }

  h1 {
    font-size: 30px;
  }

  .account-section h2 {
    font-size: 25px;
}

  .container, .form-container {
    padding: 15px;
  }
  
  .desktop-nav {
    display: none;
  }

  #leaderboard-table thead {
    display: none;
  }

  #leaderboard-table, #leaderboard-table tbody, #leaderboard-table tr, #leaderboard-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #leaderboard-table tr {
    margin-bottom: 15px;
    border: 1px solid #27313d;
    padding: 10px;
  }

  #leaderboard-table td {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #27313d; 
    text-align: right;
  }

  #leaderboard-table tr td:last-child {
    border-bottom: none; 
  }

  #leaderboard-table td::before {
    font-weight: normal;
    text-align: left;
    margin-right: 10px;
  }

  #leaderboard-table td:nth-of-type(1)::before { content: "Pozycja:"; }
  #leaderboard-table td:nth-of-type(2)::before { content: "Gracz:"; }
  #leaderboard-table td:nth-of-type(3)::before { content: "Punkty:"; }

  #leaderboard-table td.player-info {
    justify-content: flex-end; 
  }
  
  #leaderboard-table td.player-info::before {
      flex-grow: 1;
      text-align: left;
  }
}

.tabs-container {
  display: flex;
  border-bottom: 1px solid #27313d;
  margin-bottom: 15px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 18px;
  font-family: 'Tiny5', sans-serif;
  color: #cadbe6;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px; 
  transition: color 0.3s, border-color 0.3s;
}

.tab:hover {
  color: #e3f4ff;
}

.tab.active {
  color: #cadbe6;
  border-bottom-color: #cadbe6;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8em;
  }
  
  .tabs-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tab {
    font-size: 15px;
    padding: 8px 10px;
    flex-basis: 30%;
    flex-grow: 1;
    text-align: center;
  }

  .button-wrapper {
    text-align: center;
  }

  .button-wrapper button {
    width: 100%;
    margin-left: 0;
    margin-bottom: 10px;
  }

  .button-wrapper button:last-child {
    margin-bottom: 0;
  }
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.profile-level-badge {
    position: absolute;
    bottom: -5px;
    right: -24px;
    width: 35px;
    height: 40px;
    background-color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Tiny5', sans-serif;
    font-size: 25px;
    color: white;
    z-index: 10;
    padding-left: 5px;
}

.loot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loot-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loot-popup {
    background-color: rgba(17, 21, 31, 0.8);
    padding: 30px;
    text-align: center;
    position: relative;
    border: 1px solid #27313d;
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.loot-overlay.visible .loot-popup {
    transform: scale(1);
}

.loot-popup .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #cadbe6;
}

.loot-icon-large {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    image-rendering: pixelated;
}

.loot-popup p {
    font-size: 1.2em;
    margin-bottom: 25px;
    color: #f0f0f0;
}

.loot-popup .button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.loot-popup button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.loot-popup .button-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

.loot-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loot-reward-value {
    font-size: 25px;
    color: #cadbe6;
    margin-top: 0px;
}

.element-change-message {
    margin-top: 20px;
    font-size: 1.1em;
}

.item-box .button-container {
    margin-left: 15px;
}

.item-box .open-button {
    padding: 8px 12px;
    font-size: 14px;
}

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(17, 21, 31, 0.8);
    border: 1px solid #27313d;
    padding: 15px;
    transition: transform 0.2s, border-color 0.2s;
}

.item-box:hover {
    border-color: #cadbe6;
}

.item-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    image-rendering: pixelated;
}

.item-name {
    flex-grow: 1;
    font-size: 14px;
    text-align: left;
}

.item-quantity {
    font-size: 16px;
    font-weight: 100;
    color: #cadbe6;
    min-width: 40px;
    text-align: right;
}

#char-counter {
    text-align: right;
    font-size: 0.8em;
    color: #6c757d;
}

.post-card {
    background-color: rgba(17, 21, 31, 0.8);
    border: 1px solid #27313d;
    padding: 20px;
    margin-bottom: 20px;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #27313d;
    margin-bottom: 15px;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-author-name {
    font-weight: normal;
}

.post-date {
    font-size: 0.8em;
    color: #6c757d;
    margin-left: auto;
}

.post-content {
    line-height: 1.6;
    word-wrap: break-word;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

}
