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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

header h1 {
    text-align: center;
    color: #764ba2;
    font-size: 2.5em;
    margin-bottom: 30px;
}

.status-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: background 0.5s ease;
}

.current-level {
    color: white;
}

.level-number {
    display: block;
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 10px;
}

.level-name {
    display: block;
    font-size: 1.8em;
    font-weight: 300;
}

.all-levels {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.all-levels h3 {
    color: #764ba2;
    margin-bottom: 15px;
}

.all-levels ol {
    margin-left: 25px;
    line-height: 1.8;
}

.all-levels li {
    color: #555;
    font-size: 1.1em;
}

.admin-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.admin-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.admin-btn:active {
    transform: translateY(0);
    background: #764ba2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.close:hover {
    color: #000;
}

.close:active {
    color: #f5576c;
}

.modal-content h2 {
    color: #764ba2;
    margin-bottom: 25px;
    text-align: center;
}

.modal-content h3 {
    color: #764ba2;
    margin-bottom: 20px;
}

#loginSection input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    min-height: 50px;
    -webkit-appearance: none;
    appearance: none;
}

#loginSection input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#loginSection button,
.logout-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

#loginSection button:hover,
.logout-btn:hover {
    background: #764ba2;
}

#loginSection button:active,
.logout-btn:active {
    background: #764ba2;
    transform: scale(0.98);
}

.error {
    color: #f5576c;
    margin-top: 10px;
    text-align: center;
}

.level-selector {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.level-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1em;
    min-height: 50px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.level-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

.level-btn:active {
    transform: scale(0.98);
}

.level-btn.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .container {
        padding: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
        border-radius: 15px;
    }

    header h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    .status-display {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .level-number {
        font-size: 3em;
    }

    .level-name {
        font-size: 1.3em;
    }

    .all-levels {
        margin: 20px 0;
        padding: 15px;
    }

    .all-levels ol {
        margin-left: 20px;
    }

    .all-levels li {
        font-size: 1em;
        line-height: 2;
        padding: 5px 0;
    }

    .modal {
        align-items: flex-start;
        padding: 10px;
    }

    .modal-content {
        margin: 10px auto;
        padding: 25px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
        margin-right: 30px;
    }

    .modal-content h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .level-selector {
        gap: 12px;
    }

    .level-btn {
        padding: 18px 15px;
        font-size: 1.05em;
        min-height: 56px;
    }

    /* Disable hover effects on mobile */
    .admin-btn:hover {
        transform: none;
    }

    .level-btn:hover {
        transform: none;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    header h1 {
        font-size: 1.5em;
    }

    .level-number {
        font-size: 2.5em;
    }

    .level-name {
        font-size: 1.1em;
    }

    .modal-content {
        padding: 20px;
    }

    .all-levels h3 {
        font-size: 1em;
    }

    .all-levels li {
        font-size: 0.95em;
    }
}
