﻿:root {
    --primary-dark: #10192C;
    --gradient-red: linear-gradient(180deg, #FF0000, #CC0000);
    --gradient-light: linear-gradient(180deg, #d7d7d7, #ffffff);
    --gradient-dark-red: linear-gradient(180deg, #FF0000, #800000);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 130px; /* To prevent content from hiding under fixed header */
    padding-bottom: 70px; /* To prevent content from hiding under fixed footer on mobile */
    background-color: #f8f9fa;
    background-image: url(../images/bgwhitecny26hometext.jpg);
    background-position: top center;
}

.btn-danger {
    background: var(--gradient-red);
}

.d-mobile {
    display: none;
}

.btn-register {
    background: var(--gradient-red);
}

.btn-login {
    background: var(--gradient-light);
}

.btn-mem {
    background: -moz-linear-gradient(top, rgba(53,61,84,1) 0%, rgba(23,30,54,1) 100%);
    background: -webkit-linear-gradient(top, rgba(53, 61, 84, 1) 0%, rgba(23, 30, 54, 1) 100%);
    background: linear-gradient(to bottom, rgba(53, 61, 84, 1) 0%, rgba(23, 30, 54, 1) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

    .btn-mem:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        border-color: rgba(255,255,255,0.3);
    }

    .btn-mem a {
        background: linear-gradient(135deg, #ff9900, #ff6600);
        color: white !important;
        padding: 8px 20px;
        border-radius: 20px;
        font-weight: bold;
        font-size: 18px;
        display: block;
        margin-bottom: 5px;
        text-decoration: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        min-width: 120px;
        text-align: center;
    }

    .btn-mem .text-muted {
        font-size: 12px;
        color: #aaa !important;
        margin-top: 2px;
        font-weight: 500;
    }

.content-inner {
    overflow: hidden;
}

/* Fixed Header */
header.fixed {
    background-color: var(--primary-dark);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Header Top Section */
.header-top {
    max-width: 1440px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
}

    .header-top a img {
        max-height: 70px;
    }

    .header-top .d-end {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .header-top a {
        text-decoration: none;
        color: white;
        padding: 8px 20px;
        border-radius: 4px;
        font-weight: 600;
        display: inline-block;
        transition: all 0.3s ease;
        text-align: center;
        min-width: 100px;
    }

        .header-top a:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .header-top a:first-of-type {
            /*background: var(--gradient-red);*/
        }

        .header-top a:nth-of-type(2) {
            background: linear-gradient(180deg, #fff, #e0e0e0);
            color: #333;
        }

    .header-top img[src*="img-lang-01"] {
        width: 25px;
        height: 20px;
        border-radius: 2px;
    }

/* Header Bottom Section (Desktop Navigation) */
.header-bottom {
    background: var(--gradient-light);
    padding: 0 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .header-bottom ul {
        list-style: none;
        display: flex;
        justify-content: space-around;
        margin: 0 auto;
        padding: 0;
        max-width: 1440px;
    }

        .header-bottom ul li {
            flex: 1;
            text-align: center;
        }

            .header-bottom ul li a {
                display: block;
                padding: 10px 5px;
                font-weight: bold;
                font-size: 16px;
                color: #333;
                text-decoration: none;
                transition: all 0.3s ease;
                border-bottom: 3px solid transparent;
            }

                .header-bottom ul li a:hover {
                    background-color: rgba(0, 0, 0, 0.05);
                    border-bottom: 3px solid #CC0000;
                    color: #CC0000;
                }

/* Balance Section */
.balance-section {
    background: linear-gradient(to right, rgba(16,25,44,0.9), rgba(32,40,60,0.9));
    padding: 8px 15px;
    border-top: 0px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.balance-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 5px;
}

.balance-value {
    color: white;
    padding: 8px 25px;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 4px;
    text-align: center;
    min-width: 140px;
}

.balance-label {
    color: #aaa;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Menu Button (Hamburger) */
.header-menubtn {
    display: none;
}

.btn-menu {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 5px;
}

    .btn-menu span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 3px 0;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .btn-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .btn-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .btn-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

/* Mobile Menu */
.modal-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

    .modal-menu.show {
        display: block;
    }

.modal-dialog {
    position: relative;
    width: 300px;
    margin: 0;
    margin-left: auto;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.modal-menu.show .modal-dialog {
    transform: translateX(0);
}

.cmsmenu {
    background-color: var(--primary-dark);
    height: 100%;
    overflow-y: auto;
    padding: 20px 0;
}

    .cmsmenu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .cmsmenu ul li {
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

            .cmsmenu ul li a {
                display: block;
                padding: 15px 25px;
                color: white;
                text-decoration: none;
                font-weight: 600;
                font-size: 16px;
                transition: all 0.3s ease;
            }

                .cmsmenu ul li a:hover {
                    background-color: rgba(255, 255, 255, 0.1);
                    padding-left: 30px;
                    color: #FF0000;
                }

/* Mobile Footer */
footer.fixed {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-dark);
    z-index: 1020;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

    footer.fixed ul {
        list-style: none;
        display: flex;
        justify-content: space-around;
        margin: 0;
        padding: 0;
    }

        footer.fixed ul li {
            flex: 1;
            text-align: center;
        }

            footer.fixed ul li a {
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 8px 5px;
                font-size: 12px;
                color: white;
                text-decoration: none;
                border-radius: 4px;
                margin: 0 5px;
                background: var(--gradient-dark-red);
                transition: all 0.3s ease;
            }

                footer.fixed ul li a:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
                }

                footer.fixed ul li a i {
                    font-size: 16px;
                }

/* Main Content */
main {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    min-height: 500px;
}

.content-section {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

    .content-section h2 {
        color: #10192C;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #CC0000;
    }

    .content-section p {
        line-height: 1.6;
        color: #555;
        margin-bottom: 15px;
    }

/* Responsive Styles */
@media (max-width: 1024px) {
    body {
        padding-top: 120px;
    }

    .header-bottom ul li a {
        font-size: 15px;
        padding: 10px 3px;
    }

    .balance-value {
        font-size: 18px;
        min-width: 120px;
        padding: 8px 20px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 140px; /* Reduced padding for mobile */
        padding-bottom: 60px; /* For mobile footer */
    }

    .d-desktop {
        display: none !important;
    }

    .header-menubtn {
        display: block;
    }

    footer.fixed {
        display: flex !important;
        align-items: center;
    }

    .header-top a img {
        max-height: 50px;
    }

    .header-top {
        padding: 8px 15px;
    }

    .header-bottom {
        display: none;
    }

    .balance-section {
        padding: 8px 10px;
    }

    .balance-value {
        font-size: 16px;
        min-width: 100px;
        padding: 6px 15px;
    }

    .balance-label {
        font-size: 11px;
    }

    .balance-container {
        flex-direction: row;
        justify-content: space-around;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 130px;
    }

    .header-top img {
        max-height: 30px !important;
    }

    main {
        padding: 6px;
    }

    .d-mobile {
        display: block;
    }

    footer.fixed {
        display: block !important;
    }

        footer.fixed ul li a {
            font-size: 10px;
            padding: 6px 2px;
        }

            footer.fixed ul li a i {
                font-size: 16px;
            }

    .content-section {
        padding: 20px 15px;
    }

    .modal-dialog {
        width: 250px;
    }

    .balance-value {
        font-size: 20px;
        min-width: 80px;
        padding: 5px 0px;
    }

    .balance-label {
        font-size: 10px;
    }

    .balance-container {
        justify-content: space-between;
    }
}

@media (max-width: 360px) {
    body {
        padding-top: 125px;
    }

    .balance-value {
        font-size: 20px;
        min-width: 70px;
        padding: 0px 8px;
    }

    .balance-label {
        font-size: 9px;
    }

    .demo-info h4 {
        font-size: 15px;
    }
}

ul.step1 > li:nth-child(1)::marker {
    content: "1. ";
}

ul.step1 > li:nth-child(2)::marker {
    content: "2. ";
}

ul.step1 > li:nth-child(3)::marker {
    content: "3. ";
}

ul.step1 > li:nth-child(4)::marker {
    content: "4. ";
}

ul.step1 > li:nth-child(5)::marker {
    content: "5. ";
}

ul.step1 > li:nth-child(6)::marker {
    content: "6. ";
}

ul.step1 > li:nth-child(7)::marker {
    content: "7. ";
}

ul.step1 > li:nth-child(8)::marker {
    content: "8. ";
}

ul.step1 > li:nth-child(9)::marker {
    content: "9. ";
}

ul.step1 > li:nth-child(10)::marker {
    content: "10. ";
}

ul.step1 > li:nth-child(11)::marker {
    content: "11. ";
}

ul.step1 > li:nth-child(12)::marker {
    content: "12. ";
}

ul.step1 > li:nth-child(13)::marker {
    content: "13. ";
}

ul.step1 > li:nth-child(14)::marker {
    content: "14. ";
}

ul.step1 > li:nth-child(15)::marker {
    content: "15. ";
}

.custom-scrollbars {
    font-size: initial !important;
}

/* Enhanced Angpao Styles for more raining effect */
.angpao {
    position: absolute;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border: 2px solid #ffcc00;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

    .angpao:hover {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 6px 15px rgba(0,0,0,0.5) !important;
    }

    .angpao.clicked {
        animation: pop 0.5s ease-in-out;
    }

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.prize-text {
    animation: fadeOutUp 1.5s ease-in-out forwards;
    z-index: 1001;
    position: relative;
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -100px);
    }
}

.bgcny2026 {
    background-image: url(../images/bgwhitecny26hometext.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
}

.bgcny20262 {
    background-image: url(../images/bgwhitecny26hometext2.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
}

#btnStartGame {
    background-image: url('../images/middlecny26slider.png');
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    border: 0px solid;
    background-color: transparent;
    padding: 5px 10px;
    width: 210px;
    height: 85px;
    margin: 0 auto;
}

#skybox {
    background-image: url(../images/bgwhitecny26hometext.jpg);
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 10px;
    position: relative;
    overflow: hidden !important;
    min-height: 450px;
}

.countdown {
    font-size: 24px;
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Custom scrollbar for history */
.card-body::-webkit-scrollbar {
    width: 6px;
}

.card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

    .card-body::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Fix for sticky columns */
@media (min-width: 1200px) {
    .sticky-col {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
        height: 65vh;
        overflow: hidden;
    }
}

/* GridView styles */
.table-sm th, .table-sm td {
    padding: 8px 12px;
    font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .sticky-col {
        position: static;
        height: auto;
    }

    .card {
        margin-bottom: 20px;
    }
}

/* Chinese character inside angpao */
.chinese-char {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: gold;
    opacity: 0.9;
    font-weight: bold;
    font-family: "Microsoft JhengHei", "PMingLiU", sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Gold coin effect */
.gold-coin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #daa520);
    border-radius: 50%;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 10px rgba(255,215,0,0.8);
    z-index: 1001;
    animation: coinFloat 3s ease-in-out forwards;
}

@keyframes coinFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Game container */
.game-container {
    height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

.game-area {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.history-container {
    max-height: 60vh;
    overflow-y: auto;
}

/* Fix for GridView in panel */
#divLogin4 .table {
    margin-bottom: 0;
}

    #divLogin4 .table thead th {
        border-bottom: 2px solid #dee2e6;
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 10;
    }

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    overflow: -moz-scrollbars-none; /* Older Firefox */
}

/* Smooth scrolling */
.smooth-scroll {
    scroll-behavior: smooth;
}


/* For Webkit browsers (Chrome, Safari, newer Opera) */
.hide-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.hide-scrollbar::-webkit-scrollbar-thumb {
    background: transparent;
}

    .hide-scrollbar::-webkit-scrollbar-thumb:hover {
        background: transparent;
    }

/* For the game area specifically */
#skybox {
    border-radius: 10px;
    position: relative;
    overflow: hidden !important;
    min-height: 450px;
}

.game-area {
    overflow: hidden;
    position: relative;
}

/* History container */
.history-container {
    max-height: 400px;
    overflow-y: scroll;
}

    .history-container.hide-scrollbar {
        padding-right: 0 !important;
    }

/* For the main card body */
.card-body.hide-scrollbar {
    padding-right: 15px; /* Add padding to compensate for hidden scrollbar */
}

/* Make sure content doesn't get cut off */
.hide-scrollbar > * {
    padding-right: 1px; /* Small adjustment for content */
}

/* Fade-out scrollbar effect */
.fade-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.fade-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.fade-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    transition: background 0.3s;
}

    .fade-scrollbar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.25);
    }

.fade-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.05);
}

    /* Hide scrollbar when not scrolling */
    .fade-scrollbar::-webkit-scrollbar {
        opacity: 0;
        transition: opacity 0.3s;
    }

    .fade-scrollbar:hover::-webkit-scrollbar {
        opacity: 1;
    }

.show-scrollbar::-webkit-scrollbar {
    display: block;
    width: 8px;
}

.show-scrollbar {
    -ms-overflow-style: scrollbar;
    scrollbar-width: auto;
}

/* Demo Angpao Styles */
.demo-angpao {
    position: absolute;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border: 2px solid #ffcc00;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

    .demo-angpao:hover {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 6px 15px rgba(0,0,0,0.5) !important;
    }

.demo-info {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 1002;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    .demo-info h4 {
        color: #ffcc00;
        margin-bottom: 8px;
    }

    .demo-info p {
        margin-bottom: 5px;
        font-size: 14px;
    }

.demo-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffcc00;
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 1003;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    display: none;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

.login-button {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
}

    .login-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(255, 0, 0, 0.4);
    }
