
#main-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 0;
    box-sizing: border-box;
    position: relative;
    height: auto;
}

/* Side controls panel */
#side-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 22px;
    margin-left: 32px;
    margin-top: 0;
    position: relative;
    z-index: 10;
    min-width: 240px;
    background: rgba(255,255,255,0.92);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 24px 18px 24px 18px;
    border: 1.5px solid #e0e7ef;
}
/* Background controls styling */
#background-controls {
    background: transparent;
    border-radius: 10px;
    box-shadow: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    z-index: 2;
    margin-bottom: 0;
    margin-top: 0;
    width: 100%;
    min-width: 200px;
}
/* Modern button for scores and controls */
.modern-score-btn {
    background: rgba(248,249,250,0.96);
    color: #222;
    border: 2px solid #222;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    margin: 0 0 0 0;
    display: block;
    transition: background 0.2s, box-shadow 0.2s;
    width: 100%;
    min-width: 180px;
    letter-spacing: 0.03em;
}
.modern-score-btn:hover {
    background: linear-gradient(90deg, #38e8ff 0%, #4f8cff 100%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
/* --- Unified control group for background controls --- */
.background-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(248,249,250,0.96);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    border: 2px solid #222;
    padding: 7px 14px;
    margin: 0;
    min-width: 0;
}

/* Hide native color input, use a custom swatch */
#background-color-picker {
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #222;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    padding: 0;
    margin: 0 0 0 2px;
    cursor: pointer;
    outline: none;
    position: relative;
    z-index: 1;
}
#background-color-picker::-webkit-color-swatch {
    border-radius: 6px;
    border: 2px solid #222;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
#background-color-picker::-moz-color-swatch {
    border-radius: 6px;
    border: 2px solid #222;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
#background-color-picker:focus {
    outline: 2px solid #222;
    box-shadow: 0 0 0 2px #b3b3b3;
}
#background-color-picker:hover {
    filter: brightness(1.08) drop-shadow(0 2px 8px #2222);
}

/* Style the select dropdown to match the button */
#background-tile-select {
    background: #fff;
    color: #222;
    border: 2px solid #222;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    min-width: 110px;
    margin: 0 0 0 2px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    z-index: 1;
}
#background-tile-select:focus, #background-tile-select:hover {
    background: #f4f4f4;
    color: #111;
    box-shadow: 0 2px 8px #2222;
}
#background-tile-select option {
    color: #222;
    background: #fff;
    font-weight: normal;
}
/* Optional: style the label for the color picker for better alignment */
#background-controls label {
    font-size: 1em;
    font-weight: 500;
    margin-right: 8px;
    color: #222;
    text-shadow: none;
    letter-spacing: 0.01em;
}
body {
    font-family: 'Press Start 2P', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

#start-screen {
    background: url('../assets/start-bg.png') no-repeat center center;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    text-align: center;
}

#start-screen .start-instructions {
    font-size: 1.0em;
    color: #000000;
    margin: 4px auto;
    max-width: 90%;
    line-height: 1.4;
}

#start-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    border: 4px solid #000;
    background-color: #4CAF50;
    color: white;
    text-transform: uppercase;
    margin-top: 20px;
}

#game-map {
    height: 85vh;
    max-height: 750px;
    aspect-ratio: 20 / 15;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    border: 3px solid black;
    display: none;
    background-color: #fff;
    margin-left: auto;
    margin-right: auto;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    z-index: 1;
}

.npc,
#pc,
#mailbox,
#bookshelf,
#vinyl-shelf,
#server-object,
#server-object-2 {
    position: absolute;
    cursor: pointer;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

#player {
    position: absolute;
    cursor: default;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.npc img,
#pc img,
#mailbox img,
#player img,
#bookshelf img,
#vinyl-shelf img,
#server-object img,
#server-object-2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.cert-div {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(230, 230, 230, 0.95);
    border: 2px solid #333;
    padding: 20px;
    z-index: 100;
    text-align: left; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    border-radius: 8px;
    min-width: 250px;
    max-width: 450px;
    width: auto;
    box-sizing: border-box;
    display: none;
}

.game-dialog h2, .game-dialog h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.game-dialog p {
    margin-bottom: 15px;
     line-height: 1.4;
}

.game-dialog button {
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    border: 2px solid #000;
    border-radius: 4px;
    background-color: #ddd;
    color: black;
    font-size: 0.8em;
    text-transform: uppercase;
    font-family: 'Press Start 2P', sans-serif;
}

.game-dialog button:hover {
    background-color: #ccc;
}

.speech-bubble {
    top: auto !important; 
    left: auto !important;
    transform: none !important;
    padding: 10px 15px;
    min-width: 150px;
    max-width: 250px;
    text-align: left; 
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #333;
}

#dialog-text {
    font-size: 0.9em;
    color: #000;
}

#contact-form-dialog label {
    display: block;
    margin-top: 10px;
    font-size: 0.8em;
    text-align: left;
}

#contact-form-dialog input,
#contact-form-dialog textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 2px solid #000;
    box-sizing: border-box;
    font-size: 0.8em;
    font-family: 'Press Start 2P', sans-serif;
}

#contact-form-dialog button[type="submit"] {
     background-color: #4CAF50;
     color: white;
}
#contact-form-dialog button[type="submit"]:hover {
     background-color: #45a049;
}

#bookshelf-dialog ul {
    list-style-type: none;
    padding: 0;
    margin-bottom: 15px;
    font-size: 0.8em;
    text-align: left;
}

#bookshelf-dialog li {
     margin-bottom: 8px;
}

#tension-meter {
    margin-top: 15px;
}

#tension-bar-container {
    width: 100%;
    height: 20px;
    background-color: #ccc;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

#tension-bar {
    width: 0%;
    height: 100%;
    background-color: lightgreen;
    transition: width 0.1s linear, background-color 0.2s ease;
}

#score-list {
    list-style-type: decimal;
    padding-left: 30px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#score-list li {
    margin-bottom: 5px;
    font-family: monospace;
}

#initials-input {
    text-transform: uppercase;
    font-family: monospace;
    font-size: 1.1em;
    padding: 5px;
    margin: 10px 0;
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#joystick-zone {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background-color: rgba(128, 128, 128, 0.3);
    border-radius: 50%;
    z-index: 150;
}

/* --- Media Queries --- */

@media screen and (max-width: 600px) {
    #start-screen h1 {
        font-size: 1.5em;
    }
    #start-btn {
        font-size: 1em;
        padding: 10px 20px;
    }
    #game-map {
        width: 80vw;
        max-width: 900px;
        aspect-ratio: 20 / 15;
    }
    .game-dialog {
        padding: 15px;
        max-width: 90vw;
        min-width: 200px;
    }
    .game-dialog h2, .game-dialog h4 {
        font-size: 1em;
    }
     .game-dialog p, #dialog-text, #bookshelf-dialog ul {
        font-size: 0.8em;
    }
    .game-dialog button {
         padding: 6px 12px;
         font-size: 0.7em;
    }
    #initials-input {
        font-size: 1em;
    }
    #tension-bar-container {
        height: 18px;
    }

    #contact-form-dialog label,
    #contact-form-dialog input,
    #contact-form-dialog textarea {
         font-size: 0.7em;
    }

    /* -=-=- Adjust Joystick for mobile -=-=- */
    #joystick-zone {
        width: 100px;
        height: 100px;
        bottom: 15px;
    }
}

#server-object {
    position: absolute; 
    z-index: 2; 
    display: flex;
    justify-content: center;
    align-items: center;
}

#server-object img {
    width: 100%; 
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

#server-object-2 {
    position: absolute; 
    z-index: 2; 
    display: flex;
    justify-content: center;
    align-items: center;
}

#server-object-2 img {
    width: 100%; 
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

#it-experience-dialog {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 25px; 
}

#it-experience-dialog ul {
   padding-left: 20px;
   margin-bottom: 15px;
}

#it-experience-dialog p {
    margin-bottom: 15px;
}

#intern-experience-dialog {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 25px; 
}

#intern-experience-dialog ul {
   padding-left: 20px;
   margin-bottom: 15px;
}

#intern-experience-dialog p {
    margin-bottom: 15px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-0.5px); }
    50% { transform: translateX(0.5px); }
    75% { transform: translateX(-0.5px); }
}

/* -=-=- Gold Glow Hover for Interactables -=-=- */
#pc img:hover,
#mailbox img:hover,
#bookshelf img:hover,
#vinyl-shelf img:hover,
#server-object  img:hover,
#server-object-2  img:hover {
  filter: drop-shadow(0 0 12px #f9d77e) brightness(1.2);
  transform: scale(1.07);
  transition: 0.2s;
}