/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400&display=swap');

:root {
    /* Art Nouveau Palette */
    --color-bg: #E6F3F5;
    /* Eau de Nil */
    --color-primary: #C5A059;
    /* Antique Gold / Bronze */
    --color-secondary: #2F6A6C;
    /* Muted Peacock Teal */
    --color-text: #FDF5E6;
    /* Old Lace */
    --color-panel-bg: rgba(47, 79, 79, 0.85);
    /* Dark Slate Gray with transparency */

    --font-ui: 'Cinzel', serif;
    /* Decorative Headers */
    --font-body: 'Playfair Display', serif;
    /* Elegant Body */
    --font-data: 'Lato', sans-serif;
    /* Clean Data */
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-text);
    user-select: none;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas */
}

/* Crosshair - Elegant Diamond shape */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 8px var(--color-primary);
    pointer-events: none;
}

#crosshair::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

/* HUD Panel */
#hud-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 320px;
    background: linear-gradient(135deg, rgba(30, 50, 50, 0.9), rgba(47, 79, 79, 0.9));
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

#hud-panel h2 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-family: var(--font-ui);
    color: var(--color-primary);
    text-align: center;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 8px;
    letter-spacing: 2px;
}

.hud-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-family: var(--font-data);
    font-size: 1rem;
    border-bottom: 1px dotted rgba(197, 160, 89, 0.3);
    padding-bottom: 2px;
}

.hud-stat .label {
    color: #A8D8D8;
    /* Soft Teal */
    font-style: italic;
}

.hud-stat .value {
    color: #FDF5E6;
    font-weight: bold;
}

.hud-log {
    margin-top: 20px;
    height: 90px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    padding: 8px;
    font-family: var(--font-data);
    font-size: 0.85rem;
    color: #E0F2F1;
    overflow-y: hidden;
    white-space: pre-wrap;
}

/* Compass (Art Nouveau) */
#compass-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    border: 3px double var(--color-primary);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 79, 79, 0.8), rgba(0, 0, 0, 0.6));
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* North Label */
#compass-label-n {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-primary);
    font-family: var(--font-ui);
    font-weight: bold;
    text-shadow: 0 0 5px var(--color-primary);
    pointer-events: none;
    /* Rotates with the container or stays fixed? Typically Fixed N is outside. Let's make the container rotate or needle rotate. 
    Actually, usually needle points North (rotates), or Card rotates. Let's rotate the NEEDLE to point North, based on camera look. */
}

/* Needle */
#compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 60px;
    background: linear-gradient(to bottom, #FF6B6B 50%, #fff 50%);
    /* Red Tip North */
    transform: translate(-50%, -50%);
    /* Initial center */
    /* Rotation will be applied here */
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: 0 0 5px black;
}

/* Decorative inner ring */
#compass-rose {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(197, 160, 89, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(20, 30, 30, 0.95), rgba(5, 5, 10, 0.98));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 10;
}

#start-screen h1 {
    font-family: var(--font-ui);
    font-size: 4rem;
    color: var(--color-primary);
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.5);
    margin-bottom: 10px;
    letter-spacing: 5px;
}

#start-screen p {
    font-family: var(--font-body);
    font-size: 1.4rem;
    margin: 5px 0;
    font-style: italic;
    color: #A8D8D8;
}

#btn-start {
    margin-top: 40px;
    padding: 12px 50px;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-ui);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

#btn-start:hover {
    background: var(--color-primary);
    color: #1a2a2a;
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.6);
}

/* Victory Overlay */
#victory-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(30, 40, 40, 0.9), rgba(10, 10, 15, 0.95));
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#victory-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
    /* Completely hide */
}

.victory-content {
    background: linear-gradient(135deg, rgba(20, 30, 30, 0.9), rgba(47, 79, 79, 0.9));
    border: 3px double var(--color-primary);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 450px;
    position: relative;
}

/* Art Nouveau Decor Suggsetion via Corner Borders */
.victory-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 15px;
    pointer-events: none;
}

.victory-content h1 {
    color: var(--color-primary);
    font-family: var(--font-ui);
    font-size: 2.8rem;
    margin-top: 0;
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    border-bottom: 1px solid var(--color-secondary);
    padding-bottom: 20px;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
    text-align: left;
}

.data-item {
    background: rgba(47, 79, 79, 0.4);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.data-item .label {
    display: block;
    color: #A8D8D8;
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-family: var(--font-body);
    font-style: italic;
}

.data-item .value {
    display: block;
    color: #fff;
    font-size: 1.5rem;
    font-family: var(--font-data);
    font-weight: bold;
}

.data-item .value.highlight {
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.6);
}

.action-btn {
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-ui);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 50px;
    /* More rounded */
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
}

.action-btn:hover {
    background: var(--color-primary);
    color: #1a2a2a;
    box-shadow: 0 0 20px var(--color-primary);
}

/* Logbook Specifics */
#logbook-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(20, 30, 30, 0.9), rgba(5, 5, 10, 0.95));
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#logbook-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.log-entry-section {
    margin: 20px 0 40px 0;
    text-align: left;
}

.log-entry-section h3 {
    margin-bottom: 10px;
    color: #A8D8D8;
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-style: italic;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 5px;
}

#poi-select {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-ui);
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    /* Custom arrow would be nice but standard is ok */
}

#poi-select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

/* Mission Report Overlay */
#mission-report-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 15, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 30;
    /* Higher than logbook */
}

#mission-report-overlay.hidden {
    display: none !important;
}

#final-stats {
    font-size: 1.5rem;
    font-family: var(--font-data);
    margin: 20px 0;
    color: #E0F2F1;
}

/* Mini Map Dots */
.map-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.map-dot.real {
    background: #00ff88;
    /* Neo Green for Real location */
    box-shadow: 0 0 8px #00ff88;
}

.map-dot.user {
    width: 12px;
    height: 12px;
    border: 2px solid #FF6B6B;
    /* Soft Red ring for user guess */
    box-shadow: 0 0 8px #FF6B6B;
}

.map-label {
    position: absolute;
    font-size: 11px;
    color: #FDF5E6;
    font-family: var(--font-data);
    text-transform: uppercase;
    transform: translate(-50%, -170%);
    white-space: nowrap;
    text-shadow: 1px 1px 2px black;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 4px;
    border-radius: 3px;
}