* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Menu Styles */
#menu {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.menu-container {
    text-align: center;
    color: white;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00ff87, #60efff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 135, 0.3);
    margin-bottom: 3rem;
    letter-spacing: 4px;
}

.level-select {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.level-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    width: 300px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.level-preview {
    width: 100%;
    height: 150px;
    background: linear-gradient(45deg, #4a90d9, #357abd);
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.level-preview::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #2a2a2a;
}

.cube-icon {
    width: 40px;
    height: 40px;
    background: #00ff87;
    border: 3px solid #00cc6a;
    position: relative;
    z-index: 1;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.level-info {
    margin-bottom: 1.5rem;
}

.level-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.difficulty {
    margin: 0.5rem 0;
}

.star {
    color: #ffd700;
    font-size: 1.2rem;
}

.star.empty {
    color: #666;
}

.difficulty-text {
    color: #00ff87;
    font-weight: bold;
    font-size: 1.1rem;
}

.play-btn {
    background: linear-gradient(45deg, #00ff87, #00cc6a);
    border: none;
    color: #1a1a2e;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 255, 135, 0.3);
}

.menu-footer {
    margin-top: 3rem;
    color: #888;
    font-size: 0.9rem;
}

/* Game Styles */
#game {
    background: #000;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

#progress-bar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff87, #60efff);
    border-radius: 4px;
    transition: width 0.1s;
}

#attempt-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Death Screen */
#death-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.death-container {
    text-align: center;
    color: white;
}

.death-container h2 {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 2rem;
}

.death-stats {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.death-stats p {
    margin: 0.5rem 0;
}

.retry-btn, .menu-btn {
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    margin: 0 10px;
    transition: transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.retry-btn {
    background: linear-gradient(45deg, #00ff87, #00cc6a);
    color: #1a1a2e;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.retry-btn:hover, .menu-btn:hover {
    transform: scale(1.1);
}

/* Complete Screen */
#complete-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.complete-container {
    text-align: center;
    color: white;
}

.complete-container h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #00ff87, #60efff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.complete-stats {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.complete-stats p {
    margin: 0.5rem 0;
}
