* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
}

/* Mobile/Tablet Warning Screen */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    padding: 2rem;
}

.warning-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

.warning-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #ff6b6b;
}

.warning-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #ff6b6b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.warning-message {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.desktop-icon {
    font-size: 3rem;
    margin: 1rem 0;
    color: #4ecdc4;
}

.requirements-list {
    text-align: left;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

.requirements-list h4 {
    color: #4ecdc4;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.requirements-list ul {
    list-style: none;
    padding: 0;
}

.requirements-list li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.requirements-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-weight: bold;
}

@media (min-width: 812px) {
    .mobile-warning {
        display: none !important;
    }
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100dvh;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

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

/* Welcome Screen */
.welcome-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.game-title {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-group {
    margin-bottom: 2rem;
}

.username-input {
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    width: 300px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.username-input:focus {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:disabled {
    opacity: .4;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.7);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal p {
    color: #666;
    line-height: 1;
    margin-bottom: 1rem;
}

/* Game Board Screen */
.game-container {
    display: flex;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.maze-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 10px;
}

.maze-cell {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.maze-cell.wall {
    background: #0a0a0a;
}

.maze-cell.crashWall {
    background: #0a0a0a5b;
    opacity: 0.4;
    animation: crashWall .4s forwards;
}

@keyframes crashWall {
    from {
        background: #0a0a0a5b;
        opacity: 0.4;
    }

    to {
        background: #0a0a0a00;
        opacity: 0;
    }
}

.maze-cell.start {
    background: #2ecc71;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.6);
}

.maze-cell.finish {
    background: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.6);
}

.maze-cell.player {
    background: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.8);
    animation: pulse 2s infinite;
}

.info-panel {
    min-width: 250px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
}

.info-item {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

.info-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.info-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.hp-container {
    display: flex;
    gap: 5px;
    margin-top: 0.5rem;
}

.hp-heart {
    width: 20px;
    height: 20px;
    background: #e74c3c;
    border-radius: 50%;
    position: relative;
}

.hp-heart.empty {
    background: #333;
}

/* Game Over Screen */
.gameover-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.gameover-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #e74c3c;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.score-info {
    margin-bottom: 2rem;
}

.score-item {
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

/* Leaderboard Screen */
.leaderboard-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    min-width: 500px;
}

.leaderboard-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #4ecdc4;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: bold;
    color: #4ecdc4;
}

.leaderboard-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Alert Popup */
.alert-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 2000;
}

.alert-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-popup.success {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
}

.alert-popup.error {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.alert-popup.info {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}