:root {
    --primary: #ec4899;
    --primary-light: #f472b6;
    --accent: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    overflow-x: hidden;
    touch-action: none;
}

.bubble-game-container {
    max-width: 500px;
    margin: 80px auto 20px auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    position: relative;
}

.bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bubble-header h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bubble-game-icon-small {
    width: 32px;
    height: 32px;
}

.bubble-back-btn {
    padding: 10px 20px;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bubble-back-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    transform: translateX(-5px);
}

.bubble-game-info {
    display: flex;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 20px;
    border-radius: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
}

.bubble-stats {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: space-around;
}

.bubble-game-screen {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

canvas {
    width: 100%;
    aspect-ratio: 2/3;
    background: #020617;
    border: 3px solid #334155;
    border-radius: 20px;
    display: block;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Modal and Message styles */
.bubble-modal,
.bubble-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 20px;
    animation: fadeIn 0.3s ease-out;
}

.bubble-modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    width: 85%;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.bubble-input-group {
    margin-bottom: 25px;
    text-align: left;
}

.bubble-input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.bubble-input-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.bubble-input-group input:focus {
    border-color: var(--primary);
}

.bubble-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(236, 72, 153, 0.4);
    transition: all 0.3s ease;
}

.bubble-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(236, 72, 153, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .bubble-game-container {
        margin: 80px 10px 20px 10px;
        padding: 15px;
    }
}