/* ========================= */
/* GIVEAWAYS AREA STYLING    */
/* ========================= */

/* Page section header */
.page_section h2 {
    text-align: center;
    font-family: 'Anybody', cursive;
    padding: 8px;
    margin: 0;
    color: rgb(255, 250, 175);
    transition: 0.2s;
}

/* Giveaway info font */
.giveaway_info, 
.giveaway_info p, 
.giveaway_info h3, 
.giveaway_info span {
    font-family: 'Anybody', cursive;
}

/* Ticket display */
.ticket-display {
    color: #50C878;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}

/* Center the entire list */
#giveaways_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 20px;
}

/* Giveaway card */
.giveaway_card {
    width: 560px;
    background: #334;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;  /* align text to top of image */
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.giveaway_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
}

/* Image box */
.giveaway_image img {
    width: 180px;      /* bigger image */
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    background: #223;
    padding: 6px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

/* Info text */
.giveaway_info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-height: 160px; /* matches image height */
}

.giveaway_info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #eee;
}

.giveaway_info p {
    margin: 3px 0;
    color: #ddd;
    font-size: 15px;
    line-height: 1.1em;
    letter-spacing: 1px;
}

/* Button styling */
.giveaway_info button {
    margin-top: auto;  /* push button to bottom of info column */
    padding: 9px 16px;
    font-size: 15px;
    background: #223;
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.giveaway_info button:hover {
    background: #2a2a55;
}

.g_message {
    font-size: 12px !important;
    color: #00BFFF !important;
}

.past_giveaway_time_elapsed {
    position: absolute;
    bottom: 6px;           /* fixed at bottom of card */
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #aac;
    text-align: center;
    font-family: 'Anybody', cursive;
    letter-spacing: 1px;
    text-shadow: 1px 1px 1px #121212;
    white-space: nowrap;
}

.past_giveaways_list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 10px 0;
}

.past_giveaway_card {
    position: relative;       /* needed for absolute arrow */
    display: flex;
    align-items: center;
    width: 280px;
    height: 160px;
    background: linear-gradient(135deg, rgba(55, 55, 75, 0.9), rgba(45, 45, 65, 0.9));
    border-radius: 8px;
    margin: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15);
    padding: 0;               /* remove horizontal padding to simplify halves */
    transition: 0.3s;
}

/* Split the card into left and right halves */
.past_giveaway_left,
.past_giveaway_right {
    flex: 1;                  /* each half takes 50% */
    display: flex;
    justify-content: center;   /* center content in each half */
    align-items: center;
    height: 100%;
}

/* Arrow stays absolute in the middle */
.past_giveaway_arrow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent; 
    border-bottom: 12px solid transparent;
    border-left: 16px solid #88a;
}

.past_giveaway_item, .past_giveaway_user {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.past_giveaway_item_image {
    width: 80px;           /* square, bigger */
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #223;       /* same as active giveaways */
    padding: 6px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

.past_giveaway_user_avatar {
    width: 64px;           /* slightly smaller */
    height: 64px;
    border-radius: 6px;
    margin-top: 6px;
}

.past_giveaway_user_chance {
    font-size: 12px;
    color: #ffd700; /* gold */
    margin-top: 4px;
    font-family: 'Anybody', cursive;
    text-shadow: 1px 1px 1px #121212;
}

/* HOVER OVERLAY */
.past_giveaway_hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 25, 0.75); /* simple dark overlay */
    display: flex;  /* hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;           /* smaller space between lines */
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    z-index: 10;

    opacity: 0;          /* for smooth fade */
    transition: 0.3s;
}

.past_giveaway_hover:hover{
    opacity: 1;
}

/* Common style for all hover text */
.past_giveaway_hover div {
    font-family: 'Trebuchet MS';
    color: #fff;  /* single color for simplicity */
    font-size: 13px;
    line-height: 1.0em !important;  /* tighter line spacing */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.hover_item_name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.hover_winner_label,
.hover_personal_label {
    font-size: 12px;
    font-weight: 600;
    color: #ffdd55 !important;
    text-align: center;
}

.hover_winner_name,
.hover_personal_chance {
    font-size: 13px;
    margin-bottom: 10px;
    color: #fff;
    text-align: center;
}

.giveaway_placeholder:hover,
.past_giveaway_placeholder:hover{
    background: rgba(255, 255, 255, 0.1);
}

.info_box {
    width: 260px;
    padding: 42px;
    margin: 10px 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    text-align: center;
    color: #ddd;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.info_box i {
    font-size: 28px;
    opacity: 0.8;
}

/* ========================= */
/* RESPONSIVE LAYOUT (<600px)*/
/* ========================= */
@media (max-width: 600px) {
    .giveaway_card {
        flex-direction: column; /* image on top */
        width: 95%;
        padding: 18px;
        text-align: center;
        align-items: center;
    }

    .giveaway_image img {
        width: 180px;
        height: 180px;
        margin-bottom: 10px;
    }

    .giveaway_info {
        max-height: none; /* allow text to grow */
    }

    .giveaway_info h3 {
        font-size: 18px;
    }

    .giveaway_info button {
        width: 100%;
        padding: 10px;
    }
}

/* ========================= */
/* PAGE SECTION H2 MEDIA     */
/* ========================= */
@media (min-width: 1500px) {
    .page_section h2 {
      font-size: 28px;
      letter-spacing: 3px;
    }
}

@media (min-width: 800px) and (max-width: 1500px) {
    .page_section h2 {
      font-size: 26px;
      letter-spacing: 2px;
    }
}

@media (min-width: 460px) and (max-width: 799px) {
    .page_section h2 {
      font-size: 24px;
      letter-spacing: 1px;
    }
}

@media (max-width: 459px) {
    .page_section h2 {
      font-size: 20px;
      letter-spacing: 1px;
    }
}


.purchase_modal_bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    font-family: "Anybody", sans-serif;
}

.purchase_modal_box {
    width: 420px;
    max-width: calc(100% - 16px); /* 8px margin on each side on small screens */
    min-height: 340px;
    background: #445;
    border-radius: 16px;
    padding: 25px;
    color: #dde1ff;
    text-align: center;
    box-shadow: 0 0 18px rgba(0,0,0,0.5);
    font-family: "Anybody", sans-serif;
}

.purchase_modal_title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 2px;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 4px rgba(140,160,255,0.7);
}

.purchase_modal_item {
    font-size: 16px;
    margin-bottom: 12px;
    opacity: 0.9;
    color: #00BFFF;
}

.purchase_modal_price {
    margin-bottom: 18px;
    font-size: 16px;
    color: #50C878;
    font-weight: bold;
}

.purchase_model_price_label{
    font-size: 16px;
    letter-spacing: 1px;
    color: white;
}

.purchase_modal_label {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: white;
    letter-spacing: 1px;
}

.purchase_modal_input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(120, 120, 140, 0.4);
    background: #334;
    color: #fff;
    margin-bottom: 18px;
    font-size: 17px;
    text-align: center;
    outline: none;
}

.purchase_modal_input:focus {
    border-color: #8aa0ff;
    box-shadow: 0 0 8px rgba(120,150,255,0.6);
}

.purchase_modal_total {
    margin-bottom: 22px;
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: bold;
    color: white;
}

.purchase_modal_buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.pm_confirm_btn,
.pm_cancel_btn {
    width: 48%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: 0.15s;
}

.pm_confirm_btn {
    text-shadow: 1px 1px 1px #121212;
    letter-spacing: 1px;
    background: #2ecc71;
    color: white;
    transition: 0.2s;
}

.pm_confirm_btn:hover {
    background: #46e985;
}

.pm_cancel_btn {
    text-shadow: 1px 1px 1px #121212;
    letter-spacing: 1px;
    background: rgb(253, 110, 100);
    color: white;
    transition: 0.2s;
}

.pm_cancel_btn:hover {
    background: rgb(240, 81, 70);
}

#pm_total_cost{
    color: #50C878 !important;
}

.purchase_modal_total i.fa-ticket {
    color: #50C878;
}