/* Mirror Maze Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-color: #1A0A14;
    --primary: #FD79A8;
    --secondary: #FFCCCC;
    --accent: #00CEC9;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

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

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(26, 10, 20, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(253, 121, 168, 0.5);
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.btn {
    background: linear-gradient(135deg, var(--primary), #e84393);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
    margin: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.6);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(253, 121, 168, 0.1);
    box-shadow: 0 0 10px rgba(253, 121, 168, 0.2);
}

/* Level Select Grid */
.level-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 800px;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    max-height: 70vh;
    overflow-y: auto;
}

.level-btn {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.level-btn:hover:not(:disabled) {
    background: var(--primary);
    transform: scale(1.1);
}

.level-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2d3436;
}

.level-btn.completed {
    border: 2px solid var(--accent);
    color: var(--accent);
}

.stars {
    font-size: 0.8rem;
    color: gold;
    margin-top: 2px;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

#hud button {
    pointer-events: all;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.level-info {
    text-align: center;
}

.level-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
}

/* Victory Screen */
#victory-screen {
    background: rgba(26, 10, 20, 0.95);
}

.star-rating {
    font-size: 4rem;
    color: #555; /* Inactive star color */
    margin: 2rem 0;
}

.star-rating span.active {
    color: gold;
    text-shadow: 0 0 20px gold;
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    .level-grid { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .btn { padding: 0.8rem 2rem; font-size: 1.2rem; }
}
