/* ===== RESET & BASICS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1d1d1f;
    background-color: #f5f5f7;
    overflow: hidden;
    height: 100vh;
    touch-action: pan-y;
}

/* ===== APP CONTAINER ===== */
#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* ===== HEADER ===== */
.app-header {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.15);
}

.app-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.user-progress .progress-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ===== CONTENT AREA ===== */
.content-area {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    background: white;
}

.screen.hidden {
    transform: translateX(100%);
    opacity: 0;
}

.screen.active {
    transform: translateX(0);
    opacity: 1;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    display: flex;
    background: white;
    border-top: 1px solid #e5e5e7;
    padding: 12px 0;
    flex-shrink: 0;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #8e8e93;
    position: relative;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item span {
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: #007AFF;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 32px;
    height: 3px;
    background: #007AFF;
    border-radius: 0 0 3px 3px;
}

.nav-item:active {
    transform: scale(0.95);
}

/* ===== PRACTICE SCREEN ===== */
.practice-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.practice-title {
    text-align: center;
    margin-bottom: 30px;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-title i {
    color: #007AFF;
}

.gestures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.gesture-card {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.gesture-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-start), var(--color-end));
}

.gesture-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.gesture-card:active {
    transform: scale(0.98);
}

.gesture-card i {
    font-size: 40px;
    margin-bottom: 15px;
    color: white;
    background: linear-gradient(135deg, var(--color-start), var(--color-end));
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gesture-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #1d1d1f;
    font-weight: 700;
}

.gesture-card p {
    font-size: 14px;
    color: #8e8e93;
    line-height: 1.4;
}

.gesture-card .score-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.practice-instructions {
    background: linear-gradient(135deg, #f5f5f7 0%, #fff 100%);
    border-radius: 20px;
    padding: 25px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e5e7;
}

.practice-instructions h3 {
    color: #007AFF;
    margin-bottom: 12px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-instructions p {
    color: #666;
    line-height: 1.6;
}

/* ===== LEARN SCREEN ===== */
.learn-screen {
    padding: 0 5px;
}

.learn-title {
    text-align: center;
    margin-bottom: 25px;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.categories-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 5px;
    margin-bottom: 20px;
    scrollbar-width: none;
}

.categories-filter::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 10px 20px;
    background: #f5f5f7;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-chip.active {
    background: #007AFF;
    color: white;
}

.category-chip:active {
    transform: scale(0.95);
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    position: relative;
}

.topic-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.topic-card:active {
    transform: scale(0.99);
}

.topic-icon {
    font-size: 32px;
    margin-right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f7;
    border-radius: 14px;
}

.topic-content {
    flex: 1;
}

.topic-content h3 {
    font-size: 17px;
    margin-bottom: 6px;
    color: #1d1d1f;
    font-weight: 600;
}

.topic-content p {
    font-size: 14px;
    color: #8e8e93;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-arrow {
    color: #c7c7cc;
    font-size: 20px;
}

.topic-card.completed .topic-arrow {
    color: #34C759;
}

.topic-card.completed::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #34C759;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ===== PROGRESS SCREEN ===== */
.progress-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 5px;
}

.progress-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1d1d1f;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
}

.progress-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.progress-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.progress-card.achievement {
    border-left: 4px solid #FF9500;
}

.progress-card.streak {
    border-left: 4px solid #FF2D55;
}

.progress-card.points {
    border-left: 4px solid #FFD700;
}

.progress-card i {
    font-size: 24px;
    color: #007AFF;
}

.progress-card.achievement i {
    color: #FF9500;
}

.progress-card.streak i {
    color: #FF2D55;
}

.progress-card.points i {
    color: #FFD700;
}

.progress-card h3 {
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 4px;
    font-weight: 600;
}

.progress-card p {
    font-size: 20px;
    color: #1d1d1f;
    font-weight: 700;
}

/* ===== PROGRESS SCROLL CONTAINER ===== */
.progress-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px 5px;
    margin-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: #007AFF #f0f0f0;
}

.progress-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.progress-scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.progress-scroll-container::-webkit-scrollbar-thumb {
    background: #007AFF;
    border-radius: 10px;
}

.progress-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.progress-section h3 {
    color: #1d1d1f;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Gesten-Fortschritt Bars */
.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.progress-bar-item:hover {
    transform: translateX(5px);
    background: #f0f7ff;
}

.gesture-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.gesture-info {
    flex: 1;
}

.gesture-name {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.progress-bar-container {
    height: 10px;
    background: #e5e5e7;
    border-radius: 5px;
    overflow: hidden;
    margin: 5px 0;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.gesture-score {
    font-size: 16px;
    font-weight: 700;
    color: #007AFF;
    min-width: 60px;
    text-align: right;
}

/* Kategorien-Fortschritt */
.categories-progress {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.category-progress-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-progress-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.category-stats {
    font-size: 12px;
    color: #8e8e93;
    margin-bottom: 10px;
}

.category-progress-bar {
    height: 6px;
    background: #e5e5e7;
    border-radius: 3px;
    overflow: hidden;
}

.category-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Erfolge Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.achievement-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-item.locked {
    opacity: 0.6;
    filter: grayscale(0.5);
}

.achievement-item.unlocked {
    border: 2px solid #34C759;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0fff4 100%);
}

.achievement-icon {
    font-size: 30px;
    margin-bottom: 10px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-name {
    font-size: 12px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 10px;
    color: #8e8e93;
}

.achievement-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background: #34C759;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Motivation Message */
.motivation-message {
    text-align: center;
    font-size: 16px;
    color: #8e8e93;
    padding: 15px;
    background: linear-gradient(135deg, #f5f5f7 0%, #fff 100%);
    border-radius: 15px;
    margin-top: 10px;
    border: 1px dashed #c7c7cc;
    font-weight: 500;
    flex-shrink: 0;
}

/* ===== EXERCISE AREA ===== */
.exercise-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    display: none;
    flex-direction: column;
}

.exercise-area.active {
    display: flex;
}

.exercise-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
}

.exercise-header .back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.exercise-header .back-button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.exercise-header h2 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.exercise-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #f8f9fa;
}

.exercise-instruction {
    font-size: 20px;
    text-align: center;
    margin-bottom: 40px;
    color: #1d1d1f;
    line-height: 1.6;
    max-width: 90%;
    font-weight: 600;
}

/* ===== LESSON SCREEN ===== */
.lesson-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.lesson-screen.active {
    display: flex;
}

.lesson-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
}

.lesson-header .back-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-right: 15px;
    transition: all 0.2s ease;
}

.lesson-header .back-button:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.lesson-header h2 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.lesson-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

.lesson-step {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #007AFF;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #007AFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.step-text {
    font-size: 16px;
    color: #1d1d1f;
    line-height: 1.6;
    flex: 1;
}

.lesson-footer {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e5e7;
}

.lesson-complete {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #34C759 0%, #2AA44F 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.lesson-complete:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    transform: none;
}

.lesson-complete:active:not(:disabled) {
    transform: scale(0.98);
}

/* ===== SWIPE HINT ===== */
.swipe-hint-overlay {
    position: fixed;
    bottom: 120px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #8e8e93;
    font-size: 14px;
    z-index: 5;
    pointer-events: none;
    animation: swipeHintAnimation 3s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 20px;
    margin: 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes swipeHintAnimation {
    0%, 100% { 
        opacity: 0.6;
        transform: translateX(0);
    }
    25% { 
        opacity: 1;
        transform: translateX(-10px);
    }
    75% { 
        opacity: 1;
        transform: translateX(10px);
    }
}

/* ===== FEEDBACK MESSAGE ===== */
.feedback-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(28, 28, 30, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 600;
    z-index: 3000;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    text-align: center;
    max-width: 80%;
    animation: feedbackInOut 2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes feedbackInOut {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    15% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.feedback-message.active {
    display: block;
}

/* ===== TAP EXERCISE ===== */
.tap-target {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34C759 0%, #2AA44F 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(52, 199, 89, 0.3);
    transition: all 0.2s ease;
    border: 3px solid white;
}

.tap-target:active {
    transform: scale(0.85);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.5);
}

/* ===== PRESS EXERCISE ===== */
.press-target {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9500 0%, #FF8A00 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.3);
    transition: all 0.1s ease;
    user-select: none;
    border: 4px solid white;
}

.press-target.pressing {
    transform: scale(0.9);
    background: linear-gradient(135deg, #FF8A00 0%, #FF7F00 100%);
    box-shadow: 0 5px 20px rgba(255, 149, 0, 0.5);
}

.press-timer {
    font-size: 16px;
    margin-top: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ===== SWIPE EXERCISE ===== */
.swipe-container {
    width: 100%;
    max-width: 350px;
    height: 180px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 1px solid #e5e5e7;
}

.swipe-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.swipe-hint {
    margin-top: 25px;
    font-size: 16px;
    color: #8e8e93;
    text-align: center;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

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

/* ===== DRAG EXERCISE ===== */
.drag-container {
    width: 100%;
    max-width: 350px;
    height: 280px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e7;
}

.drag-item {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    background: linear-gradient(135deg, #AF52DE 0%, #9B45C9 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: absolute;
    cursor: grab;
    user-select: none;
    touch-action: none;
    box-shadow: 0 8px 25px rgba(175, 82, 222, 0.4);
    border: 3px solid white;
    z-index: 10;
    transition: transform 0.2s ease;
}

.drag-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.drag-item.dragging {
    box-shadow: 0 10px 30px rgba(175, 82, 222, 0.6);
    transform: scale(1.05);
    z-index: 1000;
}

.drag-target {
    width: 90px;
    height: 90px;
    border: 3px dashed #AF52DE;
    border-radius: 20px;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #AF52DE;
    background: rgba(175, 82, 222, 0.05);
    transition: all 0.3s ease;
}

.drag-target.active {
    border-color: #34C759;
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #8e8e93;
    font-size: 16px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f0;
    border-top-color: #007AFF;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    .app-header h1 {
        font-size: 20px;
    }
    
    .practice-title,
    .learn-title,
    .progress-title {
        font-size: 22px;
    }
    
    .gesture-card {
        padding: 20px 15px;
    }
    
    .gesture-card i {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .gesture-card h3 {
        font-size: 16px;
    }
    
    .progress-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .progress-card {
        padding: 12px 8px;
    }
    
    .progress-card h3 {
        font-size: 11px;
    }
    
    .progress-card p {
        font-size: 18px;
    }
    
    .categories-progress {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .progress-scroll-container {
        padding: 10px 5px;
    }
}

@media (max-height: 700px) {
    .gestures-grid {
        gap: 15px;
    }
    
    .practice-instructions {
        padding: 20px;
    }
    
    .progress-summary {
        margin-bottom: 15px;
    }
    
    .progress-scroll-container {
        margin-bottom: 10px;
    }
}