@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;900&display=swap');

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a0b2e 0%, #30104a 100%);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#game-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    margin: 0;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #ff7eb3, #ff758c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 10px rgba(255, 117, 140, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 25px;
    margin-top: 5px;
}

#phaser-game {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(255, 117, 140, 0.2);
    margin: 0 auto;
    /* Ensuring the canvas doesn't blur out */
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
}

canvas {
    display: block;
    margin: 0 auto;
}

.page-wrapper {
    display: grid;
    grid-template-columns: 260px auto 260px;
    align-items: center;
    justify-content: space-between;
    width: 100vw;
    padding: 0 40px;
    box-sizing: border-box;
    max-width: 1600px;
}

.rules-panel {
    justify-self: start;
}

.instructions-panel {
    justify-self: end;
}

.lore-text {
    font-size: 0.95rem;
    color: #ce93d8;
    line-height: 1.4;
    margin-bottom: 20px;
    font-style: italic;
    border-bottom: 1px solid rgba(206, 147, 216, 0.3);
    padding-bottom: 15px;
}

.side-panel {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px 20px;
    border-radius: 16px;
    width: 250px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.side-panel h2 {
    color: #00e5ff;
    margin-top: 0;
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(0, 229, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-shadow: 0px 0px 5px rgba(0, 229, 255, 0.5);
    text-align: center;
}

.side-panel ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.side-panel li {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #e0e0e0;
    line-height: 1.4;
    padding-left: 20px;
    position: relative;
}

.side-panel li::before {
    content: "►";
    color: #ff7eb3;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

#quiz-modal,
#pause-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.quiz-content {
    background: linear-gradient(135deg, #30104a 0%, #1a0b2e 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #ff7eb3;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 126, 179, 0.4);
}

.quiz-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.quiz-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ff7eb3;
    color: white;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-btn:hover {
    background: #ff7eb3;
    color: #1a0b2e;
}

.lifeline-btn {
    display: inline-block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.lifeline-btn:hover:not(:disabled) {
    transform: scale(1.05);
    color: white;
    border-color: #fff;
}

.lifeline-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(100%);
}