@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, Arial, sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    opacity: 0;
    animation: fadeInDown 1s ease-in-out forwards;
}

canvas {
    display: block;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease-in-out 0.2s forwards;
    transition: background-color 0.3s;
    touch-action: none;
}

.controls {
    max-width: 600px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInUp 1s ease-in-out 0.4s forwards;
}

select {
    padding: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

button {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #007aff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

button:hover {
    background: #005bb5;
    transform: scale(1.05);
}

.pause-button {
    background: #ff9500;
}

.pause-button:hover {
    background: #e08900;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeIn 1s ease-in-out 0.6s forwards;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.back-button i {
    margin-right: 8px;
}

.footer {
    margin: 20px auto;
    font-size: 0.9rem;
    color: #a1a1a6;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1s ease-in-out 0.8s forwards;
    transition: color 0.3s;
}

.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.game-over-modal.show {
    display: flex;
    opacity: 1;
}

.game-over-modal h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.game-over-modal p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #a1a1a6;
}

/* Светлая тема */
body.light {
    background: #f4f4f9;
    color: #000;
}

body.light canvas {
    background: rgba(0, 0, 0, 0.05);
}

body.light select {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light select:focus {
    background: rgba(0, 0, 0, 0.2);
}

body.light .footer {
    color: #666;
}

body.light .pause-button {
    background: #34c759;
}

body.light .pause-button:hover {
    background: #2daf50;
}

/* Анимации */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes grow {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Адаптивность */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    canvas { width: 300px; height: 300px; }
    select, button { font-size: 0.9rem; padding: 10px 20px; }
    .theme-toggle { font-size: 0.8rem; padding: 8px 16px; }
    .footer { font-size: 0.8rem; }
    .game-over-modal h2 { font-size: 2rem; }
    .game-over-modal p { font-size: 1.2rem; }
} 