@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000;
    font-family: 'Fredoka One', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.main-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 100px;
    width: 100%;
    max-width: 1200px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.game-container {
    width: 400px;
    height: 500px;
    background: #0a0a0a;
    border: 5px solid #800080;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 0 20px rgba(128, 0, 128, 0.2);
}

.game-header {
    width: 100%;
    background: #4b0082;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-size: 1.5rem;
    border-bottom: 5px solid #000;
    text-shadow: 2px 2px 0 #000;
}

#game-area {
    width: 100%;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    z-index: 10;
}

.menu-title {
    font-size: 1.5rem;
    color: white;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 10px;
}

.menu-btn {
    padding: 12px 25px;
    font-size: 1.2rem;
    font-family: 'Fredoka One', cursive;
    background-color: #800080;
    color: white;
    border: 3px solid #000;
    cursor: pointer;
    box-shadow: 0 4px 0 #000;
    text-shadow: 2px 2px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
    width: 200px;
}

.menu-btn:hover {
    background-color: #9932cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000;
}

.menu-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #000;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#back-to-menu {
    width: 100%;
    background: #4b0082;
    color: white;
    border: none;
    border-top: 5px solid #000;
    padding: 10px;
    font-family: 'Fredoka One', cursive;
    cursor: pointer;
}

#back-to-menu:hover {
    background: #800080;
}

.score-board {
    width: 100%;
    background: #1a002e;
    color: #ff00ff;
    text-align: center;
    padding: 15px 0;
    font-size: 1.3rem;
    border-top: 5px solid #000;
    text-shadow: 1px 1px 0 #000;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    border: 3px solid #000;
    cursor: pointer;
    transition: transform 0.1s;
    animation: float 3s linear infinite;
}

.bubble:active {
    transform: scale(0.8);
}

.bubble-purple { background: #800080; box-shadow: inset -5px -5px 0 rgba(0,0,0,0.2); }
.bubble-pink { background: #ff00ff; box-shadow: inset -5px -5px 0 rgba(0,0,0,0.2); }
.bubble-red { background: #ff0000; box-shadow: inset -5px -5px 0 rgba(0,0,0,0.2); }

@keyframes float {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-400px); opacity: 0; }
}

.card-container {
    perspective: 1200px; 
    width: 320px;
    height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    width: 300px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out; 
    cursor: pointer;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0; 
    border: 5px solid #800080;
    box-shadow: 0 0 20px rgba(128, 0, 128, 0.3); 
    box-sizing: border-box; 
}

.card-front {
    background: linear-gradient(135deg, #2d004d, #1a002e);
    color: white;
    font-size: 2rem;
    text-align: center;
    padding: 20px;
    text-shadow: 2px 2px 4px #000;
}

.card-back {
    background: #0a0a0a;
    transform: rotateY(180deg);
    border-color: #4b0082;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 80%;
}

.btn {
    text-decoration: none;
    background-color: #800080;
    color: white;
    padding: 15px;
    border-radius: 0; 
    text-align: center;
    font-size: 1.2rem;
    border: 3px solid #000;
    box-shadow: 0 4px 0 #000;
    transition: all 0.1s;
    text-shadow: 2px 2px 0 #000;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000;
    background-color: #9932cc;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #000;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #800080;
}

.volume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    cursor: pointer;
    background: #4b0082;
    border-radius: 6px;
    border: 2px solid #000;
}

input[type=range]::-webkit-slider-thumb {
    border: 2px solid #000;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #800080;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    box-shadow: 0 3px 0 #000;
}

label {
    font-size: 1.2rem;
    text-shadow: 2px 2px 0 #000;
}
