* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden; /* Verhindert Scrollen */
    touch-action: none; /* Verhindert Touch-Gesten */
    -webkit-overflow-scrolling: touch;
}

/* Language Selection Overlay */
.language-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.language-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.language-content h2 {
    color: #0066cc;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 102, 204, 0.2);
}

.language-content h3 {
    color: #495057;
    font-size: 1.2rem;
    margin-bottom: 35px;
    font-weight: normal;
}

.language-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
    margin: 0;
}

.language-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 102, 204, 0.5);
}

.language-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.language-btn .flag {
    font-size: 2.5rem;
}

.language-btn .lang-name {
    font-size: 1.5rem;
}

/* Difficulty & Skill Selection */
.difficulty-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    animation: fadeIn 0.5s ease-in;
}

.difficulty-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 700px;
    width: 90%;
}

.difficulty-content h2 {
    color: #ff6b6b;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.selection-section {
    margin-bottom: 35px;
}

.selection-section h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.difficulty-buttons, .skill-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn, .skill-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    min-width: 150px;
}

.difficulty-btn:hover, .skill-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.difficulty-btn.selected, .skill-btn.selected {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    box-shadow: 0 8px 30px rgba(0, 200, 83, 0.5);
    transform: scale(1.1);
}

.difficulty-btn.easy {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.difficulty-btn.medium {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
}

.difficulty-btn.hard {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
}

.selection-info {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe082 100%);
    border-radius: 15px;
    border: 2px solid #ffc107;
}

.selection-info p {
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}


.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
}

.header {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.age-rating {
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.music-toggle {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
}

.music-toggle:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.speed-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    min-width: 80px;
    transition: all 0.3s ease-out;
}

.speed-display.speed-changed {
    transform: scale(1.5);
    background: rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.speed-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Courier New', monospace;
}

.speed-unit {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    letter-spacing: 1px;
}

.stats {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.stat-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

.power-up-display {
    min-width: 50px;
    font-size: 1.5rem;
}

#gameCanvas {
    display: block;
    width: 100%;
    background: linear-gradient(180deg, #87ceeb 0%, #e0f6ff 100%);
    image-rendering: crisp-edges;
    touch-action: none; /* Verhindert Touch-Gesten auf Canvas */
    -webkit-touch-callout: none; /* Verhindert iOS Callout */
    -webkit-user-select: none; /* Verhindert Text-Selektion */
    user-select: none;
}

.controls {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 2px solid #e9ecef;
}

.control-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.key-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
}

kbd {
    background: linear-gradient(180deg, #ffffff 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #212529;
}

.game-over, .level-complete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
    min-width: 300px;
}

.game-over h2 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 2rem;
}

.level-complete h2 {
    color: #28a745;
    margin-bottom: 20px;
    font-size: 2rem;
}

.game-over p, .level-complete p {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #495057;
}

.rings-left {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: bold;
    color: #333;
    margin: 20px 0 !important;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.rings-left span {
    color: #333;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.shop-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    font-size: 1.1rem !important;
    padding: 14px 35px !important;
}

.shop-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
}

button {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.tutorial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.tutorial-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tutorial-content h3 {
    color: #0066cc;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.tutorial-content p {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.tutorial-content ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 20px 0;
}

.tutorial-content li {
    padding: 10px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1rem;
    color: #495057;
}

/* Pause Menu */
.pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.pause-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pause-content h2 {
    color: #0066cc;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 102, 204, 0.2);
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pause-buttons button {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.2rem;
    border-radius: 15px;
    margin: 0;
}

.pause-buttons .quit-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.pause-buttons .quit-btn:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Speed Settings Menu */
.speed-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3500;
    backdrop-filter: blur(10px);
}

.speed-menu-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 600px;
    width: 90%;
    animation: popIn 0.3s ease-out;
}

.speed-menu-content h2 {
    color: #0066cc;
    font-size: 2rem;
    margin-bottom: 15px;
}

.speed-menu-content p {
    color: #495057;
    font-size: 1.2rem;
    margin-bottom: 25px;
}

#currentSpeedSetting {
    color: #ff4444;
    font-weight: bold;
    font-size: 1.4rem;
}

.custom-speed-input {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.custom-speed-input label {
    display: block;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1.2rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: #495057;
}

.input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.apply-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin: 0;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.or-divider {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 15px 0;
    font-weight: normal;
}

.speed-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.speed-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
    color: white;
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    margin: 0;
}

.speed-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.speed-btn:active {
    transform: translateY(-1px);
}

.back-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    margin: 0;
    width: 100%;
}

.back-btn:hover {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.5);
}

/* Quick Menu (Q-Taste) */
.quick-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(10px);
}

.quick-menu-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: popIn 0.3s ease-out;
}

.quick-menu-content h2 {
    color: #0066cc;
    font-size: 3rem;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.quick-menu-content p {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 25px;
}

.quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-buttons button {
    width: 100%;
    padding: 16px 25px;
    font-size: 1.2rem;
    border-radius: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quick-buttons .quit-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.quick-buttons .quit-btn:hover {
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Shop System */
.shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    padding: 20px;
}

.shop-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: shopSlideIn 0.4s ease-out;
}

@keyframes shopSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-header {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.shop-header h2 {
    color: white;
    margin: 0;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shop-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-balance {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 20px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.shop-stats {
    background: rgba(100, 200, 255, 0.2);
    padding: 8px 20px;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(100, 200, 255, 0.4);
    text-align: right;
}

.ring-count {
    color: #ffd700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rings-collected {
    color: #64c8ff;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
}

.close-shop-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-shop-btn:hover {
    background: rgba(255, 0, 0, 0.6);
    transform: rotate(90deg);
}

.shop-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

.shop-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 18px 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-weight: 600;
}

.shop-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.shop-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-bottom-color: #ffd700;
}

.shop-content {
    display: none;
    padding: 30px;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

.shop-content.active {
    display: block;
}

.shop-content h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.shop-item.owned {
    opacity: 0.6;
    border-color: #00ff00;
}

.shop-item.owned::after {
    content: "✓ GEKAUFT";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00ff00;
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.item-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    text-align: center;
    position: relative;
}

.character-display,
.part-display {
    font-size: 4rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.item-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
}

.item-info h4 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.item-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 15px 0;
    font-size: 0.95rem;
}

.item-price {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: bold;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.5);
}

.buy-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Body Parts Filtering */
.bodypart-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.category-btn.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.bodypart-item {
    display: block;
}

.bodypart-item.hidden {
    display: none;
}

/* Character Creator */
.creator-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.creator-preview {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
}

.creator-preview h4 {
    color: white;
    margin-top: 0;
    font-size: 1.5rem;
}

.preview-canvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 40px 20px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-character {
    text-align: center;
    position: relative;
}

.preview-character > div {
    font-size: 3rem;
    margin: 5px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.creator-options {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.creator-section {
    margin-bottom: 25px;
}

.creator-section h4 {
    color: white;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.part-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.part-option {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.part-option:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.part-option.selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.part-option.locked {
    opacity: 0.3;
    cursor: not-allowed;
}

.part-option.locked::after {
    content: "🔒";
    position: absolute;
    font-size: 1rem;
}

.creator-section input[type="text"] {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
}

.creator-section input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.color-btn.selected {
    border-width: 4px;
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.create-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    margin-top: 20px;
}

.create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.create-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Quit Screen */
.quit-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    animation: fadeIn 0.5s ease-in;
}

.quit-content {
    background: white;
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.quit-content h2 {
    color: #0066cc;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 102, 204, 0.2);
}

.quit-content p {
    color: #495057;
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.quit-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quit-buttons button {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.2rem;
    border-radius: 15px;
    margin: 0;
}

/* Power Wheel */
.power-wheel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    animation: fadeIn 0.5s ease-in;
}

.power-wheel-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 700px;
    width: 90%;
    border: 3px solid #ffd700;
}

.power-wheel-content h3 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.power-wheel-content p {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.power-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.power-option {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 20px;
    width: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    backdrop-filter: blur(10px);
}

.power-option:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    border-color: #ffd700;
}

.power-option.selected {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.power-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.power-name {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.power-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.3;
}

.select-power-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000000;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    margin: 0;
}

.select-power-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 6px 12px;
    }
    
    .control-info {
        gap: 15px;
    }
    
    .speed-display {
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .speed-value {
        font-size: 1.5rem;
    }
    
    .speed-unit {
        font-size: 0.65rem;
    }
    
    .language-content {
        padding: 30px 20px;
    }
    
    .language-content h2 {
        font-size: 2rem;
    }
    
    .language-content h3 {
        font-size: 1rem;
    }
    
    .language-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .language-btn .flag {
        font-size: 2rem;
    }
    
    .language-btn .lang-name {
        font-size: 1.2rem;
    }
    
    .pause-content {
        padding: 30px 20px;
    }
    
    .pause-content h2 {
        font-size: 2rem;
    }
    
    .pause-buttons button {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .quit-content {
        padding: 40px 20px;
    }
    
    .quit-content h2 {
        font-size: 2rem;
    }
    
    .quit-content p {
        font-size: 1.1rem;
    }
    
    .quit-buttons button {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .power-wheel-content {
        padding: 25px 15px;
    }
    
    .power-wheel-content h3 {
        font-size: 1.5rem;
    }
    
    .power-options {
        flex-direction: column;
        align-items: center;
    }
    
    .power-option {
        width: 100%;
        max-width: 250px;
    }
    
    .speed-menu-content {
        padding: 25px 15px;
    }
    
    .speed-menu-content h2 {
        font-size: 1.5rem;
    }
    
    .speed-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .speed-btn {
        padding: 12px 8px;
        font-size: 1rem;
    }
}

/* ====== RESPONSIVE DESIGN FÜR ALLE GERÄTE ====== */

/* Nintendo Switch & Tablets (1024px - 1280px) */
@media screen and (max-width: 1280px) and (min-width: 768px) {
    .game-container {
        max-width: 95%;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats {
        gap: 15px;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
}

/* Tablets & große Handys (768px - 1024px) */
@media screen and (max-width: 1024px) and (min-width: 481px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .header {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stats {
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .controls {
        display: none; /* Verstecke auf Tablets */
    }
    
    .language-content,
    .difficulty-content {
        padding: 30px 20px;
    }
    
    .language-btn,
    .difficulty-btn,
    .skill-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
}

/* Handys & kleine Tablets (481px - 768px) */
@media screen and (max-width: 768px) and (min-width: 320px) {
    body {
        padding: 5px;
    }
    
    .game-container {
        max-width: 100%;
        border-radius: 10px;
    }
    
    .header {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .age-rating {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .stats {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.75rem;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .speed-display {
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .speed-value {
        font-size: 1.2rem;
    }
    
    .speed-unit {
        font-size: 0.6rem;
    }
    
    .controls {
        display: none;
    }
    
    .language-content,
    .difficulty-content {
        padding: 20px 15px;
        max-width: 95%;
    }
    
    .language-content h2,
    .difficulty-content h2 {
        font-size: 1.8rem;
    }
    
    .language-content h3,
    .difficulty-content h3 {
        font-size: 1rem;
    }
    
    .language-buttons,
    .difficulty-buttons,
    .skill-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-btn,
    .difficulty-btn,
    .skill-btn {
        width: 100%;
        padding: 18px;
        font-size: 1.1rem;
    }
    
    .shop-container {
        max-width: 98%;
        max-height: 95vh;
    }
    
    .shop-header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .shop-header h2 {
        font-size: 1.5rem;
    }
    
    .shop-tabs {
        flex-wrap: wrap;
    }
    
    .shop-tab {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .creator-container {
        grid-template-columns: 1fr;
    }
}

/* Sehr kleine Handys (< 480px) */
@media screen and (max-width: 480px) {
    .header h1 {
        font-size: 1rem;
    }
    
    .stats {
        font-size: 0.7rem;
    }
    
    .language-content h2,
    .difficulty-content h2 {
        font-size: 1.5rem;
    }
    
    .language-btn,
    .difficulty-btn,
    .skill-btn {
        padding: 15px;
        font-size: 1rem;
    }
    
    .shop-content {
        padding: 15px;
    }
    
    .shop-content h3 {
        font-size: 1.3rem;
    }
}

/* Touch-Steuerungen für mobile Geräte */
@media (hover: none) and (pointer: coarse) {
    /* Touch-Gerät erkannt */
    .touch-controls {
        display: flex;
    }
}

/* Touch Controls Overlay */
.touch-controls {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: none; /* Wird per JavaScript aktiviert */
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2000;
    pointer-events: none;
}

.touch-controls.active {
    display: flex;
}

.touch-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 102, 204, 0.8);
    border: 3px solid white;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.touch-button:active {
    transform: scale(0.9);
    background: rgba(0, 102, 204, 1);
}

.touch-button.left {
    background: rgba(0, 102, 204, 0.8);
}

.touch-button.right {
    background: rgba(0, 102, 204, 0.8);
}

.touch-button.jump {
    background: rgba(0, 200, 83, 0.8);
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.touch-button.ability {
    background: rgba(255, 107, 107, 0.8);
}

.touch-button-group {
    display: flex;
    gap: 15px;
}

/* Landscape Mode für Tablets */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .header {
        padding: 8px 15px;
    }
    
    .header h1 {
        font-size: 1rem;
    }
    
    .stats {
        font-size: 0.7rem;
        gap: 8px;
    }
    
    .touch-controls {
        bottom: 10px;
    }
    
    .touch-button {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .touch-button.jump {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}

/* High DPI Displays (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #gameCanvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Nintendo Switch spezifisch (720p) */
@media screen and (width: 1280px) and (height: 720px) {
    .game-container {
        max-width: 1200px;
    }
    
    #gameCanvas {
        width: 1280px;
        height: 720px;
    }
}

/* Nintendo Switch 2 spezifisch (1080p) */
@media screen and (width: 1920px) and (height: 1080px) {
    .game-container {
        max-width: 1800px;
    }
    
    #gameCanvas {
        width: 1920px;
        height: 1080px;
    }
}

