/* css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html {
    height: initial !important;
    overflow: inherit !important;
    background: url(../assets/bg.webp) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

html, * {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: normal;
}

body {
    width: -webkit-fill-available;
    height: 100%;
    font-family: Arial, sans-serif;
    color: #fff;
    padding: 0;
    margin: 0;
    padding-bottom: 120px;
}

/* Disable blue highlight on button click */
button {
    font-family: "Kanit", sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* You can do the same for links */
a, button {
    -webkit-tap-highlight-color: transparent;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.container {
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    color: black;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

header {
    width: -webkit-fill-available;
    font-size: 0.9rem;
    color: rgb(255 255 255 / 75%);
    padding: 0.5rem 0.5rem 0.5rem 0.8rem;
    /* border: 1px solid rgb(255 255 255 / 5%); */
    border-radius: 0 0 1.28rem 1.28rem;
    box-shadow: 0 4px 10px rgb(0 0 0 / 64%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    z-index: 999;
    background-image: url(../assets/bg.webp);
    background-size: cover;
    background-position: center center;
}

header>.col {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

header>.col>img {
    width: 2rem;
    border-radius: 5px;
    /* border-radius: 50%; */
    /* background: white; */
}

header>.col .code_container {
    padding: 0.1rem 0.4rem;
    border-radius: 0.5rem;
    background: rgb(0 0 0 / 75%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
    justify-content: center;
}

header>.col>.code_container>div>.title {
    font-weight: 500;
}

header>button {
    height: 2rem;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid #00000038;
    border-radius: 0.58rem;
    background: linear-gradient(135deg, #d51604, #ab1304, #d51604);
    background-clip: padding-box;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
}

h1 {
    font-size: 1.68rem;
    font-weight: 900;
    -webkit-text-stroke: 1.2px white;
    text-shadow: 1px 2px 5px rgba(0, 0, 0, 0.6);
    margin: 0;
}

body>div>span {
    color: #fff;
}

.Graph, .WinRate, .Result, .Roadmap {
    width: -webkit-fill-available;
    max-width: 600px;
    color: black;
    padding: 0.5rem;
    border-radius: 0.8rem;
    background: rgb(255 255 255);
    box-shadow: 0 4px 10px rgb(0 0 0 / 79%);
    position: relative;
}

.StrategySelect {
    width: -webkit-fill-available;
    max-width: 600px;
    padding: 0.5rem;
    border-radius: 1rem;
    background: rgb(233 233 233);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.StrategySelect>span {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: rgb(255 255 255 / 80%);
}

.Graph {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.Graph>h2 {
    margin: initial;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
}

.Graph>.graph_content {
    width: -webkit-fill-available;
}

.Graph>.graph_content>canvas {
    width: -webkit-fill-available;
}

/* Custom Dropdown Style */
.dropdown {
    position: relative;
    width: 100%;
    max-width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    margin-top: 0.5rem;
}

.dropdown-selected {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #333;
    text-align: center;
    position: relative;
}

.dropdown-selected::after {
    content: "";
    display: flex;
    width: auto;
    height: 100%;
    aspect-ratio: 1/1;
    background: url("../assets/icon_dropdown.svg");
    background-repeat: no-repeat;
    background-size: 68%;
    background-position: center;
    opacity: 0.68;
    position: absolute;
    right: 0;
    top: 0;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown.open .dropdown-options {
    max-height: 200px;
    /* ปรับความสูงได้ตามต้องการ */
    overflow-y: auto;
}

.dropdown-option {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: #333;
    transition: background 0.2s;
}

.dropdown-option:hover {
    background: #f0f0f0;
}

.Result {
    color: white;
    background: linear-gradient(135deg, #011200, #292828, #011300);
}

.Result,
.Result .result_percent {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.Result>.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.Result>.row>h2 {
    text-align: center;
    margin: 0;
}

.Result>.row>span {
    font-size: 0.9rem;
    text-align: right;
}

.Result span {
    text-align: center;
}

.Result .result_percent>div {
    padding: 3px;
    border-radius: 15px;
    background: rgb(55 55 55 / 37%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.Result .result_percent>div .bar {
    width: -webkit-fill-available;
    padding: 3px;
    background-color: #000000;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.Result .result_percent>div .bar>.percent {
    color: white;
    padding: 3px;
    text-align: right;
    border-radius: 8px;
    background-color: #ccc;
}

.Result .result_percent div .result_chip {
    width: 100px;
    height: 50px;
    padding: 0 10px;
    border-radius: 10px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Result [result="banker"]>.bar>.percent,
.Result [result="banker"]>.result_chip {
    background: linear-gradient(135deg, #d51604, #ab1304, #d51604) !important;
}

.Result [result="player"]>.bar>.percent,
.Result [result="player"]>.result_chip {
    background: linear-gradient(135deg, #041ed5, #0419ab, #041ed5) !important;
}

.Roadmap .wrapper {
    width: -webkit-fill-available;
    overflow-y: hidden;
    overflow-x: scroll;
}

.WinRate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 28px;
    font-weight: bold;
    color: #fbfbfb;
    border-radius: 0.8rem;
}

.WinRate>.title {
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.WinRate>.title>span.win_round {
    font-size: 0.8em;
}

.WinRate>.percent {
    background-color: #021401;
    color: #ffffff;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
}

.WinRate[rate="hight"] {
    background: linear-gradient(180deg, #19c110, #085307);
}

.WinRate[rate="null"] {
    background: linear-gradient(135deg, #363636, #606060);
}

.WinRate[rate="low"] {
    background: linear-gradient(135deg, #ff512f, #dd2476);
}

.Roadmap {
    background: rgb(28 28 28);
}

.grid {
    display: grid;
    grid-template-columns: repeat(20, 25px);
    grid-template-rows: repeat(6, 25px);
    gap: 1px;
    justify-content: start;
}

.grid-item {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.Control {
    width: -webkit-fill-available;
    font-size: 0.9rem;
    color: rgb(255 255 255 / 75%);
    padding: 0.2rem 0.2rem 0.2rem 0.2rem;
    border-top: 2px solid rgb(255 255 255 / 50%);
    border-radius: 2.28rem 2.28rem 0 0;
    box-shadow: 0px -10px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    z-index: 999;
    background-image: url(../assets/bg.webp);
    background-size: cover;
    background-position: center center;
    background-color: white;
    position: fixed;
    bottom: 0;
}

.Control button {
    width: -webkit-fill-available;
    height: 80px;
    border: 1px solid white;
    border-radius: 1rem;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
    touch-action: manipulation;
}

.Control button:hover {
    transform: scale(1.1);
}

#control_banker {
    /* background: radial-gradient(circle, #e74c3c, #c0392b); */
    border-radius: 2rem 1rem 1rem 1rem;
    background: linear-gradient(135deg, #d51604, #ab1304, #d51604);
    /* background-image: linear-gradient(144deg,#AF40FF, #5B42F3 50%,#00DDEB); */
    height: 60px;
}

#control_tie {
    background: linear-gradient(180deg, #19c110, #085307);
    height: 60px;
}

#control_player {
    border-radius: 1rem 2rem 1rem 1rem;
    background: linear-gradient(135deg, #041ed5, #0419ab, #041ed5) !important;
    height: 60px;
}

footer {
    color: white;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    /* opacity: 0.6; */
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer>span {
    font-size: 0.8rem;
    opacity: 0.6;
}

.margin_top {
    width: -webkit-fill-available;
    height: 3rem;
}