@keyframes meter-animation {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

@keyframes fade {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.cc.link-active {
    text-decoration: underline;
}

.cc.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    color: white;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cc.popup-content {
    width: 50%;
    height: 50%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cc.popup-buttons {
    display: flex;
    flex-direction: row;
    justify-content: stretch;
    align-items: stretch;
    margin-top: 10px;
    width: 100%;
}

.cc.popup-buttons button#nvmd {
    background-color: #d32f2f;
    margin-right: 5px;
}

.cc.popup-buttons button.conf {
    margin-left: 5px;
}

.cc.popup-buttons button#nvmd:hover {
    background-color: #f93939;
    transition: 500ms;
}

.cc.popup-buttons button {
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: 500ms;
}

.cc.popup-buttons button:hover {
    transition: 500ms;
}

button.cc {
    width: 100%;
    padding: 10px;
    background-color: #275d29;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

button.cc:hover {
    background-color: #45a049;
}

input[type="email"].cc,
input[type="password"].cc,
input[type="text"].cc {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #275d29;
    background-color: #ffffff;
    color: #000;
    box-sizing: border-box;
}

.cc.channel-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #7d7d7d;
}

.cc.channels-list-mute {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.cc.mute-channel {
    cursor: pointer;
}

@import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");

.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#theme-select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.container {
    margin-top: 100px;
    padding: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.search {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  max-height: 40px;
  max-width: 100%;
  margin-top: 10px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 15px;
}
.card-content, .card-content h2.card-title, .card-content p.card-description {
    color: white !important;

}
.card{
  cursor: pointer;
}

.card.grid {
  width: 320px;
  height: 220px;
  margin: 7px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.card.rows {
  min-width: 100%;
  min-height: 100px;
  margin: 15px;
  margin-top: 0px;
  margin-bottom: 0px;
  overflow: hidden;
  border-radius: 18px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
}

.card.grid .card-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
  transition: all 0.3s ease;
}

.card.rows .card-bg {
  width: 100px;
  height: 100px;
  background-size: cover;
  background-position: center;
  display: inline-block;
  margin: 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

.card.grid .card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  z-index: 1;
  justify-content: space-between;
}

.card.rows .card-content {
  padding: 5px;
  flex-shrink: 1;
}

.card.rows .card-tags {
  display: none;
}

.card-title {
  font-size: 20px;
  margin: 0;
}

.card-description {
  font-size: 15px;
  margin: 10px 0;
}

.card-links {
  max-height: 0;
  overflow: hidden;
  font-size: 15px;
  transition: max-height 0.3s ease;
  display: none;
}

.card.grid:hover .card-links {
  max-height: 100px;
}

.card-links a {
  text-decoration: none;
  display: block;
  margin-top: 5px;
}

.card-tags .tag {
  padding: 5px 10px;
  border-radius: 5px;
  margin-right: 5px;
  font-size: 10px;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 5px;
}

.card.grid .star-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.card.rows .star-icon {
  order: 1;
  font-size: 24px;
  margin-left: auto;
}

.card:hover .star-icon {
  opacity: 1;
}

.profile-section {
    border-radius: 10px;
    padding: 20px;
    margin: 30px;
    margin-bottom: 30px;
}

.profile-header {
    display: flex;
    justify-content: space-evenly;    
}
.profile-edit-group {
    display: flex;
    gap: 30px;
    align-items: start;
}
.profile-picture-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.profile-picture-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-picture-container:hover .upload-overlay {
    opacity: 1;
}

.profile-info {
    flex-grow: 1;
    max-width: 400px;
}

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

.info-group label {
    display: block;
    margin-bottom: 5px;
}

.info-group input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
}

#saveChanges {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.achievements-section {
    border-radius: 10px;
    padding: 20px;
    margin: 30px;
}

.achievements-section h2 {
    margin-bottom: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.achievement-card {
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.achievement-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.achievement-info p {
    margin: 0;
    font-size: 14px;
}

.drag-over {
    border: 2px dashed dodgerblue;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

#profile-picture-upload{
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.stats{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    max-width: 400px;
    height: 100%;
    max-height: 300px;
    overflow-y: scroll;
}

.stats-container{
    width: 100%;
}

.stat{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 3px;
}

.stat-value{
    font-style: italic;
}

.stat-title{
    padding: 0;
    margin: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.w-container {
    margin-top: 100px;
    display: grid;
    gap: 20px;
    min-width: 80% !important;
    padding: 15px;
}

.current-weather {
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
}

.r,
.l {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#weather-chart-container {
    width: 100%;
    max-width: 560px;
    height: 320px;
    margin: 30px auto;
    border-radius: 12px;
    padding: 20px;
}

.forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.forecast-day {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.weather-icon {
    font-size: 2em;
    margin: 10px 0;
}

.temperature {
    font-size: 2.5em;
    font-weight: bold;
}

.conditions {
    margin: 10px 0;
}

.date {
    font-weight: bold;
    margin-bottom: 5px;
}

#searchInput {
    width: 300px;
    min-width: 10vw;
    height: 30px;
    border-radius: 2px;
    padding: 10px;
    font-size: 16px;
    margin-bottom: 20px;
}

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

li {
    display: flex;
    padding: 3px;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

li div.name {
    max-width: 50%;
    word-wrap: break-word;
}

li div.links {
    padding: 5px;
}

li div.links a {
    text-decoration: underline;
    margin: 0 5px;
}

.hidden {
    display: none;
}

.determiner > ul {
    margin-left: 30px;
}

div.r-container {
    width: 500px;

}

.loading-bar{
    width: 200px;
    height: 20px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    margin: auto;

}

.loading-bar-fill{
    width: 0;
    height: 100%;
    transition: width 0.4s ease-in-out;
}

.b-container {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  padding: 20px 0;
  position: fixed;
  width: 100%;
  right: 0;
  left: 0;
  z-index: 7500;
  top: 0;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  height: 100px;
  transition: height 0.3s ease;

}
header.collapsed {
  transition: height 0.3s ease;
  height: 50px;
}
header.collapsed h1 {
  transition: font-size 0.3s ease;
  font-size: 32px;
}
header.shadow {
  box-shadow: 0px 0px 10px #333;
}

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

.hamburger {
  display: none;
}

.r-side-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  align-self: center;
}

.r-side-nav a {
  margin: 10px;
  display: inline;
  font-size: 18px;
}

.xxx.r {
  right: 0;
  position: fixed;
  min-width: 300px;
  height: 600px;
  bottom: 0;
}

.row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.trealad {
  width: 300px;
  height: 250px;
}

.dont-see {
  align-content: center;
  display: flex;
  justify-content: center;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
  /* Header adjustments */
  header {
    flex-direction: row;
    padding: 10px 0;
    transition: all 0.3s ease;
  }

  header.expanded {
    padding: 20px 0;
  }

  header.collapsed {
    padding: 5px 0;
  }

  header h1 {
    font-size: 32px;
    margin-bottom: 10px;
  }

  /* Hamburger Menu */
  .hamburger {
    display: block;
    position: relative;
    width: 40px;
    height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  .hamburger span:nth-child(1) {
    top: 0;
  }
  .hamburger span:nth-child(2) {
    top: 8px;
  }
  .hamburger span:nth-child(3) {
    top: 16px;
  }

  /* Side Navigation */
  .r-side-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 8000;
    flex-direction: column;
    justify-content: space-evenly;
    padding-bottom: 40px;
    padding-top: 40px;
    box-sizing: border-box;
  }

  .r-side-nav.active {
    right: 0;
  }
  #loggedInReplacable {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .r-side-nav a {
    font-size: 18px;
    display: block;
    text-decoration: none;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 7999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Container adjustments */
  .container {
    margin-top: 140px;
    padding: 10px;
  }

  /* Search adjustments */
  .search {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 100px;
  }
  .action-button-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    max-height: 40px;
    width: 90%;
  }
  .toggle-btn {
    margin: 0px;
  }
  .action-button-row button {
    margin: 0px !important;
    margin-top: 20px !important;
  }
  #searchBox {
    width: 90%;
    max-width: none;
  }

  /* Card adjustments */
  .card.grid {
    width: 100%;
    height: 250px;
    margin: 10px 0;
  }

  .card-title {
    font-size: 24px;
  }

  .card-description {
    font-size: 16px;
  }

  .card-tags .tag {
    font-size: 12px;
    padding: 3px 8px;
    display: none;
  }
  .card-links {
    display: none;
  }

  /* Popup adjustments */
  .popup-content {
    width: 90%;
    height: 70%;
  }

  .popup-content #gameRequestInput {
    width: 90%;
  }

  /* Ad placements */
  .ads.r,
  .ads.l {
    display: none;
  }

  /* Tablet ad adjustments */
  .tad {
    width: 100%;
    height: auto;
    margin: 10px 0;
  }

  .trealad {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 6/5;
  }

  /* Cards container */
  .cards {
    padding: 10px;
  }

  /* Star icon adjustments */
  .star-icon {
    opacity: 1;
    font-size: 20px;
  }
}

/* Small phone adjustments */
@media screen and (max-width: 480px) {
  header h1 {
    font-size: 24px;
  }

  .container {
    margin-top: 120px;
  }

  .card.grid {
    height: 200px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-description {
    font-size: 14px;
  }
}

/* Ensure hover states work properly on touch devices */
@media (hover: none) {
  .card-links {
    max-height: none;
  }

  .card:hover {
    transform: none;
  }

  .star-icon {
    opacity: 1;
  }
}

/* style scroll bars */
/* should only exist on hover, not inturrpt document flow */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #ababab;
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: 250ms;
}

::-webkit-scrollbar-thumb:hover {
  border: 0;
  transition: 250ms;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.toggle-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 0px;
  cursor: pointer;
  padding: 10px;
  box-sizing: border-box;
  display: flex; /* Ensure consistent alignment of children */
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Prevent any overflow */
}
.toggle-btn:hover {
  background: #e0e0e0;
}
.dots-container {
  width: 20px;
  height: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 4px;
  grid-row-gap: 4px;
  align-items: center;
  justify-items: center;
  flex-shrink: 0; /* Prevent shrinking in flex layout */
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
/* Rows layout styles */
[data-current="rows"] .dots-container {
  grid-template-columns: none; /* Clear the grid layout */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
[data-current="rows"] .dot:nth-child(4) {
  display: none;
}
[data-current="rows"] .dot {
  width: 24px;
  height: 8px;
}
/* Grid layout styles */
[data-current="grid"] .dots-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
[data-current="grid"] .dot:nth-child(4) {
  display: block;
}
[data-current="grid"] .dot {
  width: 8px;
  height: 8px;
}

.action-button-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0px;
}
.action-button-row button {
  margin: 0px;
  margin-left: 5px;
}

.inxxx.grid {
  width: 300px;
  height: 200px;
  margin: 7px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.inxxx.rows {
  min-width: 100%;
  min-height: 100px;
  margin: 15px;
  margin-top: 0px;
  margin-bottom: 0px;
  overflow: hidden;
  border-radius: 18px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.inxxx h3{
    font-size: 30px;
    font-weight: bold;
}

button#sort,
button#pickforme {
  padding: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}

.card.grid .star-icon.pinned {
  opacity: 1;
  color: gold;
  text-shadow: 0 0 5px black;
}

input[type="text"] {
    height: 50px;
    width: 400px;
    font-size: 20px;
    border: none;
    padding-left: 10px;
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
}
