@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Pixelify+Sans:wght@400..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    width: 100%;
}

#main {
    width: 100vw;
    height: 100vh;
    background-image: url('../img/background2.png');
    margin: 0;
    background-repeat: round;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#canvas {
    background-color: #ffffff00;
    background-repeat: repeat;
    background-size: 128px 128px;
}

#title {
    font-family: "Pixelify Sans", sans-serif;
    font-size: 3em;
    color: #FFD700;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    text-shadow:
        3px 3px 0px rgba(255, 165, 0, 0.6),
        -3px -3px 0px rgba(255, 165, 0, 0.6),
        3px -3px 0px rgba(255, 165, 0, 0.6),
        -3px 3px 0px rgba(255, 165, 0, 0.6),
        0px 0px 20px rgba(255, 215, 0, 0.8),
        0px 0px 40px rgba(255, 165, 0, 0.6);
    font-weight: 700;
    letter-spacing: 3px;
    z-index: 10;
}

#doubloon_score {
    font-family: "Pixelify Sans", sans-serif;
    font-size: 1.5em;
    color: #FFD700;
    text-shadow:
        1px 1px 0px rgba(255, 165, 0, 0.6),
        -1px -1px 0px rgba(255, 165, 0, 0.6),
        1px -1px 0px rgba(255, 165, 0, 0.6),
        -1px 1px 0px rgba(255, 165, 0, 0.6);
    position: absolute;
    top: 20px;
    left: 20px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 10;
}

#bilge_rat_store {
    background-image: url('../img/scallywagFloor.png');
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: auto;
    border: 2px solid #FFD700;
    background-size: 256px 256px;
    border-radius: 10px;
    padding: 15px;
    font-family: "Pixelify Sans", sans-serif;
    color: #FFD700;
    z-index: 10;
    display: none;
}

#bilge_rat_store.active {
    display: block;
}

#store_toggle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    border: 2px solid #8B4513;
    padding: 10px 15px;
    font-size: 1.2em;
    font-family: "Pixelify Sans", sans-serif;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

#store_toggle:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 165, 0, 0.5);
}

#bilge_rat_store h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    text-align: center;
}

#bilge_rat_store p {
    text-align: center;
    font-size: 1em;
    margin-bottom: 10px;
}

#bilge_rat_store ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#bilge_rat_store li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #FFD700;
}

button {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    border: 2px solid #8B4513;
    padding: 8px 20px;
    font-size: 1em;
    font-family: "Pixelify Sans", sans-serif;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 165, 0, 0.5);
}

button:active {
    transform: scale(0.98);
}

#music {
    position: absolute;
    right: 1vw;
    bottom: 1vh;
    color: #FFD700;
    padding: 10px 15px;
    font-size: 1em;
    font-family: "Pixelify Sans", sans-serif;
    font-weight: bold;
    z-index: 11;
    text-shadow:
        1px 1px 0px rgba(255, 165, 0, 0.6),
        -1px -1px 0px rgba(255, 165, 0, 0.6),
        1px -1px 0px rgba(255, 165, 0, 0.6),
        -1px 1px 0px rgba(255, 165, 0, 0.6);
}


#leaderboard_toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    border: 2px solid #8B4513;
    padding: 10px 15px;
    font-size: 1.2em;
    font-family: "Pixelify Sans", sans-serif;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

#leaderboard_toggle:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 165, 0, 0.5);
}
