:root{
    --purple-text: #8b6ddd;
    --yellow-text: #fcd34d;
    --green-text: #4ade80;
    --red-text: #ef4444;
    --gray-line:  rgb(68, 65, 87);
    --background-color: rgb(42 42 44);
    --option-background: rgb(87, 87, 87);
    --disabled-option-background: rgb(70, 70, 70);
    --card-background: #2d2d2f;
    --hover-background: rgb(100, 100, 100);
}

.clear{
    clear: both;
}

#text-container p {
    margin-top: 2px;
}

*{
    padding: 0;
    margin: 0;
    font-family: sans-serif;
}


body{
    background-color: var(--background-color);
    color: white;
}

hr {
    border-color: #696969;
}

.modal{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all ease 0.5s;
    display: none;
    align-items: center;
    justify-content: center;
    
}

.flex {
    display: flex !important;
}

.event-container{
    background: linear-gradient(135deg, #3b3b3b 0%, #2d2d2d 100%);
    color: white;
    width: 320px;
    border-radius: 15px;
    max-height: 800px;
    z-index: 1001; 
    animation-name: event-popup;
    animation-duration: 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.event-container p {
    line-height: 20px;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5em;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
    padding: 0;
    line-height: 1;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.modal-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

@keyframes event-popup {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.event-title{
    text-align: center;
    padding: 15px;
    font-size: 1.3em;
    font-weight: bold;
}

.event-body{
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.option{
    cursor: pointer;
    font-size: 1.1em;
    padding: 12px 10px;
    border: 2px solid var(--gray-line);
    background: linear-gradient(135deg, var(--option-background) 0%, rgb(75, 75, 75) 100%);
    border-radius: 8px;
    width: 170px;
    min-height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.option:hover {
    background: linear-gradient(135deg, var(--hover-background) 0%, rgb(90, 90, 90) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.option:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.yellow {
    color: #bece63
}

.green {
    color: var(--green-text);
}

.red {
    color: var(--red-text);
}

.win {
    color: var(--green-text);
    font-weight: bold;
    font-size: 1.2em;
}

.lose {
    color: var(--red-text);
    font-weight: bold;
}

#navbar{
    background: linear-gradient(135deg, rgb(56, 56, 56) 0%, rgb(45, 45, 45) 100%);
    width: 100%;
    min-height: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: fixed;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#money-container{
    margin: 0 auto;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 10px;
    min-width: 60px;
    transition: all ease 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

#money-container:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Casino Styles */
.casino-option {
    width: 220px !important;
}

.casino-icon {
    font-size: 1.5em;
    margin-right: 8px;
}

.card {
    display: inline-block;
    background: white;
    color: black;
    padding: 15px 12px;
    margin: 5px;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 50px;
    text-align: center;
}

.card-back {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.cards-display {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.blackjack-game {
    text-align: center;
}

.dealer-section, .player-section {
    margin: 10px 0;
}

.game-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.result-text {
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
}

.result-text.win {
    background: rgba(74, 222, 128, 0.2);
    border: 2px solid var(--green-text);
}

.result-text.lose {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid var(--red-text);
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.slot-reel {
    font-size: 4em;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 20px;
    border-radius: 10px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: slot-spin 0.5s ease-in-out;
}

@keyframes slot-spin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.roulette-result, .racing-result, .poker-result, .dice-result {
    text-align: center;
    padding: 10px;
}

.horse-option {
    width: 240px !important;
    font-size: 0.95em !important;
}

/* Activity Options */
.activity-option {
    width: 200px !important;
    justify-content: flex-start !important;
    padding-left: 15px !important;
}

.activity-option img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.activity-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--disabled-option-background);
}

.activity-option.disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Health Menu */
.health-section {
    margin-bottom: 15px;
}

.disease-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--red-text);
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

.disease-item p {
    margin: 5px 0;
}

.row{
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

.row:nth-child(2){
    margin-top: 5px;
    min-height: 50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.btn{
    color: #48c267;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.1em;
    border: 2px solid var(--gray-line);
    background-color: #2c2428;
    cursor: pointer;
}

#age-btn{
    margin: 0 auto;
    color: #48c267;
    padding: 20px 50px;
    border-radius: 5%;
    font-size: 1.1em;
    border: 2px solid var(--gray-line);
    background-color: #2c2428;
    cursor: pointer;
    
}

#activities-btn{
    float: right;
    color: #48c267;
    padding: 20px 20px;
    border-radius: 50%;
    font-size: 1.1em;
    border: 2px solid var(--gray-line);
    background-color: #2c2428;
    cursor: pointer;
}

#stats-list{
    clear: both;
    height: min-content;
    display: block;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid var(--gray-line);
    border-radius: 2%;
    padding: 5px;
    background-color: #2c2428;
}

#stats-list li{
    text-align: right;
    display: flex;
    flex-direction: row;
    margin: 2px;
    float: right;
    width: 100%;
    justify-content: end;
}

#stats-list ul {
    margin: 0 auto;
}

.bar{
    margin-left: 5px;
    background-color: rgb(68, 65, 87);
    width: 250px;
}

.bar-progress{
    height: 100%;
    animation-duration: 0.4s;
}

@keyframes animation-bar {
    from {
        width: 0;
    }
}

.bar-percentage{
    float: right;
    
}

#tale-container{
    margin: 10px auto;
    width: 365px;
    border: 2px solid rgb(68, 65, 87);
    border-radius: 2%;
    background-color: #2c2428;
}

#text-container{
    overflow-y: auto;
    height: calc(100vh - 500px);
    padding: 15px;
}

*::-webkit-scrollbar {
    background-color: #303030;
    width: 15px;
}

*::-webkit-scrollbar-thumb {
    background-color: #505050;
    border-radius: 15px;
}

#head-container{
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid rgb(68, 65, 87);;
}

main{
    padding-top: 65px;
}

#menu-template{
    background-color: rgb(41, 41, 41);
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: none;
    animation-name: menu-popup;
    animation-duration: 0.3s;
    padding: 0;
    z-index: 900;
    overflow-y: auto;
}

#menu-body{
    overflow-y: auto;
    max-height: calc(100vh - 110px);
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

@keyframes menu-popup {
    from{
        bottom: -100%;
    }
    to{
        bottom: 0;
    }
}

#menu-template ul:not(#inventory-container) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

#menu-template li:not(.item-container){
    list-style: none;
    width: 300px;
    display: flex;
    justify-content: left;
    color: white;
    text-decoration: none;
}

#menu-template h2{
    font-size: 1.6em;
    text-align: center;
}

#menu-template img:not(.item-preview){
    width: 60px;
    height: 50px;
    margin-right: 5px;
    float: left;
}

.menu-header{
    display: flex;
    flex-direction: row;
    padding: 5px;
    margin-top: 15px;
}

.menu-header h2 {
    margin: 0 auto;
    text-align: center;
}

.menu-header button {
    float: right;
    margin-right: 15px;
}

a{
    text-decoration: none;
    color: white;
}

#close-menu{
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #ffff;
    position: absolute;
    right: 15px;
}

#control-container{
    margin: 0 auto;
    width: 360px;
}

hr{
    margin-bottom: 10px;
}

#stats-container{
    display: flex;
    justify-content: center;
}

select{
    margin: 0 auto;
    width: 80%;
    padding: 15px ;
    background-color:rgb(56, 56, 56);
    color: white;
    font-size: 20px;
    border-radius: 15px;
}

#menu-template select{
    margin: 0 auto;
    width: 324px;
    padding: 15px ;
    background-color:rgb(56, 56, 56);
    color: white;
    font-size: 20px;
    border: none;
    border-radius: 15px;
}

#menu-template #select-container{
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.switch{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #bece63;
}

.switch-background{
    background-color: rgb(109, 33, 105);
    width: 50px;
    height: 20px;
    padding: 1px;
    border-radius: 100%;
    margin-right: 15px;
}

li{
    list-style: none;
}

.relationship-container{
    margin: 0 auto;
    margin-bottom: 5px;
    background-color: #7b4891;
    padding: 10px 20px;
    border: 2px solid #693b7c;
    border-radius: 5px;
    cursor: pointer;
}

.relationship-container p{
    display: flex;
    flex-direction: column;
    justify-content: right;
}

.relation-background{
    margin-left: 5px;
    background-color: rgb(89, 56, 121);
    width: 235px;
    height: 15px;
}

.relation{
    height: 100%;
}

.opinion-data-wrapper{
    display: flex;
    flex-direction: column;
}

.window-bar{
    width: 250px;
    height: 15px;
    background-color: #303030;
}

.event-container hr{
    animation-name: loading-hr;
    animation-duration: 0.5s;
    margin: 0 auto;
}

#event-container {
    display: none;
}

@keyframes loading-hr{
    from{
        width: 0;
    } to{
        width: 100%;
    }
}

.disabled{
    background-color: var(--disabled-option-background);
    color: #969696 !important;
    cursor: not-allowed;
}

#job-wrapper{
    width: 350px;
    margin: 0 auto;
}

#jobs-container{
    height: 80vh;
    border: 2px solid #636363;
    margin: 0 auto;
    padding: 0 ;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto;
}

.cell{
    height: 2em;
    background-color: #303030;
    border-bottom: 1px solid #636363;
    padding: 10px;
    cursor: pointer;
}

.cell:hover{
    background-color: #4d4d4d;
}

.column{
    display: flex;
    flex-direction: column;
}

.switch-container{
    position: absolute;
    right: 5px;
}

.green{
    color: #15c53b;
}


.item-container{
    background-color: #303030;
    width: 120px !important;
    height: 150px;
    margin: 15px;
    cursor: pointer;
}

.item-container figcaption{
    text-align: center;
}

#inventory-container{
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    align-items: baseline !important;
    flex-wrap: wrap;
    padding: 15px;

}

.item-preview{
    width: 120px;
    height: 80%;
}

#no-items{
    text-align: center;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
}

#money-container{
    text-align: center;
}

#relation-button{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.button-container{
    text-align: center;
    font-size: 15px;
}

#relationship-container{
    margin: 0 auto;
}

#cell-container{
    height: 80vh;
    border: 2px solid #636363;
    margin: 0 auto;
    padding: 0 ;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto;
    position: relative;
}

.tab{
    padding: 5px;
    background-color: #3b3b3b;
    border: 2px solid #636363;
    border-bottom: none;
    width: 45%;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    z-index: 100;
    text-align: center;
    cursor: pointer;
}

.tab:hover{
    background-color: #4d4d4d;
}

.active{
    background-color: #4d4d4d;
}

.assetsContainer{
    width: 350px;
    margin: 0 auto;
}

#assets-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#death-screen{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #3b3b3b;
    display: none;
}
#death-screen-body{
    margin: 0 auto;
    width: 350px;
}

#death-screen button{
    margin: 0 auto;
    padding: 5px 15px;
    font-size: 20px;
    
}

#death-screen-title{
    text-align: center;
    padding: 5px;
}

#obituary-container{
    padding: 15px;
    margin: 0 auto;
    border: 2px solid #636363;
    border-radius: 15px;
    overflow-y: auto;
    height: 80vh;
    margin-bottom: 15px;
}

.relationships-container{
    width: 360px;
    margin: 0 auto;
}

.relationships-container h3{
    font-size: 1.5em;
}

#create-character-screen{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200;
    background-color: rgba(27, 27, 27, 0.904);
}

#create-character-screen h1{
    width: 350px;
    text-align: center;
    margin: 0 auto;
    color: var(--yellow-text);
    margin-top: 15px;
    font-size: 32px;
}

.create-btn{
    padding: 15px 30px;
    width: 340px;
    font-size: 25px;
    margin: 15px auto;
    cursor: pointer;
    background: linear-gradient(135deg, #8b6ddd 0%, #7059c9 100%);
    border: 2px solid var(--purple-text);
    color: white;
    transition: all 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(139, 109, 221, 0.3);
    font-weight: bold;
}

.create-btn:hover{
    background: linear-gradient(135deg, #9d7eef 0%, #8b6ddd 100%);
    border: 2px solid #c373e6;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 109, 221, 0.5);
}

.create-btn:active{
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(139, 109, 221, 0.4);
}

#buttons-container{
    display: flex;
    flex-direction: column;
    width: 350px;
    margin: 30px auto;
}

#create-character-screen input, .event-body input{
    padding: 5px;
    border-radius: 5px;
    background-color: #303030;
    border: none;
    color: #ffff;
    font-size: 20px;
}

#create-character-screen select{
    width: 350px;
    padding: 5px;
    font-size: 15px;
    border-radius: 5px;
    border: none;
    background-color: #303030;
    color: #ffff;
    font-size: 20px;
}

.input-group{
    width: 350px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.input-group label{
    margin-top: 15px;
    font-size: 25px;
    color: rgb(211, 211, 211);
}

#skills-icon{
    width: 50px !important;
}

.btn img{
    width: 30px;
    height: 30px;
}

.rectangular-btn{
    margin: 0 auto;
    color: #48c267;
    width: 150px;
    height: 60px;
    border-radius: 5%;
    font-size: 1.1em;
    border: 2px solid var(--gray-line);
    background-color: var(--background-color);
    cursor: pointer;
}
.bar-container {
    width: 100%;
}

#profile-container{
    position: absolute;
    right: 0;
}

#left-btn-container{
    position: absolute;
    left: 0;
}

#general-container{
    margin: 0 auto;
    width: 360px;
}

.green{
    color: #15c53b;
}

.red{
    color: #df3b3b;
}

#modal-background select {
    padding: 5px !important;
}