/* assets/css/style.css */


:root {
    --primary-color: #4CAF50; /* Goblin Green */
    --secondary-color: #8D6E63; /* Earthy Brown */
    --accent-color: #FFC107; /* Gold Coin */
    --bg-color: #F5F5F5;
    --text-color: #333;
    --card-bg: #FFFFFF;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Let clicks pass through the calibration overlay */
#calibration-overlay {
  pointer-events: none;   /* clicks fall through to the map */
}

/* But still allow the controls/buttons inside to be clickable */
#calibration-overlay * {
  pointer-events: auto;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Authentication & General Layout --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.logo {
    width: 220px;
    height: 220px;
    margin-bottom: 1rem;
}

.logo-small {
    width: 100px;
    height: 100px;
}

.tagline {
    color: #777;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn:hover {
    background-color: #45a049;
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: #795548;
}

.form-switch {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: none;
}
.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    display: block;
}
.message.error {
    background-color: #ffebee;
    color: #c62828;
    display: block;
}


/* --- Dashboard --- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.upload-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.map-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.map-card-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background-color: #eee;
}

.map-card-info {
    padding: 1rem;
    flex-grow: 1;
}

.map-card-info h3 {
    margin-bottom: 0.5rem;
}

.map-card-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.status-calibrated {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-uncalibrated {
    background-color: #fff3e0;
    color: #ef6c00;
}

.map-card-actions {
    padding: 0 1rem 1rem;
    display: flex;
    justify-content: flex-end;
}

.delete-btn {
    background: none;
    border: none;
    color: #c62828;
    cursor: pointer;
    font-size: 1.2rem;
}

/* --- Map Viewer --- */
#map-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #333;
    touch-action: none; /* Disables browser gestures like pull-to-refresh */
}

#map-container {
    position: absolute;
    transform-origin: 0 0;
}

#map-image {
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

#user-location-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: rgba(29, 161, 242, 0.9);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(29, 161, 242, 0.7);
    transform: translate(-50%, -50%); /* Center the dot on its coordinates */
    transition: left 0.2s linear, top 0.2s linear; /* Smooth movement */
    z-index: 10;
}

#user-heading-arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid white;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.2s ease-out; /* Smooth rotation */
}

#ui-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.btn-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* --- Overlays (Calibration, Loading) --- */
.overlay-container {
    pointer-events: none;
	position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.overlay-panel {
    pointer-events: auto;
	background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    width: 90%;
    max-width: 450px;
}

#calibration-instructions {
    margin: 1rem 0;
    background-color: #fef9e7;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.calibration-point {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid white;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px black;
    z-index: 5;
}

/* Loading Animation */
.goblin-loader img {
    width: 100px;
    animation: bounce 1.5s infinite ease-in-out;
}
.goblin-loader p {
    color: white;
    font-size: 1.2rem;
    margin-top: 1rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.hint-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    z-index: 150;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    pointer-events: none; /* Banner won't block clicks */
}