body, html { 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background: #000; 
    font-family: 'Lato', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

#viewport-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 2000 / 1130; 
    background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/home.webp');
    background-size: cover;
    background-position: center;
    border: 2px solid #444; 
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

iframe { 
    width: 100%; 
    height: 100%; 
    border: none;
    background: transparent;
}

/* Container für die linke Menüleiste */
#menu-bar {
    position: absolute;
    inset: 0; 
    display: flex;
    flex-direction: column; 
    gap: 8px;              
    z-index: 2000;
    pointer-events: none;
    align-items: flex-start; 
    justify-content: center; 
    padding-left: 20%;      
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.menu-button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.8);
    color: #C0C0C0; 
    border: 1px solid #C0C0C0; 
    padding: 12px 0;
    width: 210px;           
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    text-align: center;
    display: block;
    margin: 0;              
}

.menu-button:hover {
    background: #000; 
    color: #EBDF70; 
    border-color: #EBDF70; 
    transform: scale(1.05); 
}

/* Positionierung des Start-Buttons */
#start-button-graphic {
    pointer-events: auto;
    position: absolute; 
    left: 72%;          
    top: 49.1%;         
    transform: translate(-50%, -50%); 
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, filter 0.2s;
    display: block;
    margin: 0;
}

#start-button-graphic:hover {
    transform: translate(-50%, -50%) scale(1.1);
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(235, 223, 112, 0.6));
}

#start-button-graphic img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

/* Spielbeschreibung Text oben rechts */
#intro-text-container {
    position: absolute;
    right: 9%;        
    top: 6%;          
    width: 360px;      
    color: #fff;
    z-index: 1500;
    pointer-events: none;
    text-align: justify; 
}

#intro-text-container h2 {
    color: #EBDF70;    
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: normal;
    font-family: 'Lato', sans-serif;
    text-align: center; 
}

#intro-text-container p {
    font-size: 15px;
    line-height: 1.3;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    hyphens: auto;
    -webkit-hyphens: auto;
}

/* Preloader & Overlays */
#main-preloader {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-out;
}

#leaderboard-overlay, #stats-overlay, #privacy-overlay, #missions-overlay, #shop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    pointer-events: auto;
}

.leaderboard-content, .privacy-content, .stats-content, .missions-content, .shop-content { 
    background-size: contain; 
    background-repeat: no-repeat; 
    background-position: center; 
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leaderboard-content { width: 55%; height: 90%; background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/scroll_board.webp'); }
.privacy-content { width: 55%; height: 90%; background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/scroll_data.webp'); }
.stats-content { width: 80.5%; height: 95%; background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/scroll_statistics.webp'); }
.missions-content { width: 64%; height: 90%; background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/scroll_missions.webp'); }
.shop-content { width: 64%; height: 90%; background-image: url('https://unkrautland.com/assets/games/tortenjagd/assets/webp/scroll_shop.webp'); }

.close-btn {
    position: absolute;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 5100;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: background 0.2s, transform 0.2s;
}

.missions-content .close-btn, .shop-content .close-btn {
    top: calc(5% - 20px); 
    right: calc(18% - 115px); 
}

.leaderboard-content .close-btn, .privacy-content .close-btn {
    top: calc(5% - 25px); 
    right: calc(18% - 75px); 
}

.stats-content .close-btn {
    top: calc(10% + 40px); 
    right: calc(22% - 210px); 
}

.close-btn:hover { 
    background: rgba(139, 0, 0, 0.9); 
    transform: scale(1.1);
}

#score-list-container, #privacy-text-container, #stats-list-container { 
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    color: #3d2b1f;
}

#score-list-container { 
    width: 52.6%;
    margin-top: 168px; 
    display: flex; 
    flex-direction: column; 
    gap: 2px;
}

#stats-list-container { 
    width: 56.8%; 
    margin-top: 225px;
    display: flex;
    flex-direction: column; 
    gap: 2px;
}

#privacy-text-container {
    width: 52.4%; 
    margin-top: 172px; 
    height: 260px;
    overflow-y: auto;
    line-height: 1.05;
    padding-right: 5px; 
    text-align: justify; 
    hyphens: auto; 
    -webkit-hyphens: auto;
}

#mission-list-container, #shop-list-container {
    width: 50%; 
    margin-top: 143px;
    height: 300px; 
    overflow-y: auto;
    font-family: 'Crimson Text', serif;
    color: #3d2b1f;
    font-size: 18px;
}

#privacy-text-container::-webkit-scrollbar, #mission-list-container::-webkit-scrollbar, #shop-list-container::-webkit-scrollbar { width: 4px; }
#privacy-text-container::-webkit-scrollbar-thumb, #mission-list-container::-webkit-scrollbar-thumb, #shop-list-container::-webkit-scrollbar-thumb { background: #3d2b1f; opacity: 0.3; }

.score-row, .stats-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline;
    font-size: 18px; 
    color: #3d2b1f; 
    font-weight: normal;
    line-height: 1.3;
}

.stats-row::after {
    content: "";
    flex: 1;
    margin: 0 5px;
    border-bottom: 1px dotted #3d2b1f;
    order: 2;
}
.stats-row span:last-child {
    order: 3;
}

.reset-stats-container {
    width: 46.8%;
    display: flex;
    justify-content: center;
}

.reset-stats-btn {
    margin-top: 5px; 
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    color: #3d2b1f;
    text-decoration: underline;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s;
}
.reset-stats-btn:hover { opacity: 0.7; }

.mission-row, .shop-row { 
    display: flex; 
    align-items: center; 
    gap: 15px;
    margin-bottom: 15px; 
    padding-bottom: 5px;
    width: 100%;
}

.mission-icon-btn, .shop-icon-btn {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    border: 1px solid #3d2b1f;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.mission-icon-btn img, .shop-icon-btn img { width: 100%; height: 100%; object-fit: cover; }
.mission-info, .shop-info { display: flex; flex-direction: column; color: #3d2b1f; }

.mission-title, .shop-title { font-weight: bold; font-size: 18px; color: #3d2b1f; margin-bottom: 2px; }
.mission-text, .shop-text { font-size: 18px; color: #3d2b1f; line-height: 1.15; } 

.shop-balance-header {
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    color: #3d2b1f;
    font-weight: normal;
    margin-top: 0;
    margin-bottom: 20px; 
    text-align: center;
    width: 100%;
    line-height: 1.3;
}