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

body {
    font-family: 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #98D8C8 50%, #90EE90 100%);
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Screen management */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.screen.hidden {
    display: none;
}

/* Start Screen */
.start-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 60px 80px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.start-content h1 {
    font-size: 48px;
    color: #8B4513;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.play-btn {
    font-size: 32px;
    padding: 20px 60px;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    color: #8B4513;
    border: 4px solid #8B4513;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Comic Sans MS', cursive;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

/* Language Selector */
.language-selector {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.language-selector label {
    font-size: 18px;
    color: #8B4513;
    font-weight: bold;
}

.language-select {
    font-size: 18px;
    padding: 10px 20px;
    background: white;
    color: #8B4513;
    border: 3px solid #8B4513;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    font-weight: bold;
    min-width: 200px;
}

.language-select:hover {
    background: #FFF8DC;
    border-color: #FF1493;
}

.language-select:focus {
    outline: none;
    border-color: #FF1493;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.3);
}

/* Character Selection Screen */
.character-selection-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.character-selection-content h2 {
    font-size: 36px;
    color: #8B4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.character-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.character-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.character-select-btn {
    background: linear-gradient(145deg, #FFD700, #FFA500);
    border: 4px solid #8B4513;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
}

.character-select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #FF1493;
}

.character-select-btn:active {
    transform: scale(0.95);
}

.character-select-btn img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.character-name {
    font-size: 20px;
    color: #8B4513;
    font-weight: bold;
    margin-top: 5px;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Counters Container */
.counters-container {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

/* Elfjes Counter */
.elfjes-counter, .muntjes-counter {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 15px;
    border: 4px solid #8B4513;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Comic Sans MS', cursive;
}

.elfjes-label, .muntjes-label {
    font-size: 24px;
    color: #8B4513;
    font-weight: bold;
}

.elfjes-count {
    font-size: 28px;
    color: #FF1493;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.muntjes-count {
    font-size: 28px;
    color: #FFD700;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

#gameCanvas {
    border: none;
    border-radius: 0;
    background: #ffffff; /* White background - canvas will draw over this */
    display: block;
    width: 100vw;
    height: 100vh;
    touch-action: none;
}

#gameScreen {
    z-index: 1;
}

/* Pause Menu */
.pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.pause-menu.hidden {
    display: none;
}

.pause-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.pause-content h2 {
    font-size: 36px;
    color: #8B4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.pause-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.pause-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #8B4513;
    cursor: pointer;
    font-size: 40px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    gap: 5px;
}

.pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.pause-btn:active {
    transform: scale(0.9);
}

.yes-btn {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
}

.yes-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
}

.no-btn {
    background: linear-gradient(145deg, #f44336, #da190b);
    color: white;
}

.no-btn:hover {
    background: linear-gradient(145deg, #da190b, #c62828);
}

.checkmark, .cross {
    font-size: 50px;
    line-height: 1;
}

.pause-btn-label {
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 2px;
}

/* Weermaker Menu */
.weermaker-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.weermaker-menu.hidden {
    display: none;
}

.weermaker-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 700px;
    width: 90%;
}

.weermaker-content h2 {
    font-size: 36px;
    color: #8B4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.weermaker-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.weermaker-item {
    background: linear-gradient(145deg, #FFB6C1, #FF69B4);
    padding: 20px;
    border-radius: 15px;
    border: 4px solid #FF1493;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    cursor: pointer;
}

.weermaker-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

.weermaker-item-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.weermaker-item-name {
    font-size: 18px;
    color: #8B4513;
    font-weight: bold;
    margin-bottom: 10px;
}

.weermaker-item-price {
    font-size: 16px;
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 10px;
}

.weermaker-item-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #8B4513;
    border-radius: 10px;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Comic Sans MS', cursive;
    width: 100%;
}

.weermaker-item-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
}

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

.weermaker-item-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.weermaker-close-btn {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border: 4px solid #8B4513;
    border-radius: 15px;
    background: linear-gradient(145deg, #f44336, #da190b);
    color: white;
    cursor: pointer;
    font-family: 'Comic Sans MS', cursive;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.weermaker-close-btn:hover {
    background: linear-gradient(145deg, #da190b, #c62828);
    transform: scale(1.05);
}

.weermaker-close-btn:active {
    transform: scale(0.95);
}

/* Inventory Bag Button */
.inventory-bag {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 15;
}

.inventory-bag-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #8B4513;
    cursor: pointer;
    font-size: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.inventory-bag-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.inventory-bag-btn:active {
    transform: scale(0.9);
}

.inventory-bag-btn.prinses {
    background: linear-gradient(145deg, #FFB6C1, #FF69B4);
}

.inventory-bag-btn.prins {
    background: linear-gradient(145deg, #87CEEB, #4682B4);
}

.inventory-bag-btn.polly {
    background: linear-gradient(145deg, #98FB98, #32CD32);
}

.inventory-bag-btn.opa {
    background: linear-gradient(145deg, #D2B48C, #8B7355);
}

.bag-icon {
    font-size: 40px;
    line-height: 1;
}

/* Inventory Screen */
.inventory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
}

.inventory-screen.hidden {
    display: none;
}

.inventory-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    max-width: 600px;
    width: 90%;
}

.close-inventory-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #8B4513;
    background: linear-gradient(145deg, #f44336, #da190b);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-inventory-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.close-inventory-btn:active {
    transform: scale(0.9);
}

.inventory-content h2 {
    font-size: 36px;
    color: #8B4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.inventory-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    min-height: 200px;
}

.inventory-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 25px;
    border-radius: 10px;
    border: 2px solid #8B4513;
    font-size: 20px;
    color: #8B4513;
    font-weight: bold;
    width: 80%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inventory-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.inventory-item.holding {
    background: rgba(255, 182, 193, 0.9);
    border-color: #FF1493;
    border-width: 3px;
}

.inventory-item-icon {
    font-size: 30px;
}

.inventory-item-name {
    flex: 1;
    text-align: left;
}

.holding-badge {
    background: #FF1493;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
}

.inventory-empty {
    font-size: 24px;
    color: #999;
    font-style: italic;
    padding: 40px;
}

.inventory-item.active-pet {
    background: rgba(144, 238, 144, 0.3);
    border-color: #90EE90;
}

.pet-toggle-btn {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-left: 10px;
    transition: all 0.2s;
}

.pet-toggle-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: scale(1.05);
}

.pet-toggle-btn:active {
    transform: scale(0.95);
}

/* Shop Screen */
.shop-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
}

.shop-screen.hidden {
    display: none;
}

.shop-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-shop-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #8B4513;
    background: linear-gradient(145deg, #f44336, #da190b);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-shop-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.close-shop-btn:active {
    transform: scale(0.9);
}

.shop-content h2 {
    font-size: 36px;
    color: #8B4513;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.shop-keeper {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 240, 220, 0.8);
    border-radius: 15px;
    border: 2px solid #8B4513;
}

.shop-keeper-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

.shop-keeper p {
    font-size: 20px;
    color: #8B4513;
    font-weight: bold;
    margin: 0;
}

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

.shop-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    border: 3px solid #8B4513;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.shop-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.shop-item-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.shop-item-name {
    font-size: 20px;
    color: #8B4513;
    font-weight: bold;
    margin-bottom: 10px;
}

.shop-item-price {
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 15px;
}

.shop-item-btn {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #8B4513;
    border-radius: 10px;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Comic Sans MS', cursive;
}

.shop-item-btn:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: scale(1.05);
}

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

.shop-item-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mobile-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #8B4513;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    color: #8B4513;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-btn.jump {
    background: linear-gradient(145deg, #FF6B6B, #FF8E8E);
}

/* Hide mobile controls on desktop */
@media (min-width: 768px) {
    .mobile-controls {
        display: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #gameCanvas {
        border-width: 3px;
    }
    
    .control-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .mobile-controls {
        gap: 15px;
    }
}

