@import url(https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Roboto:wght@400;700&display=swap);

.logo,
body {
    color: #fff
}

header,
nav ul,
nav ul li a {
    display: flex
}

.hero h1,
.hero h4 {
    font-family: 'Press Start 2P', cursive;
    color: #fc0;
    text-shadow: 3px 3px #000;
    position: relative;
    z-index: 1
}

#bet-container,
#main-container,
.hero,
.leaderboard {
    text-align: center
}

.bet-btn,
nav ul li .dropdown-content {
    box-shadow: 0 4px 8px rgba(0, 0, 0, .3)
}

.hero,
.hero h1,
.hero h4,
.hero p,
.leaderboard,
nav ul li,
nav ul li.dropdown {
    position: relative
}

#retrobg-mountains-left,
#retrobg-mountains-right {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #000, #111)
}

footer,
header {
    background: #121212;
    padding: 20px
}

/* Multicompetitive Mode Feature Styling */
.feature-item.multicompetitive-mode {
    position: relative;
    background: linear-gradient(135deg, #0e141b, #1e2a39);
    border: 2px solid #1a2733;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item.multicompetitive-mode:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #1e2a39, #0e141b);
}

/* Multicompetitive Highlight Styling */
.multicompetitive-highlight {
    margin-top: 15px;
    font-size: 0.95em;
    color: #ccc;
    line-height: 1.5em;
    text-align: left;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    font-style: italic;
}

/* General Styling for Features Row */
.features-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* Adjustments for Mobile Screens */
@media (max-width: 768px) {
    .features-row {
        flex-direction: column;
        gap: 20px;
    }

    .multicompetitive-highlight {
        text-align: center;
    }
}

#bet-container,
#stats-container {
    animation: 1s ease-out fadeIn;
    background: linear-gradient(135deg, #2b5876, #4e4376)
}

#bet-container,
#play-again-container,
#stats-container {
    background: linear-gradient(135deg, #2b5876, #4e4376)
}

.bet-btn,
.signup-btn {
    text-transform: uppercase
}

body {
    margin: 0;
    font-family: Roboto, sans-serif;
    background: linear-gradient(135deg, #141e30, #243b55);
    overflow-x: hidden
}

header {
    justify-content: space-between;
    align-items: center;
    text-shadow: 2px 2px #000;
    position: sticky;
    top: 0;
    z-index: 1000
}

.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.75rem
}

@media (max-width:768px) {
    .logo {
        font-size: 1.3rem
    }
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center
}

nav ul li {
    margin-left: 20px
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    transition: color .3s, transform .3s
}

nav ul li a:hover {
    color: #ff8c00;
    transform: scale(1.1)
}

nav ul li .dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e1e1e;
    border-radius: 5px;
    overflow: hidden;
    top: 100%;
    left: 0;
    min-width: 150px;
    z-index: 10
}

.bet-btn {
    background: gold;
    color: #333;
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .4);
    transition: .3s;
}

.bet-btn,
.menu-toggle {
    border: none;
    cursor: pointer
}

nav ul li .dropdown-content a {
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    color: #fff;
    font-weight: 400;
    transition: background-color .3s
}

.bet-btn,
.card,
.card-value,
.leaderboard table tbody td span,
.stat-item span,
footer {
    font-weight: 700
}

nav ul li .dropdown-content a:hover {
    background-color: #ff8c00
}

nav ul li.dropdown:hover .dropdown-content {
    display: block
}

nav ul li a i {
    font-size: 16px
}

.menu-toggle {
    padding: 0 !important;
    display: none;
    font-size: 24px;
    background: 0 0;
    color: #fff;
    transition: transform .3s;
    z-index: 1001
}

#signup-incentive,
.hero {
    background: linear-gradient(135deg, #1a1a2e, #16213e)
}

.menu-toggle:hover {
    transform: scale(1.2)
}

.hero {
    padding: 100px 20px;
    color: #fff;
    overflow: hidden
}

.hero::after,
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0
}

.hero .shape {
    position: absolute;
    background: 0 0;
    border: 2px solid rgba(255, 255, 255, .7);
    animation: 6s ease-in-out infinite float
}

.hero .shape.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(255, 255, 255, .7)
}

.hero .shape.circle,
.hero .shape.square {
    width: 50px;
    height: 50px
}

.hero .shape.circle {
    border-radius: 50%
}

.hero .shape:first-child {
    top: 20%;
    left: 10%;
    animation-delay: 0s
}

.hero .shape:nth-child(2) {
    top: 50%;
    left: 80%;
    animation-delay: 1s
}

.hero .shape:nth-child(3) {
    top: 70%;
    left: 30%;
    animation-delay: 2s
}

.hero .shape:nth-child(4) {
    top: 10%;
    left: 70%;
    animation-delay: 3s
}

.hero .shape:nth-child(5) {
    top: 40%;
    left: 40%;
    animation-delay: 4s
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0)
    }

    50% {
        transform: translateY(-20px) rotate(45deg)
    }
}

.hero h1 {
    font-size: 3.5rem
}

.hero h4 {
    font-size: 1.5rem
}

@media (max-width:768px) {
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        background-color: #1e1e1e;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        display: none;
        padding: 10px 0;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, .5)
    }

    nav ul.show {
        display: flex
    }

    nav ul li {
        margin: 10px 0;
        text-align: center
    }

    nav ul li a {
        font-size: 16px
    }

    .menu-toggle {
        display: block
    }

    .hero h4 {
        font-size: 1.5rem
    }
}

.hero p {
    font-size: 1.5rem;
    margin-top: 20px;
    color: #fff;
    text-shadow: 1px 1px #000;
    z-index: 1
}

.leaderboard h2,
.leaderboard table thead th {
    font-family: 'Press Start 2P', cursive;
    color: #fc0
}

/* Main Container */
#main-container {
    flex-grow: 2;
    max-width: 2368px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 800px;
    padding: 20px;
    border: 10px solid #3d2c29;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 50px rgba(0, 0, 0, 0.5);
    background: url('../img/tablecut.jpg') no-repeat center center;
    background-size: cover;
    /* Ensures the image scales properly */
    overflow: hidden;
}

#main-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 10px solid #b88a44;
    /* Gold trim */
    border-radius: 25px;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5) inset;
    z-index: 0;
}

#main-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/45-degree-fabric-dark.png');
    background-size: 4px 4px, 4px 4px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}


#bet-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .5);
    max-width: 800px;
    margin: 50px auto;
    border: 5px solid #fc0
}

#bet-container h2 {
    margin: 0 0 10px;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .5)
}

#bet-container .bet-message {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #ddd
}

.bet-input-group {
    margin: 20px 0
}

.bet-label {
    font-size: 1.2rem;
    margin-right: 10px
}

#bet-amount {
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #fc0;
    border-radius: 5px;
    width: 150px;
    background: #fff;
    color: #000
}

#stats-container,
.card,
.leaderboard table tbody tr {
    box-shadow: 0 4px 10px rgba(0, 0, 0, .5)
}

.leaderboard {
    color: #fff;
    padding: 50px 20px;
    background: linear-gradient(to bottom, #0f1a2e, #1b2b4b);
    overflow: hidden
}

#play-again-container input,
.card {
    background: #fff;
    color: #000;
    text-align: center
}

.leaderboard h2 {
    font-size: 2.5rem;
    text-shadow: 2px 2px #000;
    margin-bottom: 20px
}

.leaderboard table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    border-spacing: 0
}

.leaderboard table thead {
    background: rgba(0, 0, 0, .8)
}

.leaderboard table thead th {
    font-size: 1rem;
    text-shadow: 1px 1px #000;
    padding: 15px 10px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, .2)
}

.leaderboard table tbody tr {
    background: rgba(0, 0, 0, .7);
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background .3s ease-in-out
}

.leaderboard table tbody tr:hover {
    background: rgba(255, 255, 255, .1)
}

.leaderboard table tbody td {
    padding: 15px 10px;
    font-size: 1rem;
    text-align: center;
    color: #fff;
    font-weight: 700
}

.leaderboard table tbody td:first-child {
    text-align: left
}

.leaderboard table tbody td:last-child {
    color: #0f0
}

@media (max-width:768px) {
    #main-container {
        padding: 0
    }

    .leaderboard h2 {
        font-size: 2.3rem
    }

    .leaderboard table tbody td {
        font-size: .9rem
    }
}

#retrobg-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none
}

.retrobg-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: #fff;
    opacity: var(--star-opacity, .7);
    top: calc(100% * var(--star-y));
    left: calc(100% * var(--star-x));
    animation: 3s ease-in-out infinite alternate star-twinkle
}

@keyframes star-twinkle {

    0%,
    100% {
        opacity: .5
    }

    50% {
        opacity: 1
    }
}

#retrobg-mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    z-index: 1;
    pointer-events: none
}

#retrobg-mountains-left {
    position: absolute;
    clip-path: polygon(0% 100%, 0% 55%, 10% 50%, 20% 45%, 30% 50%, 40% 70%, 50% 85%, 60% 80%, 70% 90%, 100% 100%)
}

#retrobg-mountains-right {
    position: absolute;
    clip-path: polygon(0% 100%, 20% 90%, 30% 85%, 40% 70%, 60% 50%, 70% 60%, 80% 45%, 100% 100%)
}

footer {
    text-align: center;
    margin-top: 50px;
    color: #000;
    font-size: .9rem;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, .3)
}

.cards {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 300px;
    margin-top: 10px;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .cards {
        height: 200px;
        margin-top: 5px;
        margin-bottom: 5px;
    }
}

.card {
    position: absolute;
    /* Enables precise positioning relative to the .cards container */
    width: 200px;
    height: 280px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;

    /* Adjust the placement logic */
    left: calc(50% - 100px + (var(--index, 0) * 50px));
    /* Center the first card and stack others to the right */
    transform: translateX(-50%);
    /* Ensure consistent centering */
    z-index: var(--index, 0);
    /* Layering based on the index */
    transition: left 0.2s ease, transform 0.2s ease;
    /* Smooth transitions for positioning */
}

#play-again-container button,
#play-again-container label,
#stats-container h2,
.signup-bonus,
.signup-btn,
.signup-container h2 {
    font-family: 'Press Start 2P', cursive
}

.card-value {
    position: absolute;
    font-size: 1.2em
}

.card-value.top-left {
    top: 5px;
    left: 8px;
    text-align: left
}

.card-value.bottom-right {
    bottom: 5px;
    right: 8px;
    text-align: right;
    transform: rotate(180deg)
}

.card-suit {
    font-size: 3em;
    line-height: 1
}

.mini-suit {
    font-size: .8em
}

.card.face-down {
    background: linear-gradient(45deg, #333, #555);
    color: transparent;
    border: 2px solid #444
}

@keyframes dropCard {
    0% {
        transform: translateY(-200%)
    }

    100% {
        transform: translateY(0)
    }
}

#game-buttons {
    padding-top: 20px;
}

@media (max-width: 1025px) {
    #game-buttons {
        padding-top: 5%;
    }
}

.casino-btn {
    padding: 12px 25px;
    font-size: 1.3em;
    font-family: 'Press Start 2P', sans-serif;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Individual Button Colors */
.btn-hit {
    background: linear-gradient(135deg, #1d72f3, #1a4ddb);
}

.btn-stand {
    background: linear-gradient(135deg, #28a745, #218838);
}

.btn-double {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

/* Hover Effects */
.casino-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.btn-hit:hover {
    background: linear-gradient(135deg, #4187f6, #2a5fd4);
}

.btn-stand:hover {
    background: linear-gradient(135deg, #31d759, #269d46);
}

.btn-double:hover {
    background: linear-gradient(135deg, #ffd54f, #e6b900);
}

/* Active State */
.casino-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Font Awesome Icon Styling */
.casino-btn i {
    font-size: 1.2em;
}

@media (max-width: 1920px) {
    .casino-btn {
        padding: 10px 20px;
        font-size: 1.2em;
        gap: 6px;
    }
}

/* Buttons at Screen Width 1440px and Below */
@media (max-width: 1440px) {
    .casino-btn {
        padding: 8px 18px;
        font-size: 1.1em;
        gap: 5px;
    }
}

/* Buttons at Screen Width 1300px and Below */
@media (max-width: 1300px) {
    .casino-btn {
        padding: 7px 16px;
        font-size: 1em;
        gap: 4px;
    }
}

/* Buttons at Screen Width 1025px and Below */
@media (max-width: 1025px) {
    .casino-btn {
        padding: 6px 14px;
        font-size: 0.9em;
        gap: 3px;
    }
}

/* Buttons at Screen Width 700px and Below */
@media (max-width: 700px) {
    .casino-btn {
        padding: 5px 12px;
        font-size: 0.8em;
        gap: 2px;
        border-radius: 5px;
    }
}

@media (max-width:600px) {
    .card {
        width: 100px;
        height: 160px;
        font-size: 1.5em
    }

    #game-buttons button {
        padding: 15px 30px;
        margin-top: 20px;
        font-size: 0.7em
    }
}

button:hover {
    background: #e68900
}

#stats-container {
    color: #fff;
    padding: 20px;
    margin: 20px auto;
    border-radius: 10px;
    max-width: 90%;
    text-align: center
}

#stats-container h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .7)
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap
}

.stat-item {
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
    padding: 10px 20px;
    width: 120px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .4)
}

#play-again-container,
#signup-incentive,
.feature-item {
    box-shadow: 0 4px 8px rgba(0, 0, 0, .5)
}

.stat-item p {
    font-size: .9rem;
    margin: 0;
    color: #ddd
}

.stat-item span {
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
    color: #fc0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, .5)
}

.hero img {
    width: 200px;
    height: auto;
    max-width: 100%
}

@media (max-width:480px) {
    .logo {
        font-size: 1rem
    }

    .hero h4 {
        font-size: 1.3rem
    }

    .leaderboard h2 {
        font-size: 2rem
    }

    .leaderboard table tbody td {
        font-size: .8rem
    }

    .hero img {
        width: 200px
    }

    .hero {
        padding: 70px 20px
    }
}

#game-table .hand {
    padding: 5px;
    border-radius: 10px
}

#play-again-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    max-width: 400px;
    margin: 0 auto
}

#play-again-container label {
    font-size: .9rem;
    color: #fc0;
    text-shadow: 2px 2px #000
}

#play-again-container input {
    padding: 5px 10px;
    font-size: 1rem;
    border: 2px solid #fc0;
    border-radius: 5px;
    width: 80px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .3);
    outline: 0;
    transition: transform .2s, box-shadow .2s
}

#play-again-container input:focus {
    transform: scale(1.05);
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, .4)
}

#play-again-container button {
    padding: 8px 20px;
    font-size: 1rem;
    background: #fc0;
    color: #000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .4);
    transition: background .3s, transform .2s
}

#play-again-container button:hover {
    background: #f0c400;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .5)
}

.win-glow {
    animation: 1.5s ease-out infinite alternate glow
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px gold, 0 0 30px gold, 0 0 50px #fc0
    }

    100% {
        box-shadow: 0 0 20px #fc0, 0 0 60px gold, 0 0 100px gold
    }
}

.loss-flash {
    animation: 1.5s ease-out infinite alternate lossflash
}

@keyframes lossflash {
    0% {
        box-shadow: 0 0 10px #a71b1b, 0 0 30px #851111, 0 0 50px #851111
    }

    100% {
        box-shadow: 0 0 20px #851111, 0 0 60px #851111, 0 0 100px #a71b1b
    }
}

#signup-incentive {
    padding: 50px 20px;
    text-align: center;
    color: #fff;
    margin: 50px auto
}

.signup-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center
}

.signup-container h2 {
    font-size: 2rem;
    color: #fc0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, .7)
}

.signup-container p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.5
}

.features-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px
}

.feature-item {
    background: rgba(0, 0, 0, .7);
    border-radius: 10px;
    padding: 20px;
    flex: 1 1 calc(25% - 20px);
    text-align: center;
    transition: transform .3s, box-shadow .3s
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .7)
}

.feature-item i {
    font-size: 2.5rem;
    color: #fc0;
    margin-bottom: 10px
}

.feature-item h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px
}

.feature-item p {
    font-size: 1rem;
    color: #ddd;
    line-height: 1.4
}

.signup-bonus {
    margin: 20px 0;
    font-size: 1.2rem;
    color: #ff66b3
}

.signup-btn {
    background: #ff0080;
    color: #fff;
    font-size: 1rem;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
    transition: background .3s, transform .2s
}

.signup-btn:hover {
    background: #ff66b3;
    transform: translateY(-2px)
}

@media (max-width:768px) {
    .stats-grid {
        flex-direction: column;
        gap: 10px
    }

    .stat-item {
        width: 90%
    }

    #stats-container h2 {
        font-size: 1.2rem
    }

    .features-row {
        flex-direction: column
    }

    .feature-item {
        flex: 1 1 100%
    }
}

@media (max-width: 768px) {
    #main-container {
        max-height: 90vh;
        /* Prevent it from exceeding 90% */
    }
}