body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.title {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 48px;
  color: #4feaa9;
  text-align: center;
  animation: flicker 1.5s infinite alternate;
}

.title-link {
  text-decoration: none;
  color: inherit; 
} 

.subtitle {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: center;
}

@keyframes flicker {

  0%,
  19.999%,
  22%,
  62.999%,
  64%,
  100% {
    opacity: 0.99;
    text-shadow: 0 0 2px #4feaa9, 0 0 10px #4feaa9, 0 0 20px #4feaa9, 0 0 40px #4feaa9, 0 0 80px #4feaa9, 0 0 90px #4feaa9, 0 0 100px #4feaa9, 0 0 150px #4feaa9;
  }

  20%,
  21.999%,
  63% {
    opacity: 0.4;
    text-shadow: none;
  }
}

.sort-buttons {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.sort-button {
  padding: 10px 20px;
  background-color: #1f1f1f;
  border: none;
  border-radius: 8px;
  color: #e0e0e0;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
  text-decoration: none;
}

.sort-button:hover {
  background-color: #03dac5;
}

.header {
  font-size: 1.5em;
  margin: 20px 0;
  color: #03dac5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.message {
  margin: 10px 0;
  padding: 15px;
  background-color: #1f1f1f;
  border-radius: 8px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  justify-content: space-between;
  max-width: 800px;
}

@media only screen and (min-width: 768px) {
  .message {
    min-width: 400px;
  }
}

.message-details {
  display: flex;
  flex-direction: column;
}

.message-author {
  font-size: 14px;
  font-weight: 500;
  color: #bb86fc;
}

.message-text {
  font-size: 16px;
  margin-top: 5px;
}

.message-votes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote {
  display: flex;
  align-items: center;
  color: #e0e0e0;
  cursor: pointer;
}

.vote-buttons {
  display: flex;
  color: #e0e0e0;
  cursor: pointer;
  min-width: 90px;
  justify-content: space-between;
}

.vote i {
  color: #e0e0e0;
  transition: background-color 0.3s;
}

.vote i:hover {
  color: #03dac5;
}

.message-details-metadata {
  display: flex;
  flex-direction: row;
}

.badge-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: middle;
}

.share-icon, .preview-icon {
  cursor: pointer;
  font-size: 12px;
  color: #2196f3;
  vertical-align: middle;
}

.preview-off-icon {
  cursor: not-allowed;
  font-size: 12px;
  color: #5d5d5d;
  vertical-align: middle;
}

.share-icon:hover {
  color: #1976d2;
}

.no-posts {
  cursor: default;
}

.no-posts:hover {
  cursor: default;
  background-color: #1f1f1f;
}

.emote-wrapper {
  position: relative;
  display: inline-block;
}

.emote-icon {
  cursor: pointer;
}

.emote-tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid;
  border-color: rgba(3, 218, 197, 0.2);
  position: absolute;
  bottom: 125%;
  /* Pozycja nad emotką */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}

.emote-wrapper:hover .emote-tooltip {
  visibility: visible;
  opacity: 1;
}

.vote-update-animation {
  color: #03dac5;
  transition: color 0.5s ease-in-out;
}

.vote-update-animation-end {
  color: #e0e0e0;
  /* Kolor domyślny */
}

.voted-up i,
.voted-down i {
  color: #03dac5;
}

.main-container {
  display: grid;
  /* Użycie Grid */
  grid-template-columns: 5fr 1fr;
  /* Dwie kolumny: większa dla wiadomości, mniejsza dla prawej kolumny */
  grid-template-columns: 80% 20%;
  gap: 20px;
  max-width: 1200px;
  width: 100%;
  /* Zajmuje pełną szerokość */
  align-items: start;
  /* Dopasowanie elementów do góry */
}

.messages-column {
  justify-self: right;
  max-width: 800px;
  /* Maksymalna szerokość dla wiadomości */
  width: 100%;
  /* Dostosowanie do pełnej szerokości dostępnej w kolumnie */
}

#right-column {
  justify-self: start;
  /* Przyklejenie prawej kolumny do lewej strony swojej siatki */
  max-width: 400px;
  width: 100%;
  /* Dostosowanie do pełnej szerokości kolumny */
}

@media only screen and (max-width: 768px) {
  .main-container {
    grid-template-columns: 1fr;
    /* Jedna kolumna na mniejszych ekranach */
    gap: 20px;
  }

  #right-column,
  .messages-column {
    max-width: 100%;
    /* Rozciągnięcie na pełną szerokość */
  }
}

.right-column {
  background-color: #1f1f1f;
  padding: 5px 20px 20px 20px;
  border-radius: 8px;
  max-width: 400px;
  margin-bottom: 20px;
}

.right-column h2 {
  font-size: 20px;
  color: #03dac5;
  margin-bottom: 10px;
}

.right-column p {
  font-size: 14px;
  color: #e0e0e0;
}

@media only screen and (max-width: 768px) {
  .main-container {
    flex-direction: column;
    /* Ustaw kolumny jedna pod drugą na małych ekranach */
  }

  .right-column {
    max-width: 100%;
  }

  .messages-column {
    max-width: 100%;
  }
}

#sponsor-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: #1f1f1f;
  color: #e0e0e0;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  max-width: 300px;
  z-index: 1000;
  display: flex;
  /* Umożliwia umieszczenie serca obok tekstu */
  gap: 10px;
  /* Odstęp między sercem a tekstem */
  align-items: center;
  /* Wyśrodkowanie w pionie */
}

.heart-icon {
  width: 24px;
  height: 24px;
  position: relative;
  background-color: #4feaa9;
  display: inline-block;
  clip-path: polygon(50% 0%, 100% 30%, 100% 75%, 50% 100%, 0% 75%, 0% 30%);
  animation: flicker 1.5s infinite alternate;
}

#sponsor-box a {
  color: #03dac5;
  text-decoration: none;
  font-weight: bold;
}

#sponsor-box a:hover {
  text-decoration: underline;
}

#sponsor-box strong {
  font-size: 16px;
  color: #4feaa9;
}


#wrapper {
  position: absolute;
  margin-left: 50px;
  margin-top: 50px;
  animation: pulse 1s infinite;
}

#pulsingheart {
  position: relative;
}

#pulsingheart:before,
#pulsingheart:after {
  position: absolute;
  content: "";
  left: 27px;
  /* Połowa szerokości serca */
  top: 0;
  width: 20px;
  /* Połowa szerokości serca */
  height: 32px;
  /* Proporcja wysokości (40px * 0.8) */
  background: #03dac5;
  border-radius: 20px 20px 0 0;
  /* Promień dopasowany do szerokości */
  transform: rotate(-45deg);
  transform-origin: 0 100%;
  animation: pulsecolor 1s infinite, glow 1s infinite;
  box-shadow: 0 0 6px 2px rgba(12, 143, 95, 0.6);
  /* Glow dopasowany do rozmiaru */
}

#pulsingheart:after {
  left: 9px;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
  animation: pulsecolor 1s infinite, glow 1s infinite;
  box-shadow: 0 0 6px 2px rgba(12, 143, 95, 0.6);
  /* Glow dopasowany do rozmiaru */
}

.left-50 {
  margin-left: 50px;
}

#toggle-button {
  font-size: 12px;
  color: white
}

#right-column-container {
  display: block;
  /* Możesz zmienić na "none", aby domyślnie były ukryte */
}

.patron-fix {
  display: flex;
  justify-content: center;
}

@keyframes pulse {
  10% {
    transform: scale(1.1)
  }
}

@keyframes pulsecolor {
  10% {
    background: #06955e
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 6px 2px rgba(12, 143, 95, 0.6);
  }

  50% {
    box-shadow: 0 0 10px 4px rgba(27, 233, 158, 0.6);
  }
}

.month-select-container {
    display: none; /* Domyślnie ukryty */
    margin: 10px 0;
    text-align: center;
}

.month-select {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #2d2d2d;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 200px;
}

.month-select:hover {
    background: #3d3d3d;
}

.month-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #03dac5;
}

.month-select option {
    background: #2d2d2d;
    color: #fff;
    padding: 8px;
}

/* Pokazuj select tylko gdy sortowanie jest best/worst */
.sort-best .month-select-container,
.sort-worst .month-select-container {
    display: block;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 600px;
    padding: 0 20px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #2c2c2c;
    border-radius: 25px;
    background-color: #1f1f1f;
    color: #e0e0e0;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #03dac5;
    box-shadow: 0 0 5px rgba(3, 218, 197, 0.3);
}

.search-input::placeholder {
    color: #666;
}

.search-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #03dac5;
    color: #1f1f1f;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(3, 218, 197, 0.2);
}

.search-button:hover {
    background-color: #00c4b4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(3, 218, 197, 0.3);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(3, 218, 197, 0.2);
}

.search-button .material-icons {
    font-size: 20px;
}

.search-button .button-text {
    font-weight: 500;
}

/* Responsywność */
@media only screen and (max-width: 768px) {
    .search-container {
        padding: 0 15px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .search-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .search-button .material-icons {
        font-size: 18px;
    }
}

/* Kontener kontrolek */
.controls-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.controls-group {
    background-color: #1f1f1f;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Sekcja filtrów */
.filters-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Przyciski sortowania */
.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    height: 46px;
}

.sort-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #2c2c2c;
    border: 2px solid transparent;
    border-radius: 25px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}

.sort-button:hover {
    background-color: #03dac5;
    color: #1f1f1f;
    transform: translateY(-2px);
}

.sort-button .material-icons {
    font-size: 20px;
}

/* Select miesiąca */
.month-select-wrapper {
    display: none;
}

/* Pokazujemy select tylko dla sort-best i sort-worst */
body.sort-best .month-select-wrapper,
body.sort-worst .month-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #2c2c2c;
    padding: 8px 16px;
    border-radius: 25px;
    height: 46px;
    box-sizing: border-box;
}

.month-select-wrapper .material-icons {
    color: #03dac5;
}

.month-select {
    background: transparent;
    border: none;
    color: #e0e0e0;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
}

.month-select:focus {
    outline: none;
}

/* Sekcja wyszukiwania */
.search-section {
    margin-top: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #2c2c2c;
    border-radius: 25px;
    padding: 5px 15px;
}

.search-icon {
    color: #03dac5;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    color: #e0e0e0;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: #666;
}

.search-button {
    background-color: #03dac5;
    color: #1f1f1f;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #00c4b4;
    transform: translateY(-2px);
}

/* Responsywność */
@media only screen and (max-width: 768px) {
    .controls-container {
        padding: 10px;
        margin: 15px auto;
    }

    .controls-group {
        padding: 15px;
        border-radius: 8px;
    }

    /* Przyciski sortowania na mobile */
    .filters-section {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .sort-buttons {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
        height: auto;
    }

    .sort-button {
        width: 100%;
        justify-content: center;
        padding: 12px;
        height: auto;
    }

    /* Select miesięcy na mobile */
    .month-select-wrapper {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .month-select {
        width: 100%;
        text-align: center;
    }

    /* Wyszukiwarka na mobile */
    .search-section {
        margin-top: 15px;
    }

    .search-container {
        flex-direction: column;
        background: transparent;
        padding: 0;
        gap: 8px;
    }

    .search-input {
        width: 100%;
        padding: 12px;
        border-radius: 8px;
        text-align: center;
    }

    .search-button {
        width: 100%;
        justify-content: center;
        border-radius: 8px;
        padding: 12px;
    }

    /* Dostosowanie wielkości czcionek */
    .sort-button, 
    .month-select,
    .search-input,
    .search-button {
        font-size: 14px;
    }

    /* Poprawienie marginesów i paddingów */
    .title {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Dodatkowe style dla bardzo małych ekranów */
@media only screen and (max-width: 360px) {
    .controls-container {
        padding: 5px;
    }

    .controls-group {
        padding: 10px;
    }

    .sort-button, 
    .month-select,
    .search-input,
    .search-button {
        font-size: 13px;
        padding: 10px;
    }
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.controls-group {
    animation: fadeIn 0.3s ease-out;
}

/* Style dla wyników wyszukiwania */
.search-results-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: #2c2c2c;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #03dac5;
    font-weight: 500;
}

.no-results, .error-message, .loading {
    text-align: center;
    padding: 40px 20px;
    color: #e0e0e0;
    background-color: #2c2c2c;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results .material-icons, 
.error-message .material-icons {
    font-size: 48px;
    color: #03dac5;
    margin-bottom: 15px;
}

.loading {
    color: #03dac5;
    font-weight: 500;
}

.error-message {
    color: #cf6679;
}

.error-message .material-icons {
    color: #cf6679;
}

/* Animacja dla loadera */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}
