/* Variables */
:root {
    --dux_purple: #8f62b4;
    --dux_orange: #f99a00;
    --select_orange: #ffb53e;
}

.selected {
    color: var(--select_orange) !important;
}

/* General Styles */
body {
    font-family: 'Press Start 2P', cursive;
    background-color: #4d4d4d;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

p {
    margin: 0;
}

/* Header */
header {
    text-align: center;
    margin-top: 20px;
}

.logo {
    height: 3em;
    padding: 10px;
}

/* Title */
h1,
h2 {
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    text-transform: uppercase;
    margin: 0;
}


/* Style for the top bar */
.top-bar {
    background-color: var(--dux_purple);
    color: white;
    text-align: center;
    font-weight: bold;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    z-index: 1000;
    bottom: 0px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 5px;
}

.bottom-bar {
    position: fixed;
    top: 0;
    background-color: var(--dux_purple);
    width: 100%;
    height: 68px;
    max-height: 68px;
    display: grid;
    align-items: center;
    grid-template-columns: repeat(3, 1fr);
}



/* Shrink/hide the top-bar on scroll */
body.scrolled .top-bar {
    transform: translateY(-100%);
}

/* Flex container holding all sections */
.flex-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 90%;
    gap: 20px;
    padding-top: 30px;
    padding-left: 15px;
    padding-right: 15px;
    margin: auto;
}

.flexy {
    display: flex;
    /* flex-direction: column; */
    gap: 5px;
}

.info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.register_form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    font-size: 16px;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.container {
    width: 90%;
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
    color: white;
}

.container-info {
    width: 100%;
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
    color: white;
}

.email {
    font-size: 12px;
    word-break: break-word;
}

.users {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.user_info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user_buttons {
    display: flex;
    gap: 10px;
}

.user_top {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid grey;
    margin-bottom: 5px;
    padding-bottom: 5px;
    width: 100%;
}

.username {
    display: flex;
    align-items: center;
}

.user {
    display: flex;
    flex-direction: column;

    color: white;
    padding: 10px;
    width: 90%;
    margin: auto;
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
}

.admin_btn_container {
    padding-bottom: 10px;
}

/* Form inputs */
.form-control {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

/* Forms */
.default-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    /* padding: 20px; */
}


/* Flash messages */
.flash-messages {
    background: #4CAF50D9;
    padding: 10px 50px;
    border-radius: 20px;
    margin: auto;
    width: fit-content;
    text-align: center;
    color: #f7f7f7;
    font-weight: 700;
}

.flash-messages ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.flash-messages li {
    margin: 10px 0;
    padding: 6px 30px;
    border-radius: 5px;
}

.success {
    background-color: green;
}

.error {
    background-color: red;
    padding: 10px;
    padding-left: 20px;
    border-radius: 10px;
    font-weight: 600;
    margin: 0;
}


/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    padding: 0 10px;
}

.table th, .table td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
}

.table th {
    background-color: #f4f7fa;
}

/* Link styles */
a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    display: inline-block;
    color: var(--dux_orange);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    background: none;    
}

/* Button styles */
.btn:not(:has(svg)) {  
    padding: 10px;
}

.btn:hover {
    transform: translateY(-2px);
}

.bottom-bar-buttons {
    display: flex;
    justify-content: end;
    padding-right: 10px;
}

button[type="submit"].btn {
    border: 2px solid var(--dux_orange);
}

button[type="submit"].btn:has(svg) {
    border: none;
}

.buy_btn {
    color: var(--dux_orange);
    background:none;
    border:none;
    cursor:pointer;
    font-weight: 700;
}

.joinbutton {
  background: #007bff;
  border-radius: 20px;
  font-weight: 700;
}

.drink {
    display: flex   ;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    width: 60%;
    text-align: center;
}

.drink_buy {
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
    color: white;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drink_buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.drink_name {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid grey;
    margin-bottom: 5px;
    padding-bottom: 5px;
    width: 100%;
}

.drink_manage {
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
    color: white;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drinks_list {
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.unpaid-drinks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
}

.unpaid-drinks-container {
    width: 90%;
    color: white;
}

.unpaid_drink {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    padding: 10px;
    gap: 10px;
    width: 90%;
    margin: auto;
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
}

.select_form {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: end;
}

.drink-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    gap: 10px;
}

.drink-card.paid {
    background-color: #c2ffd4;
}

.drink-card.unpaid {
    background-color: #fbd3d1;
}

.drink-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-direction: column;
}

.drink-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
}

.drink-dates {
    margin-top: 10px;
    color: #555;
    line-height: 1.4;
    text-align: center;
}

.ordered-date,
.paid-date {
    display: block;
}

.status-label {
    font-weight: bold;
}

.paid .status-label {
    color: green;
}

.unpaid .status-label {
    color: red;
}


.trophy {
    display: none;
    margin: 0 auto;
    height:3em;
}

.drink_img {
    width: 40px;
}

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

.registrants {
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.registrant {
    background-color: #3b3b3b;
    border: 2px solid var(--dux_purple);
    color: white;
    padding: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.registrant-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.admin-div {
    display: flex;
    justify-content: center;
    align-items: center;
}


.hide {
    display: none;
}

.hide-email {
    display: default;
}

/* Responsive Grid Layout */
@media (min-width: 525px) {
    .trophy {
        display: block;
    }
    
}

@media (min-width: 600px) {
    .drinks_list, .users, .registrants, .unpaid-drinks  {
        grid-template-columns: repeat(2, 1fr);  /* Two columns for medium screens (50% width each) */
    }

    .table th, .table td {
        box-sizing: border-box;
    }

}

/* Responsive Table Wrapper for Users Table */
@media (max-width: 768px) {
    .users-table {
      display: block;
      width: 100%;
      overflow-x: auto;
      white-space: nowrap;
    }

    .users-table th,
    .users-table td {
      white-space: nowrap;
    }

    .hide-email {
        display: none;
    }
  }



@media (min-width: 900px) {
    .drinks_list, .users, .registrants, .unpaid-drinks {
        grid-template-columns: repeat(3, 1fr);  /* Three columns for larger screens (33% width each) */
    }

}

@media (min-width: 1200px) {
    .drinks_list, .users, .registrants, .unpaid-drinks {
        grid-template-columns: repeat(3, 1fr);  /* Four columns for extra-large screens (25% width each) */
    }

}


/* Google Fonts: Press Start 2P is perfect for 8-bit */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.leaderboard-container {
    width: 100%;
    padding-top: 30px;
}

/* Pixel select dropdown */
.pixel-select {
    background: #3b3b3b;
    color: #fff;
    border: 3px solid var(--dux_purple);
    font-family: 'Press Start 2P', cursive;
    padding: 8px;
    margin-bottom: 20px;
    margin-right: 20px;
    cursor: pointer;
}

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

/* Table */
.leaderboard-table {
    font-family: 'Press Start 2P', cursive;
    margin: auto;
    width: 90%;
    border-collapse: collapse;
    background: #3b3b3b;
}

.leaderboard-table th {
    border: 2px solid var(--dux_purple);
    padding: 12px;
    text-align: center;
    color: #fff;
}

.leaderboard-table td {
    border: 2px solid var(--dux_purple);
    padding: 10px 5px;
    text-align: center;
    color: #fff;
}

.leaderboard-table th {
    background: var(--dux_purple);
    color: #fff;
    text-shadow: 1px 1px 0px #000;
}
