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

body {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    background-image: url('paperboard-texture.jpg');
    background-color: #f4e4bc;
    color: #2c1810;
}

header {
    background-color: #2c1810;
    color: #f4e4bc;
    text-align: center;
    padding: 2rem;
    border-bottom: 4px solid #8b4513;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cache-section {
    background-color: rgba(255, 250, 240, 0.9);
    border: 2px solid #8b4513;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}


.main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 3px solid #8b4513;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c1810;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border-left: 4px solid #8b4513;
}

.button-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    min-width: 120px;
    padding: 0.8rem 1rem;
    background-color: #8b4513;
    color: #f4e4bc;
    border: 2px solid #2c1810;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

button:hover {
    background-color: #2c1810;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none;
}

img:not(.main-image) {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 3px solid #8b4513;
    margin-top: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

img:not(.main-image):hover {
    transform: scale(1.02);
}

.cache-section::before {
    content: '🧭';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    opacity: 0.7;
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
        grid-template-columns: 1fr;
    }

    .cache-section {
        padding: 1.5rem;
        transform: none;
    }

    .cache-section:nth-child(even) {
        transform: none;
    }

    .cache-section:hover {
        transform: none;
    }

    header h1 {
        font-size: 1.8rem;
    }
}

@keyframes compass-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cache-section:hover::before {
    animation: compass-spin 2s linear infinite;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #ccc;
}

/* Hide the original images */
img.hidden {
    display: none;
}

.hint-text {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f8f8;
    border-left: 4px solid #8b4513;
}

.coord-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    text-align: right;
  }

  .coord-input input {
    padding: 5px;
    width: 100px;
  }

  .check-result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
  }

  .check-result.success {
    background-color: #dff0d8;
    color: #3c763d;
  }

  .check-result.error {
    background-color: #f2dede;
    color: #a94442;
  }

  button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }