* {
    cursor: url('/static/images/cursor_hand.png'), auto;
}

body {
    background-color: #333333;
}

h1 {
    text-align: center;
    color: #f3e5ab;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hidden {
    display: none;
}

#startContainer, #characterContainer {
    position: relative;
    width: 100%;
    max-width: 600px;
    color: white;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    margin: 20px auto 20px;
    padding: 0;
    top: 0;
    left: 0;
    right: 0;
}

#startGameButton {
    padding: 10px 20px;
    font-size: 20px;
}

.image-container {
    display: block !important;  /* override the inline-block */
    margin: 20px auto !important;
    position: relative;
    width: 90%;
    max-width: 1024px; /* Adjust to match the new image size */
    margin: 20px auto;
    padding: 0; /* Remove padding to ensure square shape */
    background-color: #111111;
    border: 2px solid #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transition: all 1s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Ensure square shape */
    overflow: hidden; /* Prevent image from overflowing */
}

.image-container img#gameImage {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the container without distortion */
}

.narration-text {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 18px;
    text-align: center;
    max-height: 100px;
    overflow-y: auto;
}

.image-container.enlarged {
    transform: scale(1.4);
    z-index: 9999; /* Very high z-index when enlarged */
}

.image-container img#gameImage {
    display: block;
    width: 100%;
    height: auto;
}

.image-container img.overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.image-container {
    position: relative;
    display: inline-block;
}

.image-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.image-buttons .custom-btn.small-btn {
    padding: 5px 10px;
    font-size: 12px;
    margin-bottom: 60px;
}


.image-actions {
    margin-top: 10px;
    text-align: center;
}

.image-actions .custom-btn {
    margin: 5px;
}

#loadingMessage, #startMessage {
    color: white;
    font-size: 20px;
    text-align: center;
}

#sceneMessage {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 1000;
}

#gameContainer {
    display: none;
}

#gameContainer.show {
    display: block;
}

#actionButtons {
    position: static;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background-color: transparent;
    box-sizing: border-box;
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    padding: 10px;
    box-sizing: border-box;
    margin-top: 0;
    padding-top: 0;
}

.custom-btn {
    padding: 5px 10px;  /* Reduced padding for smaller height */
    font-size: 12px;  /* Reduced font size */
    color: #f3e5ab;
    background-color: rgba(139, 69, 19, 1);
    border: 2px solid #d2691e;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    min-width: 80px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    margin: 5px 0;
}

.custom-btn:hover {
    background-color: rgba(160, 82, 45, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.custom-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#actionButtons .custom-btn {
    flex: 1 1 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
}


.image-button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
}

.image-btn {
    width: 160px;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #d2691e;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.image-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.custom-setting-container {
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

.custom-setting-container input {
    width: 80%;
    padding: 8px;
    border: 2px solid #d2691e;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
}


#customActionContainer {
    margin-top: 10px;
}

#customAction {
    padding: 5px;
    margin-right: 5px;
}

#submitCustomAction {
    padding: 5px 10px;
}

.custom-btn.custom-action {
    text-align: center;
    background-color: rgba(139, 69, 19, 0.8);
    color: #f3e5ab;
}

.custom-btn.custom-action input:focus {
    background-color: rgba(139, 69, 19, 0.8);
    color: #f3e5ab;
}

.custom-btn.custom-action::placeholder {
    color: #888;
}

.custom-btn.custom-action input {
    width: 100%;
    height: 100%;
    padding: 8px 15px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: center;
    font: inherit;
    outline: none;
}

.custom-btn.custom-setting-btn {
    padding: 0;
    overflow: hidden;
}

.custom-btn.custom-setting-btn input {
    width: 100%;
    height: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: center;
    font: inherit;
    outline: none;
}

.custom-btn.custom-setting-btn input::placeholder {
    color: #D3D3D3;
}

.custom-action {
    background-color: #444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    cursor: text !important;
}

.banner {
    width: 100%;
    padding: 5px 0; /* Reduced padding */
    position: static;
    top: 0;
    left: 0;
    z-index: 1000;
}

.banner-image {
    display: block;
    max-height: 60px; /* Slightly reduced max-height */
    margin: 0 auto;
}

.modal.fade-in {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* Standaard: modal zit verborgen */
#uploadCharacterModal {
  display: none;             /* start hidden */
  position: fixed;           /* full screen */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  z-index: 9999;

  /* hé, flex! zodat je content makkelijk centert */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .hidden klasse overrulen */
#uploadCharacterModal.hidden {
  display: none !important;
}


/* de “doos” in het midden */
#uploadCharacterModal .modal-content {
  background: #1e1e1e;      /* bijvoorbeeld donker thema */
  color: #f3e5ab;
  padding: 20px 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#newAdventureContainer {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

#newAdventureBtn {
    padding: 8px 15px;
    font-size: 14px;
    color: #f3e5ab;
    background-color: rgba(139, 69, 19, 0.8);
    border: 2px solid #d2691e;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 80px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

#newAdventureBtn:hover {
    background-color: rgba(160, 82, 45, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

#newAdventureBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#paymentPrompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #d2691e;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    z-index: 1000;
    max-width: 80%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#paymentPrompt p {
    color: #f3e5ab;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
}

#paymentPrompt #goToPaymentBtn {
    padding: 10px 20px;
    font-size: 16px;
    color: #f3e5ab;
    background-color: rgba(139, 69, 19, 0.95);
    border: 2px solid #d2691e;
    border-radius: 5px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#paymentPrompt #goToPaymentBtn:hover {
    background-color: rgba(160, 82, 45, 0.99);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

#paymentPrompt #goToPaymentBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-btn,
.custom-btn:hover,
#newAdventureBtn,
#newAdventureBtn:hover,
#paymentPrompt #goToPaymentBtn,
#paymentPrompt #goToPaymentBtn:hover {
    cursor: inherit;
}

body, body * {
    cursor: url('/static/images/cursor_hand.png') 16 16, auto !important;
}

body.cursor-mirrored,
body.cursor-mirrored * {
    cursor: url('/static/images/cursor_hand_mirrored.png') 16 16, auto !important;
}



.custom-btn.header-btn {
    background-color: transparent;
    border: none;
    color: #f3e5ab;
    font-size: 1.5em;
    cursor: default;
    box-shadow: none;
    text-align: center;
}

.action-buttons-container {
    position: static;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    margin-top: 20px;
}

.action-buttons-container .custom-btn {
    flex: 1 1 auto;
    max-width: calc(33.333% - 10px);
    min-width: 100px;
    margin: 1px;
}

#customAction {
    flex: 1 1 100%;
    max-width: 100%;
}

#characterContainer.hidden {
    display: none;
}

/* Modal container */
.share-options-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    box-shadow: none; /* Ensure no outer shadow */
}

/* Modal content */
.share-options-content {
    background-color: #111111; /* Dark background like the diary box */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 80%;
    max-width: 600px; /* Same width and structure as the diary box */
    box-shadow: none; /* Ensure no shadow */
    border: 2px solid #d2691e; /* Matching border */
    font-family: 'Cinzel', serif; /* Matching font */
    color: #f3e5ab; /* Matching text color */
}

/* Share links styling */
.share-link {
    display: block;
    margin: 10px 0;
    font-size: 16px;
    text-decoration: none;
    color: #f3e5ab; /* Adjust color to match diary box */
}

.share-link:hover {
    text-decoration: underline;
    color: rgba(160, 82, 45, 0.9); /* Hover color similar to buttons */
}

#shareBtn {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: auto; /* Allow width to adjust based on content */
    max-width: 200px; /* Limit the maximum width to make it less broad */
    padding: 5px 10px; /* Adjust padding to match the new size */
    font-size: 14px; /* Slightly adjust the font size if needed */
    margin: 5px auto; /* Center the button horizontally */
    display: block; /* Ensure it's centered within its parent container */
}

/* Modal container */
.modal {
    display: flex;  /* of block als je dat wilt */
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6); /* mooie transparante achtergrond */
    z-index: 1000;
}

/* Ensure the modal stays hidden when the .hidden class is applied */
.hidden {
    display: none !important; /* Forces the modal to stay hidden */
}

/* Modal content box */
.modal-content {
    background-color: #111111; /* Dark background like the rest of the game */
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    text-align: center;
    border: 2px solid #d2691e;
    font-family: 'Cinzel', serif;
    color: #f3e5ab;
}

.diary-content {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    border: 1px solid #d2691e;
    background-color: #333333;
    color: #f3e5ab;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
}

/* Close button styling */
#closeDiaryBtn {
    background-color: rgba(139, 69, 19, 0.95);
    border: 2px solid #d2691e;
    color: #f3e5ab;
    padding: 10px 24px;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#closeDiaryBtn:hover {
    background-color: rgba(160, 82, 45, 0.99); /* Consistent hover effect */
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

#closeDiaryBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#diaryModal {
    display: none;
}
#diaryModal.show {
    display: flex !important;
    justify-content: center;
    align-items:  center;
}

#diaryModal .modal-content {
    background-color: #111111;
}

/* Modal animation for fade-in */
.modal.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.modal.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Keyframes for the modal fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.diary-icon-btn {
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    border: none;
}

.diary-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.toggle-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.toggle-title {
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    color: #A0A0A0;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: inline-block;
    width: 80px;
    height: 34px;
    background-color: #ccc;
    border-radius: 34px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-label::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: white;
    top: 4px;
    left: 4px;
    transition: 0.3s;
}

.toggle-input:checked + .toggle-label {
    background-color: #2196F3;
}

.toggle-input:checked + .toggle-label::after {
    left: calc(100% - 4px);
}

.toggle-label::before {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 12px;
}

.toggle-input:checked + .toggle-label::before {
    left: auto;
    right: 10px;
}

.cursor-mirrored {
    cursor: url('/static/images/cursor_hand_mirrored.png') 16 16, auto !important;
}

.style-button-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ===== OVERRIDE voor styleButtons Container ===== */
#styleButtons {
  /* haal eventuele max-width weg en maak 100% breed */
  max-width: none !important;
  width: 100% !important;

  /* centreer de inline-grid erin */
  text-align: center;
  padding: 2rem 1rem; /* optioneel, voor wat marge */
}

/* ==== STYLE‐SELECTIE GRID CENTREREN ==== */
#styleButtons .style-button-grid {
  display: grid;
  /* 4 kolommen van 180px */
  grid-template-columns: repeat(4, 180px);
  grid-gap: 1rem;
  /* vaste breedte: 4×180px + 3×1rem gap */
  width: calc(4 * 180px + 3 * 1rem);
  /* centreer horizontaal */
  margin: 1.5rem auto 0;
}

/* knopbreedte forceren zodat ‘ie mooi in de kolom valt */
#styleButtons .style-button-grid .custom-btn {
  width: 180px;
}


/* ===== SURPRISE-ME KNOP BOVENAAN ===== */
#surpriseStyleBtn{
    width:220px;                 /* zelfde look & feel als je andere knoppen */
    margin-bottom:2rem;
}


#startContainer #promoVideoContainer {
    margin-top: 60px;
    margin-bottom: 60px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

#startContainer #promoVideo {
    width: 100%;
    max-width: 1600px; /* Doubled from previous 800px */
    height: auto;
    box-shadow: 0 0 20px rgba(243, 229, 171, 0.3); /* Soft glow effect */
    border: 2px solid #d2691e; /* Matching border style */
    border-radius: 10px; /* Rounded corners */
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .image-container {
        width: 95%;
        margin: 10px auto;
        padding: 10px;
    }

    #actionButtons {
        position: static;
        margin-top: 20px;
    }

    .button-container {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .action-buttons-container {
        position: static;
        background-color: transparent;
    }

    .action-buttons-container .custom-btn {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    #customAction {
        flex: 1 1 100%;
        max-width: 100%;
    }

    #shareBtn {
        position: static;
        transform: none;
        margin: 10px auto;
    }
}

/* Additional responsive adjustments */
@media (max-width: 480px) {
    .action-buttons-container .custom-btn {
        flex: 1 1 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 24px;
    }

    .custom-btn {
        font-size: 14px;
    }
}

/* Ensure the game container takes up full width on mobile */
@media (max-width: 768px) {
    #gameContainer {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
}

/* Keyframes for the modal fade-out effect */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
