html,body{
 margin:0;
 height:100%;
 overflow:hidden;
 font-family:Verdana,sans-serif;
}

body{
 background:#111;
}

:root{
 --room-width:1536px;
 --room-height:1024px;
 --room-scale:1;
 --paper:#f2d9a8;
 --paper2:#fff6e3;
 --ink:#21170d;
 --line:#8e6b3a;
 --green:#273d28;
 --danger:#8b2f2a;
 --touch:48px;
}

button,input,select{
 font:inherit;
 min-height:var(--touch);
 border-radius:8px;
 box-sizing:border-box;
}

button{
 border:0;
 padding:10px 14px;
 background:var(--green);
 color:white;
 cursor:pointer;
 box-shadow:0 2px 0 rgba(0,0,0,.35);
}

button:active{
 transform:translateY(1px);
}

input,select{
 border:2px solid var(--line);
 background:var(--paper2);
 color:var(--ink);
 padding:10px 12px;
}

#scene{
 position:fixed;
 left:50%;
 top:50%;
 width:var(--room-width);
 height:var(--room-height);
 transform:translate(-50%,-50%) scale(var(--room-scale));
 transform-origin:center;
 background:url('backlog_room.webp') center center / 100% 100% no-repeat;
 image-rendering:pixelated;
}

#ui{
 position:fixed;
 left:50%;
 top:50%;
 width:var(--room-width);
 height:var(--room-height);
 transform:translate(-50%,-50%) scale(var(--room-scale));
 transform-origin:center;
}

/* Eingabefeld */
#newGame{
 position:absolute;
 left:35%;
 top:35%;
 width:26%;
}

#searchGame{
 position:absolute;
 left:35%;
 top:30%;
 width:17%;
}

#filterGame{
 position:absolute;
 left:53.5%;
 top:30%;
 width:12%;
}

#sortGame{
 position:absolute;
 left:67%;
 top:30%;
 width:13%;
}

/* Hinzufügen Button */
#addBtn{
 position:absolute;
 left:63%;
 top:35%;
 width:48px;
 padding:0;
 font-size:20px;
}

#importBtn{
 position:absolute;
 left:35%;
 top:40%;
 padding:10px 12px;
}

.privacyLink{
 position:absolute;
 left:50%;
 bottom:2%;
 transform:translateX(-50%);
 color:white;
 font-size:14px;
 text-shadow:1px 1px 3px black;
 z-index:120;
}

/* Backlog Liste */
#backlogBox{
 position:absolute;
 left:32.5%;
 top:46%;
 width:47.5%;
 height:34.5%;
 overflow:auto;
 box-sizing:border-box;

 background:rgba(0,0,0,.68);

 color:white;

 padding:10px;

 border-radius:8px;
}

body.isBacklogSetup #searchGame,
body.isBacklogSetup #filterGame,
body.isBacklogSetup #sortGame{
 display:none;
}

.backlogOnboarding{
 position:relative;
 display:grid;
 gap:9px;
 margin:2px;
 padding:16px;
 color:#2c2115;
 background:rgba(255,246,227,.96);
 border:2px solid #8e6b3a;
 border-radius:8px;
 box-shadow:0 6px 18px rgba(0,0,0,.25);
}

.backlogOnboarding[hidden]{display:none}

.backlogOnboarding strong{
 font-size:22px;
}

.backlogOnboardingCount{
 position:absolute;
 top:16px;
 right:16px;
 font-weight:bold;
}

.backlogOnboardingTrack{
 height:10px;
 overflow:hidden;
 background:#cbb58a;
 border-radius:999px;
}

.backlogOnboardingTrack span{
 display:block;
 height:100%;
 background:#2f5838;
 transition:width .25s ease;
}

.backlogOnboardingTrack .progress-0{width:0}
.backlogOnboardingTrack .progress-1{width:33.333%}
.backlogOnboardingTrack .progress-2{width:66.666%}
.backlogOnboardingTrack .progress-3{width:100%}

.backlogOnboarding p{
 margin:0;
 line-height:1.4;
}

#hallOfFameBtn,
#basementBtn{
 position:absolute;
 left:2%;
 min-width:150px;
 max-width:210px;
 padding:10px 14px;
 z-index:130;
 text-align:left;
 background:var(--green);
 color:white;
 border:0;
 border-radius:8px;
 box-shadow:0 2px 0 rgba(0,0,0,.35);
}

#hallOfFameBtn{
 top:8%;
}

#basementBtn{
 top:14%;
}

#hallOfFameBtn:hover,
#basementBtn:hover{
 transform:translateY(-1px);
}

/* Zurück Button */
#backBtn{
 position:absolute;
 left:2%;
 top:2%;
 min-width:136px;
 padding:10px 14px;
 z-index:100;
}

#sobSyncMount{
 position:absolute;
 right:2%;
 bottom:18%;
 width:270px;
 z-index:120;
}

ul{
 list-style:none;
 padding:0;
 margin:0;
}

li{
 padding:4px;
 margin-bottom:4px;
 border-bottom:1px solid rgba(255,255,255,.2);
}

.backlogItemTop{
 display:flex;
 justify-content:space-between;
 align-items:center;
 gap:10px;
}

.backlogItemTop > div:last-child{flex-shrink:0}

.backlogItemName{
 flex:1;
 min-width:0;
 overflow-wrap:anywhere;
}

.backlogItemMeta,
.backlogItemResult{
 margin-top:4px;
}

.backlogItemResult{
 display:grid;
 gap:5px;
}

.backlogStatusLine{
 display:flex;
 align-items:center;
 gap:6px;
 flex-wrap:wrap;
}

.backlogStatusLabel{
 font-size:12px;
 font-weight:bold;
 color:rgba(255,255,255,.82);
}

.backlogStatusChips{
 display:flex;
 flex-wrap:wrap;
 gap:4px;
 min-width:0;
}

#backlogBox button{

 background:var(--green);

 border:0;

 cursor:pointer;

 font-size:15px;

 padding:0;

 opacity:1;
 width:34px;
 min-width:34px;
 height:34px;
 min-height:34px;
 border-radius:7px;
 color:white;
 box-shadow:0 2px 0 rgba(0,0,0,.35);

}

#backlogBox .statusChip{
 width:auto;
 min-width:0;
 height:26px;
 min-height:26px;
 padding:0 8px;
 border:1px solid rgba(255,248,232,.5);
 border-radius:999px;
 background:rgba(255,248,232,.12);
 color:rgba(255,255,255,.86);
 box-shadow:none;
 font-size:11px;
 font-weight:bold;
 line-height:1;
}

#backlogBox .statusChip.isActive{
 background:var(--paper2);
 color:var(--ink);
 border-color:#e8c35f;
 box-shadow:0 0 0 2px rgba(232,195,95,.28);
}

#backlogBox .statusChip.isActive::before{
 content:"✓ ";
}

#backlogBox button:hover{

 opacity:1;

 transform:translateY(-1px);

}

#dragonSpeech{
 position:absolute;

 left:2%;
 top:40%;

 width:260px;

 padding:10px;

 background:rgba(255,255,255,0.9);

 border-radius:10px;

 color:black;

 font-size:14px;

 text-align:left;

 box-shadow:2px 2px 8px rgba(0,0,0,0.4);
}

#gameDialogOverlay,
#hoursDialogOverlay{
 position:absolute;
 inset:0;
 background:rgba(0,0,0,.42);
 z-index:900;
}

#gameDialog,
#hoursDialog,
#listImportDialog{
 position:absolute;
 left:50%;
 top:50%;
 transform:translate(-50%,-50%);
 width:420px;
 max-width:86%;
 max-height:90%;
 overflow:auto;
 overscroll-behavior:contain;
 box-sizing:border-box;
 z-index:901;
 padding:16px;
 background:rgba(255,248,232,.97);
 color:var(--ink);
 border:3px solid rgba(142,107,58,.9);
 border-radius:8px;
 box-shadow:0 12px 28px rgba(0,0,0,.5);
}

#listImportDialog{
 width:460px;
}

#listImportOverlay{
 position:absolute;
 inset:0;
 background:rgba(0,0,0,.42);
 z-index:900;
}

#gameDialog h2,
#hoursDialog h2,
#listImportDialog h2{
 margin:0 0 12px;
 font-size:22px;
}

#listImportDialog p,
#hoursDialogGame{
 margin:0 0 10px;
 line-height:1.35;
}

.importSourceTabs{
 display:grid;
 grid-template-columns:repeat(3,1fr);
 gap:6px;
 margin:0 0 10px;
}

.importSourceTabs button{
 min-height:34px;
 padding:6px 8px;
 border:2px solid rgba(91,62,29,.35);
 border-radius:8px;
 background:rgba(255,248,232,.72);
 color:var(--ink);
 box-shadow:none;
 font-size:13px;
}

.importSourceTabs button.isSelected{
 background:#d7a93e;
 border-color:#5b3e1d;
 color:#201508;
}

.importFileLabel{
 display:block;
 margin-bottom:8px;
 font-weight:bold;
}

.importFileLabel[hidden],
.steamProfileImport[hidden],
#listImportText[hidden],
.importEnrichBtn[hidden]{
 display:none;
}

.importFileLabel input{
 display:block;
 width:100%;
 margin-top:4px;
 font-size:13px;
}

.steamProfileImport{
 display:grid;
 grid-template-columns:1fr auto;
 gap:8px;
 margin-bottom:8px;
}

.steamProfileImport input{
 min-width:0;
 padding:8px 10px;
 border:2px solid var(--line);
 border-radius:8px;
 background:var(--paper2);
 color:var(--ink);
}

.steamProfileImport button{
 min-width:132px;
 min-height:38px;
 padding:7px 10px;
 border-radius:8px;
 font-size:13px;
}

#hoursDialogGame{
 font-weight:bold;
 color:#5b3e1d;
}

#listImportText{
 width:100%;
 min-height:150px;
 resize:vertical;
 border:2px solid var(--line);
 border-radius:8px;
 background:var(--paper2);
 color:var(--ink);
 padding:10px 12px;
 font:inherit;
 box-sizing:border-box;
}

.importEnrichBtn{
 width:100%;
 min-height:36px;
 margin-top:8px;
 padding:8px 10px;
 border-radius:8px;
 background:#273f2b;
 font-size:14px;
}

.importPreview{
 min-height:36px;
 margin:10px 0;
 font-size:14px;
 line-height:1.35;
}

.importPreview ul{
 margin:8px 0 0;
 padding-left:18px;
}

.importError{
 color:#8b2f2a;
 font-weight:bold;
}


#gameDialog label,
#hoursDialog label{
 display:block;
 margin-bottom:10px;
 font-weight:bold;
}

#gameDialog input,
#gameDialog select,
#hoursDialog input{
 display:block;
 width:100%;
 margin-top:4px;
}

.dialogLabel{
 font-weight:bold;
 margin-bottom:6px;
}

#dialogPlatformChoices{
 display:grid;
 grid-template-columns:repeat(2,1fr);
 gap:8px;
 margin-bottom:12px;
}

#dialogPlatformChoices .platformChoice{
 min-height:40px;
 padding:8px 10px;
 background:rgba(39,63,43,.92);
 color:white;
 border:2px solid transparent;
}

#dialogPlatformChoices .platformChoice.isSelected{
 background:#d7a93e;
 color:#201508;
 border-color:#201508;
}

.dialogActions{
 display:flex;
 justify-content:flex-end;
 gap:8px;
}

.dialogActions button{
 min-width:120px;
}

#gameDialogCancel,
#hoursDialogCancel{
 background:#6b5737;
}

#backlogToast{
 position:absolute;
 left:50%;
 top:24%;
 transform:translateX(-50%);
 z-index:920;
 max-width:420px;
 padding:10px 14px;
 border:2px solid #d7a93e;
 border-radius:8px;
 background:rgba(39,61,40,.96);
 color:white;
 box-shadow:0 4px 14px rgba(0,0,0,.35);
 font-weight:bold;
 text-align:center;
}

#backlogToast button{
 min-height:0;
 margin-left:10px;
 padding:5px 8px;
 border:1px solid rgba(255,248,232,.75);
 border-radius:7px;
 background:#fff8e8;
 color:#21170d;
 box-shadow:none;
 font-size:13px;
 font-weight:bold;
}

#steinerBacklog{

 position:absolute;

 left:10px;
 top:10px;

 width:64px;

 image-rendering:auto;

}

#backlogText{

 margin-top:10px;

}

#backlogIntro{

 margin-left:80px;

 min-height:74px;

 display:flex;

 align-items:center;

 font-size:18px;

 font-weight:bold;

}

.speechRow{

 display:flex;

 align-items:center;

 gap:8px;

 margin-bottom:4px;

}

.speechRow span{

 width:24px;

 text-align:center;

 flex-shrink:0;

}

#languageBtn{
 position:absolute;
 right:2%;
 top: 9%;
 min-width:96px;
 padding:8px 10px;
 z-index:160;
 background:rgba(255,248,232,.94);
 color:#151515;
 border:1px solid rgba(142,107,58,.7);
 border-radius:8px;
 font-weight:bold;
 cursor:pointer;
 box-shadow:2px 2px 8px rgba(0,0,0,.35);
}
