/* ===== TYPING JOURNEY - STYLE.CSS ===== */
/* Sky Adventure Theme - Minimal Glassmorphism */

:root {
    /* Colors - Vivid & Playful */
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --success: #22c55e;
    --error: #ef4444;

    /* Glass Colors */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    --text-dark: #1e293b;
    --text-light: #475569;
    --white: #ffffff;

    /* Sizing */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: url('assets/bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    font-smoothing: antialiased;
}

.app-container {
    width: 100%;
    max-width: 950px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 85vh;
    position: relative;
}

.hidden {
    display: none !important;
}

/* ===== HEADER ===== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.level-indicator {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.back-btn {
    background: var(--white);
    border: 1px solid var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

#current-level {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.stars {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.star {
    font-size: 1.2rem;
    opacity: 0.3;
    color: var(--text-light);
}

.star.earned {
    opacity: 1;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.4);
}

/* ===== MAIN STAGE ===== */
.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Centered by default for login */
    padding: 2rem;
    gap: 1.5rem;
    animation: fadeIn 0.4s ease-out;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Stage */
.login-card {
    background: rgba(255, 255, 255, 0.6);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--white);
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.logo.large {
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logo.large .logo-icon {
    font-size: 4rem;
}

.logo.large h1 {
    font-size: 2.5rem;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

#user-email {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    transition: all 0.2s;
}

#user-email:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

#user-email::placeholder {
    color: #94a3b8;
}

/* Map View */
.map-header {
    text-align: center;
    margin-bottom: 2rem;
}

.map-header h2 {
    font-size: 2.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.level-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
    width: 100%;
    padding: 1rem;
}

.map-bubble {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.map-bubble:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--white);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15);
    border-color: var(--primary-light);
}

.bubble-num {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.bubble-info {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Bubble Area - Standardized */
.bubble-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 200px;
}

.word-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.word-char {
    width: 70px;
    height: 70px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #94a3b8;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Drill Mode - Larger Single Bubble */
.bubble-area.drill-mode .word-char {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    font-size: 4.5rem;
    border-width: 5px;
    border-color: var(--primary-light);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.25);
    animation: floatDrill 3s ease-in-out infinite;
}

.word-char.active {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
    transform: scale(1.1) translateX(0) translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.bubble-area.drill-mode .word-char.active {
    transform: translateX(0) translateY(-5px) !important;
}

.word-char.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
    transform: scale(1) translateX(0);
    animation: pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.word-char.wrong {
    background: var(--error);
    border-color: var(--error);
    color: white;
    animation: shake 0.4s ease-in-out;
}

.word-char.space {
    width: 40px;
    border-style: dashed;
    background: rgba(255, 255, 255, 0.3);
}

.word-char.space.active {
    background: rgba(59, 130, 246, 0.1);
    border-style: solid;
}

@keyframes floatDrill {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(0) translateY(-18px);
    }
}

@keyframes pop {
    0% {
        transform: scale(1) translateX(0);
    }

    50% {
        transform: scale(1.15) translateX(0);
    }

    100% {
        transform: scale(1) translateX(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

/* Feedback Bar */
.feedback-bar {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ===== VISUAL KEYBOARD ===== */
.keyboard-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    /* Glassy Keyboard */
    border-radius: var(--radius-lg);
    border: 1px solid var(--white);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
    position: relative;
    /* For hands */
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.key {
    width: 54px;
    height: 54px;
    background: var(--white);
    border-bottom: 4px solid #e2e8f0;
    /* Tactile feel */
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.key:hover {
    transform: translateY(1px);
}

.key.target {
    background: var(--primary);
    color: var(--white);
    border-bottom-color: #2563eb;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

.key.pressed {
    transform: translateY(4px);
    border-bottom-width: 0px;
    background: #cbd5e1;
}

.key.space {
    width: 300px;
}

/* ===== PROGRESS FOOTER ===== */
.progress-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.progress-bar {
    flex: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #6366f1);
    border-radius: var(--radius-full);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#progress-text {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
    white-space: nowrap;
}

/* ===== CSS VECTOR HANDS (Refined) ===== */
.hands-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.hand {
    position: absolute;
    bottom: -10px;
    width: 320px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hand.left {
    left: 20px;
    transform: rotate(5deg);
}

.hand.right {
    right: 20px;
    transform: rotate(-5deg);
}

.finger {
    position: absolute;
    bottom: 60px;
    width: 44px;
    height: 100px;
    border: 3px solid #64748b;
    background: transparent;
    /* Clean */
    border-radius: 22px;
    transform-origin: bottom center;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Left Hand Fingers */
.finger.l-pinky {
    left: 15px;
    height: 85px;
    bottom: 20px;
    transform: rotate(-12deg);
}

.finger.l-ring {
    left: 70px;
    height: 110px;
    bottom: 25px;
    transform: rotate(-4deg);
}

.finger.l-middle {
    left: 125px;
    height: 125px;
    bottom: 25px;
    transform: rotate(2deg);
}

.finger.l-index {
    left: 180px;
    height: 110px;
    bottom: 20px;
    transform: rotate(8deg);
}

.finger.l-thumb {
    left: 240px;
    height: 60px;
    bottom: 10px;
    transform: rotate(35deg);
    border-radius: 30px 60px 60px 30px;
    border-color: #94a3b8;
}

/* Right Hand Fingers */
.finger.r-pinky {
    right: 15px;
    height: 85px;
    bottom: 20px;
    transform: rotate(12deg);
}

.finger.r-ring {
    right: 70px;
    height: 110px;
    bottom: 25px;
    transform: rotate(4deg);
}

.finger.r-middle {
    right: 125px;
    height: 125px;
    bottom: 25px;
    transform: rotate(-2deg);
}

.finger.r-index {
    right: 180px;
    height: 110px;
    bottom: 20px;
    transform: rotate(-8deg);
}

.finger.r-thumb {
    right: 240px;
    height: 60px;
    bottom: 10px;
    transform: rotate(-35deg);
    border-radius: 60px 30px 30px 60px;
    border-color: #94a3b8;
}

/* Palm */
.palm {
    position: absolute;
    bottom: -80px;
    width: 260px;
    height: 180px;
    border: 3px solid #94a3b8;
    border-top: none;
    background: transparent;
    border-radius: 50% 50% 20% 20%;
    z-index: -1;
    opacity: 0.5;
}

.hand.left .palm {
    left: 30px;
}

.hand.right .palm {
    right: 30px;
}

/* Active States */
.finger.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.15);
    border-width: 4px;
    z-index: 10;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.finger.press {
    background: var(--primary);
    border-color: var(--primary);
    transform: scaleY(0.9) translateY(10px) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.finger.correct {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 20px var(--success);
}

/* ===== ACHIEVEMENT BADGE ===== */
/* (Keeping largely the same but cleaner shadow) */
.badge-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    text-align: center;
    min-width: 320px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.badge-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: badgeBounce 0.6s ease-out;
}

@keyframes badgeBounce {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

.badge-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.badge-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== CELEBRATION OVERLAY ===== */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    /* Darker backdrop */
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
}

.celebration-overlay.show {
    display: flex;
}

.celebration-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.celebration-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: spin 0.8s ease-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg) scale(0);
    }

    to {
        transform: rotate(360deg) scale(1);
    }
}

.celebration-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--success);
    margin-bottom: 1rem;
}

.celebration-stats {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.cta-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-glow {
    background: linear-gradient(90deg, var(--primary), #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ===== RESPONSIVE ===== */

/* Tablet (Portrait & Landscape) */
@media (max-width: 1024px) {
    .app-container {
        max-width: 95%;
        min-height: auto;
    }

    .key {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .key.space {
        width: 220px;
    }

    /* Scale hands slightly for tablet */
    .hand {
        transform-origin: bottom center;
        width: 280px;
        height: 240px;
    }

    .hand.left {
        left: -10px;
        transform: rotate(5deg) scale(0.85);
    }

    .hand.right {
        right: -10px;
        transform: rotate(-5deg) scale(0.85);
    }

    .finger {
        width: 38px;
    }
}

/* Mobile (Phones) */
@media (max-width: 600px) {
    body {
        padding: 0.5rem;
        align-items: flex-start;
        /* Top align to avoid center cutoffs */
    }

    .app-container {
        min-height: 95vh;
        width: 100%;
        overflow: visible;
        /* Allow hands to stick out if needed */
    }

    /* Header Stacking */
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .level-indicator {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* Smaller Keyboard with larger targets */
    .keyboard-container {
        padding: 0.4rem;
        gap: 0.25rem;
        /* Tighter gap */
    }

    .key {
        width: 9vw;
        /* Relative width for phones */
        max-width: 38px;
        height: 48px;
        /* Taller target */
        font-size: 1rem;
        border-bottom-width: 3px;
        touch-action: manipulation;
        /* Disable double-tap zoom */
        user-select: none;
        /* Prevent text selection */
        -webkit-user-select: none;
    }

    .key.space {
        width: 40vw;
        max-width: 180px;
    }

    /* Mobile Hands - Significant Scale Down */
    .hand {
        width: 320px;
        /* Keep base width, scale via transform */
        height: 280px;
        pointer-events: none;
        /* Ensure clicks pass through */
        z-index: 20;
        /* Ensure on top */
    }

    .hand.left {
        left: -80px;
        /* Push far left to avoid spacebar overlap */
        bottom: -30px;
        transform: rotate(5deg) scale(0.3);
        /* Tiny scale */
    }

    .hand.right {
        right: -80px;
        /* Push far right */
        bottom: -30px;
        transform: rotate(-5deg) scale(0.3);
    }

    /* Login Screen Mobile */
    .login-card {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .logo.large .logo-icon {
        font-size: 3rem;
    }

    .logo.large h1 {
        font-size: 2rem;
    }

    .celebration-content {
        padding: 2rem;
        width: 90%;
    }

    .celebration-emoji {
        font-size: 4rem;
    }

    .celebration-title {
        font-size: 1.5rem;
    }
}

/* Landscape Mobile (Typing optimization) */
@media (max-width: 900px) and (orientation: landscape) {
    .app-container {
        min-height: 100vh;
        border-radius: 0;
    }

    .app-header {
        padding: 0.5rem 2rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .stage {
        padding: 0.5rem;
        justify-content: flex-end;
        /* Push keyboard to bottom */
    }

    .bubble-area {
        flex: 0 0 auto;
        margin-bottom: 0.5rem;
    }

    .letter-bubble {
        width: 80px;
        height: 80px;
        font-size: 3rem;
        animation: none;
        /* Stop floating to save space */
    }

    .keyboard-container {
        padding: 0.5rem;
    }
}

/* ===== TUTORIAL STAGE (PREMIUM) ===== */
#tutorial-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 100;
}

.tutorial-card.premium {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 3rem;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    text-align: center;
    overflow: hidden;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tutorial-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: inline-block;
}

.tutorial-header h3 {
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.tutorial-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

/* realistic-diagram */
.realistic-diagram {
    background: #f8fafc;
    border-radius: 30px;
    padding: 3rem 1rem;
    margin-bottom: 2.5rem;
    position: relative;
    border: 2px solid #f1f5f9;
}

.home-row-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.key-cap {
    width: 50px;
    height: 54px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 0 #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #1e293b;
    border: 1px solid #f1f5f9;
    position: relative;
}

.key-cap.spacer {
    background: #f1f5f9;
    color: #cbd5e1;
    box-shadow: none;
    border: none;
}

.key-cap.bump::after {
    content: '';
    position: absolute;
    bottom: 8px;
    width: 20px;
    height: 4px;
    background: #3b82f6;
    border-radius: 2px;
}

.bump-note {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    animation: float 2s infinite ease-in-out;
    z-index: 10;
}

.bump-note .heart {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.4));
}

.bump-note::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ef4444;
}

/* static hands for tutorial */
.diagram-hands {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 20px;
    position: relative;
    height: 180px;
}

.hand.static {
    position: relative;
    bottom: 0;
    width: 260px;
    height: 180px;
    transform: scale(0.65);
    transform-origin: bottom center;
}

.hand.static .palm {
    position: absolute;
    bottom: -20px;
    width: 200px;
    height: 120px;
    background: rgba(148, 163, 184, 0.1);
    border: 3px solid #cbd5e1;
    border-radius: 60px 60px 40px 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hand.static .finger {
    bottom: 60px;
    z-index: 2;
    background: transparent;
    border: 3px solid #cbd5e1;
}

.hand.static .finger.active {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.f-num {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #94a3b8;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.hand.static .finger.active .f-num {
    background: #3b82f6;
}

.hand.static .l-thumb {
    left: 240px;
    height: 60px;
    bottom: 10px;
    transform: rotate(35deg);
    border-radius: 30px 60px 60px 30px;
}

.hand.static .r-thumb {
    right: 240px;
    height: 60px;
    bottom: 10px;
    transform: rotate(-35deg);
    border-radius: 60px 30px 30px 60px;
}

/* Left Hand Fingers labels */
.diagram-hand.left [data-f="l-pinky"] {
    top: 20px;
    left: 0;
}

.diagram-hand.left [data-f="l-ring"] {
    top: 5px;
    left: 25px;
}

.diagram-hand.left [data-f="l-middle"] {
    top: 0;
    left: 55px;
}

.diagram-hand.left [data-f="l-index"] {
    top: 5px;
    left: 90px;
}

/* Right Hand Fingers labels */
.diagram-hand.right [data-f="r-index"] {
    top: 5px;
    right: 90px;
}

.diagram-hand.right [data-f="r-middle"] {
    top: 0;
    right: 55px;
}

.diagram-hand.right [data-f="r-ring"] {
    top: 5px;
    right: 25px;
}

.diagram-hand.right [data-f="r-pinky"] {
    top: 20px;
    right: 0;
}

.tutorial-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
    background: #fff;
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.4;
}

.info-text strong {
    display: block;
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.large-cta {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.2rem;
    border-radius: 20px;
}

@keyframes popIn {
    0% {
        transform: scale(0.9) translateY(40px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -10px);
    }
}

@keyframes handLand {
    0% {
        transform: translateY(50px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 650px) {
    .tutorial-card.premium {
        padding: 1.5rem;
    }

    .tutorial-header h3 {
        font-size: 1.8rem;
    }

    .home-row-display {
        gap: 4px;
        overflow-x: auto;
        padding-top: 50px;
    }

    .key-cap {
        width: 34px;
        height: 38px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .diagram-hands {
        gap: 60px;
        scale: 0.7;
    }

    .tutorial-info-grid {
        grid-template-columns: 1fr;
    }

    .bump-note {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        top: -35px;
    }
}