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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.login-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.form-content {
    width: 90%;
    max-width: 400px;
}

.login-form h1 {
    color: #000;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #f9f9f9;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    background: white;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.stat {
    background: #f5f5f5;
    padding: 12px 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.label {
    color: #666;
    font-size: 0.85rem;
    margin-right: 8px;
}

#attempts, #timer {
    color: #000;
    font-size: 1.3rem;
    font-weight: bold;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.difficulty-btn {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    background: #f5f5f5;
    border-color: #000;
}

.difficulty-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

.game-area {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
}

.runaway-button {
    position: relative;
    padding: 12px 30px;
    font-size: 1rem;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    width: auto;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.runaway-button:hover {
    background: #333;
}

.runaway-button:active {
    background: #333;
}

.runaway-button.drifting {
    position: fixed;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid #000;
    z-index: 1000;
}

.success-message.hidden {
    display: none;
}

.success-message h2 {
    color: #000;
    margin-bottom: 20px;
    font-size: 2rem;
}

.success-message p {
    color: #333;
    font-size: 1.2rem;
    margin: 10px 0;
}

.reset-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.reset-btn:hover {
    transform: scale(1.05);
    background: #333;
}

.difficulty-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #000;
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.difficulty-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 768px) {
    .form-content {
        width: 90%;
        padding: 0 20px;
    }

    .login-form h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 14px 15px;
        font-size: 16px;
    }

    .runaway-button {
        padding: 14px 40px;
        font-size: 1rem;
        touch-action: none;
    }

    .stats {
        gap: 15px;
        flex-wrap: wrap;
        bottom: 20px;
    }

    .stat {
        padding: 10px 20px;
    }

    .label {
        font-size: 0.8rem;
    }

    #attempts, #timer {
        font-size: 1.1rem;
    }

    .difficulty-notification {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .form-content {
        width: 95%;
        padding: 0 15px;
    }

    .login-form h1 {
        font-size: 1.75rem;
    }

    .form-group input {
        padding: 12px;
        font-size: 16px;
    }

    .runaway-button {
        padding: 12px 35px;
        font-size: 0.95rem;
    }

    .stats {
        gap: 10px;
        bottom: 15px;
    }

    .stat {
        padding: 8px 15px;
    }

    .success-message {
        width: 90%;
        padding: 30px 20px;
    }

    .success-message h2 {
        font-size: 1.5rem;
    }

    .success-message p {
        font-size: 1rem;
    }
}
