* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

header {
    flex-shrink: 0;
}

header a {
    transition: opacity 0.2s;
}

header a:hover {
    opacity: 0.8;
}

body > #gameContainer {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameContainer {
    position: relative;
    background: #000000;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 20px;
    border: 2px solid #333;
}

canvas {
    display: block;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-radius: 10px;
    border: 2px solid #333;
}

#ui {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 10;
    pointer-events: none;
}

#timer {
    font-size: 48px;
    font-weight: bold;
    color: #DC143C;
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.8),
                 0 0 40px rgba(220, 20, 60, 0.4),
                 2px 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

#status {
    font-size: 18px;
    opacity: 0.9;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    display: none;
    z-index: 20;
    border: 2px solid #DC143C;
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
}

#gameOver h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #DC143C;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.8);
}

#gameOver p {
    font-size: 24px;
    margin-bottom: 30px;
}

button {
    background: linear-gradient(135deg, #DC143C 0%, #B01030 100%);
    color: white;
    border: 2px solid #DC143C;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.6);
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
}

#controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

#titleScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.98);
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    color: white;
    z-index: 30;
    max-width: 750px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 3px solid #DC143C;
}

#titleScreen h1 {
    font-size: 48px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #DC143C, #FF1744);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
    font-weight: bold;
    letter-spacing: 4px;
}

#rules {
    background: rgba(220, 20, 60, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

#rules h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #DC143C;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

#rules ul {
    list-style: none;
    padding: 0;
}

#rules li {
    font-size: 16px;
    line-height: 2;
    padding: 8px 0;
    border-bottom: 1px solid rgba(220, 20, 60, 0.2);
}

#rules li:last-child {
    border-bottom: none;
}

#rules strong {
    color: #DC143C;
    text-shadow: 0 0 5px rgba(220, 20, 60, 0.3);
}

#startBtn {
    font-size: 24px;
    padding: 20px 60px;
    background: linear-gradient(135deg, #DC143C 0%, #B01030 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(220, 20, 60, 0.4);
    border: 2px solid #DC143C;
}

#startBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(220, 20, 60, 0.6);
    background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
}

