@import url(//fonts.googleapis.com/earlyaccess/notosanskr.css);

* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html,body {
	margin:0px;
	padding:0px;
	font-family: 'Noto Sans KR', sans-serif;
	overflow-x:hidden;
}

:root {
    --primary-color: #006C70;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --title-bg: #006C70;
    --game-selection-bg: #6c757d;
    --menu-bg: #006C70;
	--bet-primary-color:#004F4F;
	--hit-set:#eaeaea;
	--hit-set-border:#aaa;

	--x1-color-light: #e6f3ff;
    --x2-color-light: #fff2e6;
    --x3-color-light: #fff7e6;
    --x4-color-light: #e6ffe6;
    --hf-color-light: #f0e6ff;
    --out-color-light: #ffe6e6;
    
    --x1-color-dark: #003366;
    --x2-color-dark: #663300;
    --x3-color-dark: #666600;
    --x4-color-dark: #006600;
    --hf-color-dark: #330066;
    --out-color-dark: #660000;
    
    --text-color-light: #333;
    --text-color-dark: #f8f9fa;
}

body.dark-mode {
    --background-color: #333;
    --text-color: #f8f9fa;
    --border-color: #555;
    --title-bg: #1a1a1a;
    --game-selection-bg: #2a2a2a;
    --menu-bg: #1a1a1a;
	--bet-primary-color:#004F4F;
	--hit-set:#000;
	--hit-set-border:#777;
}

/*******************************************************/
        .set_game_container {
            width: 100%;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .set_game_section {
            flex: 1;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .set_game_section:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 10%;
            height: 80%;
            width: 1px;
            background-color: rgba(255,255,255,0.2);
        }
        .set_game_title {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            line-height: 1;
        }
        .set_game_title_top {
            color: #adb5bd;
            font-size: 10px;
            font-weight: 400;
            margin-bottom: 2px;
        }
        .set_game_title_bottom {
            color: #ffc107;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .set_game_button {
            background-color: #00AA74;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: background-color 0.3s;
        }
        .set_game_button:hover {
            background-color: #218838;
        }
        .set_game_select {
            background-color: #495057;
            color: white;
            border: 1px solid #6c757d;
            border-radius: 4px;
            padding: 5px 10px;
            font-size: 14px;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            padding-right: 30px;
        }
        .set_game_select:focus {
            outline: none;
            border-color: #80bdff;
            box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
        }
/**************************************************************/

.his_x1, .his_x2, .his_x3, .his_x4, .his_hf, .his_out {
    display: inline-block;
    padding: 2px 0px;
    text-align: center;
    border-radius: 5px;
    margin: 0 2px;
    font-size: 10px;
    float: left;
    width: 20px;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-color);
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.all_wrap {
	width:100%;
	height:100%;
	max-width:500px;
}


#title-area {
    position: fixed;
	max-width:1000px;
	margin:0 auto;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--title-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.balance {
    display: flex;
    align-items: center;
}

#usdt-balance {
    margin-right: 10px;
	margin-left:5px;
    color: white;
	font-size:12px;
	font-weight:800;
}

#deposit-btns {
    color: #00D6AB;
    border: none;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
	vertical-align:middle;
}

#game-selection {
    position: fixed;
    top: 50px; /* 타이틀 영역 높이 */
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--game-selection-bg);
    transition: transform 0.3s ease-out;
    z-index: 999;
}

#game-play.selection-hidden {
    padding-top: 115px;
}

.coin {
    text-align: center;
    color: white;
}

.coin h3 {
    margin: 0;
    font-size: 18px;
}

.price {
    margin: 0;
    font-size: 14px;
}

#game-play {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 50px;
    overflow-y: auto;
	overflow-x:hidden;
    padding: 65px 15px 15px;
}

#game-display {
    width: 100%;
	padding-bottom: 100%;
	position: relative;
    background-color: var(--border-color);
    margin-bottom: 15px;
	border-radius:10px;
	border:1px solid rgba(255,255,255,0.4);
}

.square-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius:10px;
}

#betting-area {
    margin-bottom: 15px;
	display:none;
}

#amount-selection, #round-selection {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.amount-btn, .round-btn {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#bet-code-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#history {
    overflow-x: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
	color:var(--text-color);
}

th, td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: left;
}

#menu-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--menu-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2001;
}

.menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.menu-btn-home {
    background: #00AA74;
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
	padding:8px 6px;
	border-radius:6px;
}

.menu-btn i {
    font-size: 16px;
    margin-bottom: 3px;
}

.home-btn {
    font-size: 16px;
    margin-bottom: 3px;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.popup-content {
    #background-color: var(--background-color);
	background-image:linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(/images/runner.png);
	background-size:cover;
	background-position:0%;
	background-repeat:no-repeat;
    
    padding: 10px;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    color: var(--text-color);
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

#bet-code-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

#bet-code-grid button {
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#close-popup, #close-menu-popup, #close-menu-popup2 {
    width: 100%;
    padding: 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#mode-toggle {
    position: fixed;
    bottom: 60px;
    right: 10px;
    padding: 10px 11px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
	border:1px solid white;
}

#screen-toggle {
    position: fixed;
    bottom: 105px;
    right: 10px;
    padding: 10px 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
	border:1px solid white;
}

#bet-code-popup {
    display: none;
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: calc(100% - 100px);
    background-color: var(--background-color);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#bet-code-popup.active {
    transform: translateY(0);
}

#bet-code-popup .popup-content {
    height: calc(100% - 50px);
    overflow-y: auto;
    padding: 15px;
}

#menu-popup {
    display: none;
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    background-color: var(--background-color);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#menu-popup.active {
    transform: translateY(0);
}

.popup-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
}


.popup-header2 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bet-primary-color);
    color: white;
}

#popup-title, #popup-title2 {
    margin: 0;
    font-size: 18px;
    width: calc(100% - 50px);
    padding-left: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#close-menu-popup, #close-menu-popup2 {
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    height: 100%;
    margin-top: 50px;
    overflow-y: auto;
    padding-top: 10px;
}

@media (max-width: 768px) {
    #game-selection {
        height: 50px;
        flex-direction: row;
        padding: 0;
		transition: transform 0.3s ease-out;
    }

    .coin {
        margin-bottom: 0;
    }

    #game-play {
        height: calc(100vh - 200px);
		overflow-x:hidden;
    }

    #amount-selection, #round-selection {
        flex-wrap: wrap;
    }

    .amount-btn, .round-btn {
        flex: 0 0 calc(33.33% - 10px);
        margin-bottom: 10px;
    }
}

/***************************** Basic ****************************/
.logo img {
	height:40px;
	vertical-align:middle;
}

.blank50 {
	width:100%;
	height:50px;
	clear:both;
}

.blank100 {
	width:100%;
	height:100px;
	clear:both;
}


/************************* his *********************************/
.his_table {
    width: 100%;
    border-collapse: collapse;
}

.his_thead {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    color: white;
}

.his_th {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    color: white;
	border:none;
}

.his_td {
    text-align: center;
    padding: 5px;
    font-size: 12px;
    color: var(--text-color);
	border:none;
	border-bottom:1px solid rgba(255,255,255,0.2);
}

.his_tbody tr {
    background-color: var(--background-color);
    border-radius: 10px;
    margin-bottom: 10px;
}

.his_tbody tr:not(:last-child) {
   
}

.his_result div {
    display: inline-block;
    padding: 2px 0px;
    text-align: center;
    border-radius: 5px;
    margin: 0 2px;
    font-size: 10px;
    color: white;
    float: left;
    width: 20px;
}

.his_x1 { background-color: #53cbf1; }
.his_x2 { background-color: #4884CE; }
.his_x3 { background-color: #3A42A8; }
.his_x4 { background-color: #E24F51; }
.his_hf { background-color: #2ecc40; }
.his_out { background-color: #aaa; color: white; font-size: 9px; }

.his_profit-positive { color: #4EC0E0; font-weight: 800; font-size: 12px; }
.his_profit-negative { color: red; }

.his_title {
    width: calc(100% - 5px);
    height: 20px;
    line-height: 20px;
    background-color: var(--title-bg);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    padding-left: 5px;
}

.his_detail {
    width: 100%;
}


/*************************************************************/
.betting_container {
    max-width: 100%;
    width: 100%;
    padding: 0px;
	border:1px solid rgba(255,255,255,0.4);
	border-radius: 15px;
	
}

.betting_title {
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.betting_panel {
    background-color: #2c2c2c;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.betting_total-amount {
    font-size: 48px;
    text-align: center;
    margin-bottom: 25px;
    color: #4CAF50;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.betting_total-amount::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 50%,
        transparent 100%
    );
    transform: rotate(45deg);
    z-index: 1;
}

.betting_total-amount span {
    position: relative;
    z-index: 2;
}

.betting_currency {
    font-size: 24px;
    vertical-align: super;
    margin-left: 5px;
}

.betting_buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.betting_btn {
    background-color: #3f3f3f;
    color: #ffffff;
    border: none;
    padding: 15px 10px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.betting_btn:hover {
    background-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.betting_btn:active {
    transform: translateY(1px);
}

.betting_currency-badge {
    font-size: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    position: absolute;
    top: 5px;
    right: 5px;
}

.betting_action-buttons {
    display: flex;
    justify-content: space-between;
}

#betting_reset-btn, #betting_submit-btn {
    flex: 1;
    padding: 15px 10px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

#betting_reset-btn {
    background-color: #f44336;
    color: #ffffff;
    margin-right: 10px;
}

#betting_reset-btn:hover {
    background-color: #d32f2f;
}

#betting_submit-btn {
    background-color: #4CAF50;
    color: #ffffff;
}

#betting_submit-btn:hover {
    background-color: #45a049;
}

.clicked {
    animation: clickEffect 0.3s ease;
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}



#progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
	display:;
}

#loading {
    position: fixed;
    width: 200px;
    height: 230px;
    top: 100px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
	color:white;
	font-size:16px;
	font-weight:600;
	text-align:center;
}

#loading_txt {
    width: 100%;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: white;
    animation: fadeInOut 1s infinite;
	margin-top:-10px;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}
