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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f6e7; /* Light beige background for a treasure map feel */
    padding: 20px;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.page {
    padding: 20px;
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* Page transition animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from { 
        transform: translateX(-100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes rotateIn {
    from {
        transform-origin: center;
        transform: rotate3d(0, 0, 1, -200deg);
        opacity: 0;
    }
    to {
        transform-origin: center;
        transform: none;
        opacity: 1;
    }
}

.fade-in {
    animation-name: fadeIn;
}

.slide-in-right {
    animation-name: slideInRight;
}

.slide-in-left {
    animation-name: slideInLeft;
}

.bounce-in {
    animation-name: bounceIn;
}

.rotate-in {
    animation-name: rotateIn;
}

h1, h2, h3 {
    color: #8b4513; /* Brown color for headings */
    margin-bottom: 15px;
}

h1 {
    text-align: center;
    padding: 20px 0;
    background-color: #ffd700; /* Gold color for main title */
    margin-top: 0;
}

p {
    margin-bottom: 15px;
}

button {
    background-color: #4caf50; /* Brown */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px 0;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a0522d; /* Lighter brown on hover */
}

.center {
    text-align: center;
}

.home-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin-bottom: 20px;
}

.treasure-map-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    /*background-color: #f5deb3; !* Wheat color for parchment look *!*/
    padding: 20px;
    /*border-radius: 10px;*/
    /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);*/
    /*border: 2px solid #8b4513; !* Brown border *!*/
}

.treasure-map {
    font-size: 24px;
    line-height: 1.2;
    white-space: pre;
    text-align: center;
    font-family: monospace;
}

.treasure-map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.treasure-marker {
    position: absolute;
    top: 85%;
    left: 15%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.input-container {
    margin: 20px 0;
}

input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
}

/* Custom keyboard styles */
.input-display-container {
    margin: 20px 0;
}

.combination-display {
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #8b4513;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    height: 60px;
    background-color: white;
    text-align: center;
    letter-spacing: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.keyboard-container {
    margin: 20px auto;
    max-width: 600px;
}

.numbers-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.letters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.key-button {
    width: 40px;
    height: 40px;
    margin: 5px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #8b4513;
    border-radius: 5px;
    background-color: #f9f6e7;
    cursor: pointer;
    transition: background-color 0.2s;
}

.key-button:hover {
    background-color: #f5deb3;
}

.number-button {
    padding: 0;
    color: #8b4513;
    background-color: #ffd700;
}

.letter-button {
    padding: 0;
    color: #8b4513;
    background-color: #f9f6e7;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.delete-button {
    background-color: #ff6347;
    min-width: 60px;
}

.validate-button {
    background-color: #4caf50;
    min-width: 100px;
}

.pictogram {
    font-size: 48px;
    margin: 10px;
    text-align: center;
}

.instructions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
}

.direction {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 20px;
    padding: 15px;
    background-color: #f9f6e7;
    border-radius: 10px;
    border: 2px solid #8b4513;
    min-width: 120px;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Progress bar styles */
.progress-container {
    width: 100%;
    height: 30px;
    background-color: #f9f6e7;
    border: 2px solid #8b4513;
    border-radius: 15px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #ffd700;
    width: 0%;
    transition: width 0.5s ease-in-out;
    border-radius: 13px;
}


/* Responsive adjustments for iPad */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    button {
        padding: 12px 24px;
        font-size: 18px;
    }

    input {
        font-size: 18px;
        padding: 12px;
    }
}

.question-page {
    max-width: 800px;
    margin: 0 auto;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.option-button {
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #8b4513;
    border-radius: 5px;
    color: #8b4513;
    background-color: #f9f6e7;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.option-button:hover {
    background-color: #f5deb3;
}

#retry-questions-button,
#more-questions-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #8b4513;
    border-radius: 5px;
    background-color: #ffd700;
    cursor: pointer;
    transition: background-color 0.2s;
}

#retry-questions-button:hover,
#more-questions-button:hover {
    background-color: #f5deb3;
}
