/* ===== FIXED LAYOUT ===== */

/* Body and wrapper fixes */
body {

    margin: 0;
    padding: 0;
    background: url(../img/bg_global_big.jpg) top/cover no-repeat fixed;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.wrapper {
    min-width: 95vw;
    position: relative;
    margin: 50px auto;
    margin-top: 220px;
}

/* .wrapper {
    min-width: 95vw;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 1;
    margin: 50px auto;
    margin-top: 0px;
} */

.box-banner {
    height: 150px;
    background-size: cover;
    border-radius: 10px;
    /* margin-bottom: 20px; */
    position: relative;
    top: 0;
    /* Required for sticky positioning to work */
    z-index: 11000;
    /* background-color: #01270e; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.box-banner::before {
    content: "";
    position: absolute;
    left: 0px;
    top: 0px;
    /* transform: translateY(-50%); */
    min-width: 50%;

    max-height: 50%;
    height: 50%;
    /* Adjust as needed */
    min-height: 35%;
    /* Adjust as needed */
    background: url(../img/logo-left.png) no-repeat left center;
    background-size: contain;
}

.box-banner::after {
    content: "";
    position: absolute;
    right: 0px;
    top: 0px;
    /* transform: translateY(-50%); */
    min-width: 50%;
    max-height: 50%;
    height: 50%;
    /* Adjust as needed */
    min-height: 35%;
    /* Adjust as needed */
    background: url(../img/logo-right.png) no-repeat right center;
    background-size: contain;
}

/* Main content box */
.box {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: visible;
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
    min-height: 150px;
}

.counter {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.prize-qty-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 10px;
}

.export-btn {
    margin-left: 10px;
}

/* 
.box {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    overflow: visible;
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
    min-height: 150px;
}

.counter {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.7);
}
*/

/* Header box */
.box2 {
    /* background-color: rgba(255, 202, 255, 0.0); */
    /* border: 2px solid rgba(255, 255, 255, 0.9); */
    /* backdrop-filter: blur(3px);*/
    /* border-radius: 10px; */

    background: url(../img/bg_global_big.jpg) top/cover no-repeat;
    /* background-size: 100% 100%; */
    background-position: 0px 370px;
    position: sticky;
    /* padding: 20px; */
    margin-bottom: 20px;
    text-align: center;
    min-height: 370px;
    min-width: 100%;
    top: 0;
    z-index: 10000;
    transform: translate(-50%, -50%) scale(0.8);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.box2 h1 {
    color: #f3d22f !important;
    font-size: 4.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.box2 h2 {
    color: #435160 !important;
    font-size: 1.3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
}

.box2 .lucky {
    color: #626568 !important;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

/* Hide the text elements since they're in the image */
.box2 h1,
.box2 h2,
.box2 .lucky {
    display: none;
}

/* Countdown section - fixed positioning */
.countdown {
    margin: 40px 0;
    text-align: center;
}

.countdown-time {
    text-align: center;
    margin: 20px 0;
}

.countdown-results {
    text-align: center;
    margin: 20px 0;
    min-height: 60px;
}

.count {
    background: rgba(2, 68, 190, 0.7);
    font-size: 3rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px 40px;
    color: #ffd700 !important;
    border-radius: 15px;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.result {
    font-size: 2rem;
    font-weight: bold;
    color: #0e4120 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    display: inline-block;
}

/* Winners History - fixed height and scroll */
.winners-history {
    position: relative;
    z-index: 10;
    /* margin: 30px 0; */
}

.winners-history .card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    max-height: 400px;
    /* Fixed maximum height */
    display: flex;
    flex-direction: column;
}

.winners-history .card-header {
    background: rgba(118, 1, 141, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    flex-shrink: 0;
    /* Prevent header from shrinking */
}


.winners-history .card-header h5 {
    /* background: rgba(0, 0, 0, 0.7); */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    flex-shrink: 0;
    /* Prevent header from shrinking */
}

.winners-history .card-body {
    overflow-y: auto;
    /* Enable scrolling */
    flex-grow: 1;
    /* Take remaining space */
    max-height: 500px;
    /* Limit body height */
}

/* Winners list items */
#winnersList {
    max-height: 300px;
    overflow-y: auto;
}

#participantList {
    max-height: 300px;
    overflow-y: auto;
}

.winner-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #48bb78 !important;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.winner-item:hover {
    transform: translateX(15px);
    transform-origin: top left;
    left: 0;
    background: rgba(183, 6, 218, 0.486);
    box-shadow: 0 4px 8px rgb(255, 255, 255);
    color: white !important;
    transform: scale(1.4);

}

.winner-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    margin-right: 12px;
    font-weight: bold;
    font-size: 0.9rem;
}

.winner-name {
    color: #2d3748;
    font-weight: 600;
}

/* Terms section - ensure it stays below */
.terms {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    color: #2d3748 !important;
    border-left: 4px solid #667eea;
    position: relative;
    z-index: 5;
}

.terms h3 {
    color: #2d3748 !important;
    border-bottom: 2px solid #667eea;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.terms ul {
    color: #4a5568 !important;
    padding-left: 20px;
    margin-bottom: 0;
}

.terms li {
    font-size: 14px;
    color: #4a5568 !important;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Upload section */
.upload-section {
    margin: 20px 0;
    display: inline-block;
}

.upload-section .card {

    background: rgba(219, 231, 204, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    max-height: 400px;
}

.upload-section .card-header {
    background: rgba(219, 231, 204, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #01270e !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.upload-section .card-body {

    color: #0e4120;
    text-shadow: 1px 1px 3px rgb(154, 250, 0);
    overflow-y: auto;
    /* Enable scrolling */
    flex-grow: 1;
    /* Take remaining space */
    max-height: 350px;
}

/* Buttons */
#get {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 15px 40px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin: 10px 0;
    font-size: 1.3rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#get:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.resetBtn {
    color: #fcfcfc;
    border-color: #f56565;
    font-weight: 500;
    white-space: nowrap;
    background-color: tomato;
    padding-left: 10px;
    padding-right: 10px;
}

.resetBtn:hover {
    background-color: #ffffff;
    color: rgb(255, 0, 0);
    border-color: #f56565;
}

/* ===== OVERLAY & WINNER POPUP ===== */

.overlay {
    content: "";
    width: 100vw;
    height: 100vh;
    position: fixed;
    /* Changed from absolute to fixed */
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    /* Darker for better contrast */
    visibility: hidden;
    opacity: 0;
    z-index: 994;
    /* High z-index */
    transition: all 0.5s ease;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

.winner {
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-height: 600px;
    border-radius: 15px;
    border: 5px solid #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    /* Added scale for animation */
    background: url(../img/winner.jpg) no-repeat center center;
    background-size: cover;
    position: fixed;
    z-index: 999;
    /* Higher than overlay */
    transition: all 0.5s ease;
    display: flex;
    align-items: start;
    justify-content: center;
}

.winner.active {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.winner:after {
    content: "✕";
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 50%;
    color: #D62828;
    right: -15px;
    top: -15px;
    position: absolute;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.winner:after:hover {
    background: #D62828;
    color: white;
    transform: scale(1.1);
}

.winner p {
    font-size: 60px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.8);
    color: #D62828;
    padding: 20px 40px;
    border-radius: 15px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #D62828;
    margin: 0;
    animation: pulse 2s infinite;
    margin-top: 10px;
}

/* Pulse animation for winner text */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Fireworks effect when winner is shown */
.winner.show-fireworks::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, transparent 80%);
    animation: sparkle 1.5s ease-in-out;
    border-radius: 15px;
    z-index: 9999;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}


.close-btn {
    position: absolute;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #D62828;
    right: -15px;
    top: -15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10000;
}

.close-btn:hover {
    background: #D62828;
    color: white;
    transform: scale(1.1);
}

.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: explode 1.5s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: translate(var(--x), var(--y)) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Sparkle effect for winner box */
.winner.sparkle::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, #ffd700 1px, transparent 1px);
    background-size: 20px 20px;
    animation: sparkle 2s linear infinite;
    border-radius: 20px;
    z-index: 9999;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}


#copyright {
    color: #e2e8f0 !important;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
}

/*
#copyright{
	width: calc(100% - 60px);
	display: block;
	background-color: #D62828;
	padding: 10px;
	box-sizing: border-box;
	color: #facb01;
	font-size: 12px;
}
*/
#copyright a {
    color: #fff70d;
    font-size: 12px;
}

#copyright span {
    margin: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .wrapper {
        width: 95vw;
        margin: 20px auto;
    }

    .box {
        padding: 20px 15px;
    }

    .box2 h1 {
        font-size: 2rem;
    }

    .count {
        font-size: 2.5rem;
        padding: 15px 30px;
    }

    .result {
        font-size: 1.5rem;
    }

    .winners-history .card {
        max-height: 300px;
    }

    .upload-section .card {
        max-height: 300px;
    }
}

/* Scrollbar styling for winners list */
.winners-history .card-body::-webkit-scrollbar {
    width: 6px;
}

.winners-history .card-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.winners-history .card-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.upload-section .card-body::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.upload-section .card-body::-webkit-scrollbar {
    width: 6px;
}

.upload-section .card-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.upload-sectiony .card-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.upload-section .card-body::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}



/** ====== TABS ====== **/

.tabs {
    left: 50%;
    transform: translateX(-50%);
    position: relative;
    background: white;
    padding: 50px;
    padding-bottom: 80px;
    max-width: 100%;
    min-height: 400px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    border-radius: 5px;

    background-color: rgba(227, 120, 241, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px);
    border-radius: 15px;
}

.tabs input[name="tab-control"] {
    display: none;
}

.tabs .content section h2,
.tabs ul li label {
    font-family: "Montserrat";
    font-weight: bold;
    font-size: 18px;
    color: #428BFF;
}

.tabs ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
}

.tabs ul li {
    box-sizing: border-box;
    flex: 1;
    width: 25%;
    padding: 0 10px;
    text-align: center;
}

.tabs ul li label {
    transition: all 0.3s ease-in-out;
    color: #3d3d3d;
    padding: 5px auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* border: 2px solid blue; */
    border-bottom: 0px;
    background-color: rgba(138, 136, 138, 0.7);
    padding-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.tabs ul li label br {
    display: none;
}

.tabs ul li label svg {
    fill: #8ca6d6;
    height: 1.2em;
    vertical-align: bottom;
    margin-right: 0.2em;
    transition: all 0.2s ease-in-out;
}

.tabs ul li label:hover,
.tabs ul li label:focus,
.tabs ul li label:active {
    outline: 0;
    /* color: #000a05; */
    vertical-align: center;
    /* background-color: rgba(6, 153, 82, 0.97); */

    color: #f7f7f7;
    text-shadow: 1px 1px 3px rgba(231, 15, 15, 0.808);
}

.tabs ul li label:hover svg,
.tabs ul li label:focus svg,
.tabs ul li label:active svg {
    fill: #a5e0a3;
    background: #428BFF;
    background-color: rgba(222, 243, 233, 0.97);
}

.tabs .slider {
    position: relative;
    width: 25%;
    transition: all 0.33s cubic-bezier(0.38, 0.8, 0.32, 1.07);
}

.tabs .slider .indicator {
    position: relative;
    width: 50px;
    max-width: 100%;
    margin: 0 auto;
    height: 4px;
    background: #428BFF;
    border-radius: 1px;
}

.tabs .content {
    /* margin-top: 30px; */
    /* border: 2px solid blue; */
    width: 100%;
    position: relative;
    justify-content: center;
    align-items: center;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.8);
    margin-top: -15px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 15px;
}

.tabs .content section {
    display: none;
    animation-name: content;
    animation-direction: normal;
    animation-duration: 0.3s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
    line-height: 1.4;
    min-width: 90%;
}

.tabs .content section h2 {
    color: #428BFF;
    display: none;
}

.tabs .content section h2::after {
    content: "";
    position: relative;
    display: block;
    width: 30px;
    height: 3px;
    background: #428BFF;
    margin-top: 5px;
    left: 1px;
}

/* Tab 1 */
#tab-1:checked~ul>li:nth-child(1) label {
    cursor: default;
    color: #fffffffb;
    text-shadow: 5px 2px 5px rgb(0, 0, 0);
    background-color: rgba(206, 8, 255, 0.842);
    font-size: 22px;
    font-weight: bold;
}

#tab-1:checked~ul>li:nth-child(1) label svg {
    fill: #428BFF;
}

#tab-1:checked~.slider {
    transform: translateX(0%);
}

#tab-1:checked~.content>section:nth-child(1) {
    display: block;
}

/* Tab 2 */
#tab-2:checked~ul>li:nth-child(2) label {
    cursor: default;
    color: #fffffffb;
    text-shadow: 5px 2px 5px rgb(0, 0, 0);
    background-color: rgba(206, 8, 255, 0.842);
    font-size: 22px;
    font-weight: bold;
}

#tab-2:checked~ul>li:nth-child(2) label svg {
    fill: #428BFF;
}

#tab-2:checked~.slider {
    transform: translateX(100%);
}

#tab-2:checked~.content>section:nth-child(2) {
    display: block;
}

/* Tab 3 */
#tab-3:checked~ul>li:nth-child(3) label {
    cursor: default;
    color: #fffffffb;
    text-shadow: 5px 2px 5px rgb(0, 0, 0);
    background-color: rgba(206, 8, 255, 0.842);
    font-size: 22px;
    font-weight: bold;
}

#tab-3:checked~ul>li:nth-child(3) label svg {
    fill: #428BFF;
}

#tab-3:checked~.slider {
    transform: translateX(200%);
}

#tab-3:checked~.content>section:nth-child(3) {
    display: block;
}

/* Tab 4 */
#tab-4:checked~ul>li:nth-child(4) label {
    cursor: default;
    color: #fffffffb;
    text-shadow: 5px 2px 5px rgb(0, 0, 0);
    background-color: rgba(206, 8, 255, 0.842);
    font-size: 22px;
    font-weight: bold;
}

#tab-4:checked~ul>li:nth-child(4) label svg {
    fill: #428BFF;
}

#tab-4:checked~.slider {
    transform: translateX(300%);
}

#tab-4:checked~.content>section:nth-child(4) {
    display: block;
}

@keyframes content {
    from {
        opacity: 0;
        transform: translateY(5%);
    }

    to {
        opacity: 1;
        transform: translateY(0%);
    }
}

@media (max-width: 1000px) {
    .tabs ul li label {
        white-space: initial;
    }

    .tabs ul li label br {
        display: initial;
    }

    .tabs ul li label svg {
        height: 1.5em;
    }
}

@media (max-width: 600px) {
    .tabs ul li label {
        padding: 5px;
        border-radius: 5px;
    }

    .tabs ul li label span {
        display: none;
    }

    .tabs .slider {
        display: none;
    }

    .tabs .content {
        margin-top: 20px;
    }

    .tabs .content section h2 {
        display: block;
    }
}

/* ====== END OF TABS ====== **/