* {
    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;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #eee, transparent);
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-size: 3em;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.3em;
    color: #fff;
    font-weight: bold;
}

.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.welcome-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 600px;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-card h2 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 20px;
}

.welcome-card p {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #444;
}

.start-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
    transition: all 0.3s;
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
}

.progress-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-text {
    text-align: center;
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.level-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: relative;
}

.level-card.unlocked {
    animation: unlockPulse 0.6s ease-out;
}

@keyframes unlockPulse {
    0% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.level-card.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.level-card.completed {
    border: 3px solid #4CAF50;
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
}

.level-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.level-number {
    color: white;
    font-size: 2em;
    font-weight: bold;
}

.level-card h3 {
    text-align: center;
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.level-card p {
    text-align: center;
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.level-status {
    text-align: center;
    margin-bottom: 15px;
}

.status-indicator {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 0.9em;
    font-weight: bold;
}

.level-card.completed .status-indicator {
    background: #e8f5e9;
    color: #4CAF50;
}

.level-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.level-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.level-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.achievements-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.achievements-section h3 {
    text-align: center;
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.badge {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    animation: badgeAppear 0.5s ease-out;
}

@keyframes badgeAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.badge-icon {
    font-size: 2.5em;
}

.badge-text {
    font-size: 0.7em;
    color: white;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
}

.helper-section {
    text-align: center;
    margin: 40px 0;
}

.helper-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.helper-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 1em;
}

/* Lesson Page Styles */
.lesson-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lesson-header {
    text-align: center;
    margin-bottom: 30px;
}

.lesson-header h2 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.lesson-header p {
    color: #555;
    font-size: 1.2em;
}

.step-container {
    margin-bottom: 30px;
}

.step {
    background: #f5f5f5;
    border-left: 5px solid #667eea;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.step h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.step p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #444;
}

.step ul {
    margin-left: 20px;
    margin-top: 10px;
}

.step li {
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.6;
}

.tip-box {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.tip-box h4 {
    color: #ff6f00;
    margin-bottom: 10px;
}

.challenge-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
}

.challenge-box h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.challenge-box p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.complete-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transition: all 0.3s;
}

.complete-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.6);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.back-btn, .next-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn {
    background: #e0e0e0;
    color: #666;
}

.back-btn:hover {
    background: #d0d0d0;
}

.next-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 1000;
    transition: transform 0.3s;
}

.success-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.success-popup h2 {
    color: #4CAF50;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.overlay.show {
    display: block;
}

/* Keyboard Guide Styles */
.keyboard-guide {
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
    border: 3px solid #00bcd4;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.keyboard-guide h4 {
    color: #00838f;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.keyboard-visual {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.key {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s;
}

.key.white {
    width: 40px;
    height: 120px;
    background: white;
    border: 2px solid #333;
    border-radius: 0 0 5px 5px;
}

.key.black {
    width: 28px;
    height: 75px;
    background: #333;
    border: 2px solid #000;
    border-radius: 0 0 3px 3px;
    margin: 0 -16px;
    z-index: 2;
}

.key-label {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 0.8em;
    font-weight: bold;
}

.key.white .key-label {
    color: #666;
}

.key.black .key-label {
    color: #fff;
}

.key.highlight {
    animation: keyPulse 1s infinite;
}

.key.white.highlight {
    background: #ffeb3b;
    border-color: #fbc02d;
}

.key.black.highlight {
    background: #ff6f00;
    border-color: #e65100;
}

@keyframes keyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 235, 59, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 235, 59, 0.8);
    }
}

.pad-guide {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.pad {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.8em;
    text-align: center;
    border: 3px solid rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.pad.highlight {
    animation: padPulse 1s infinite;
}

@keyframes padPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    }
}

/* Help Button Styles */
.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6f61 0%, #ff8a65 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 111, 97, 0.4);
    transition: all 0.3s;
    z-index: 100;
}

.help-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 111, 97, 0.6);
}

/* Session Timer Styles */
.session-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    color: #667eea;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.session-timer.break-time {
    background: linear-gradient(135deg, #ff6f61 0%, #ff8a65 100%);
    color: white;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Share Button Styles */
.share-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 20px;
    gap: 15px;
}

.top-nav-left,
.top-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: white;
    font-size: 0.9em;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.auth-btn {
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.logout-btn {
    background: #ff6f61;
    border-color: #ff6f61;
    color: white;
}

.logout-btn:hover {
    background: #ff5a4d;
    border-color: #ff5a4d;
}

.switch-profile-btn-top {
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-profile-btn-top:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.helper-link-top {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.helper-link-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-modal-close:hover {
    background: #ff6f61;
    color: white;
    transform: rotate(90deg);
}

.auth-modal-content h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.auth-modal-subtitle {
    color: #666;
    margin-bottom: 25px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.auth-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.auth-tab:hover:not(.active) {
    background: #e8e8e8;
}

.auth-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
}

.auth-input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.auth-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-magic-link {
    width: 100%;
    padding: 15px;
    background: white;
    color: #4CAF50;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-magic-link:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        padding: 10px;
    }

    .top-nav-left,
    .top-nav-right {
        width: 100%;
        flex-direction: column;
    }

    .switch-profile-btn-top,
    .auth-btn,
    .helper-link-top {
        width: 100%;
        justify-content: center;
    }

    .user-email {
        width: 100%;
        text-align: center;
    }

    .auth-modal-content {
        padding: 25px;
    }
}

/* Profile Management Styles */
.profile-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 700px;
    width: 100%;
}

.profile-card h2 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 10px;
}

.profile-card > p {
    color: #444;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    max-height: 300px;
    overflow-y: auto;
}

.profile-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.profile-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.profile-avatar {
    font-size: 3em;
    margin-bottom: 10px;
}

.profile-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-stats {
    font-size: 0.85em;
    opacity: 0.9;
}

.profile-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 0.9em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-item:hover .profile-delete {
    opacity: 1;
}

.profile-delete:hover {
    background: rgba(255, 0, 0, 1);
}

.profile-create {
    background: #f5f5f5;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.profile-create h3 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
}

/* Profile Step Indicator */
.profile-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s;
}

.step-dot.active {
    background: #667eea;
    width: 16px;
    height: 16px;
}

/* Profile Steps */
.profile-step {
    display: none !important;
}

.profile-step.active {
    display: block !important;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-step h4 {
    color: #667eea;
    font-size: 1.2em;
    margin-bottom: 10px;
}

.step-description {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 20px;
}

/* Genre Selector */
.genre-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.genre-option {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.genre-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.genre-option.selected {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.genre-icon {
    font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}

.genre-name {
    font-size: 0.9em;
    color: #444;
    font-weight: 500;
}

/* Favorite Artists Input */
.favorite-artists-input {
    margin-top: 15px;
    text-align: left;
}

.favorite-artists-input label {
    display: block;
    color: #444;
    font-size: 0.95em;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Hardware Selector */
.hardware-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.hardware-field {
    text-align: left;
}

.hardware-field label {
    display: block;
    color: #444;
    font-size: 0.95em;
    margin-bottom: 8px;
    font-weight: 500;
}

.hardware-select {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.hardware-select:hover {
    border-color: #667eea;
}

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

/* Navigation Buttons */
.profile-next-btn,
.profile-back-btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.profile-next-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.profile-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.profile-back-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.profile-back-btn:hover {
    background: #f5f5f5;
}

/* Hardware Setup Display */
.hardware-setup-section {
    margin: 30px 0;
}

.hardware-setup-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.hardware-setup-card h3 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.hardware-diagram {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hardware-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.hardware-item {
    background: #f5f5f5;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 12px;
}

.hardware-item-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.hardware-item-value {
    font-size: 1em;
    color: #333;
    font-weight: 600;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.genre-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.avatar-option {
    font-size: 2em;
    padding: 10px;
    border: 3px solid transparent;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.avatar-option.selected {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.profile-input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: 'Arial', sans-serif;
}

.profile-input:focus {
    outline: none;
    border-color: #667eea;
}

.create-profile-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.create-profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.profile-switcher {
    text-align: center;
    margin: 30px 0;
}

.switch-profile-btn {
    background: white;
    color: #667eea;
    padding: 15px 30px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.switch-profile-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Keyboard Focus Indicators - Accessibility */
button:focus-visible,
a:focus-visible {
    outline: 3px solid #4CAF50;
    outline-offset: 3px;
    transition: outline-offset 0.2s ease;
}

.start-btn:focus-visible {
    outline: 3px solid #f5576c;
    outline-offset: 4px;
}

.level-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.complete-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.back-btn:focus-visible,
.next-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.helper-link:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.share-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.help-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

/* Remove default focus outline only when focus-visible is supported */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .levels-grid {
        grid-template-columns: 1fr;
    }

    .lesson-container {
        padding: 20px;
    }

    .keyboard-visual {
        overflow-x: auto;
    }

    .key.white {
        width: 30px;
        height: 100px;
    }

    .key.black {
        width: 22px;
        height: 65px;
        margin: 0 -12px;
    }

    .session-timer {
        top: 10px;
        right: 10px;
        font-size: 0.9em;
        padding: 10px 15px;
    }

    .help-button {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* Login Welcome Screen */
.login-welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    animation: fadeIn 0.5s ease;
}

.login-welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.login-link-btn {
    background: transparent;
    color: #667eea;
    padding: 12px 30px;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-link-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.login-optional-note {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.login-optional-note p {
    color: #666;
    font-style: italic;
}

/* Current User Display */
.current-user-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-greeting {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu Button */
.hamburger-menu-btn {
    background: white;
    color: #667eea;
    padding: 12px 18px;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.hamburger-menu-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Hamburger Menu */
.hamburger-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.hamburger-menu-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hamburger-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2.5em;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.3s;
}

.hamburger-close-btn:hover {
    color: #ff6f61;
    transform: rotate(90deg);
}

.hamburger-user-info {
    padding: 20px 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    margin-top: 40px;
}

.user-email {
    color: #667eea;
    font-weight: bold;
    font-size: 1em;
}

.hamburger-menu-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hamburger-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.hamburger-menu-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.hamburger-menu-item.logout-item:hover {
    background: linear-gradient(135deg, #ff6f61 0%, #ff5a4d 100%);
}

.menu-icon {
    font-size: 1.5em;
}

.menu-text {
    flex: 1;
}

/* Mobile responsive for new elements */
@media (max-width: 768px) {
    .login-welcome-section {
        min-height: 400px;
        padding: 20px;
    }

    .hamburger-menu {
        width: 100%;
    }

    .user-greeting {
        font-size: 1em;
    }
}
