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

body {
    font-family: 'Caveat', cursive;
    background:
        repeating-linear-gradient(0deg,
            #e37d0a 0px,
            #a37649 1px,
            transparent 1px,
            transparent 2px),
        repeating-linear-gradient(90deg,
            #312b23 0px,
            #c19a6b 1px,
            transparent 1px,
            transparent 2px),
        radial-gradient(circle at 20% 30%, #d2b48c 0%, #c19a6b 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%;
    min-height: 100vh;
    overflow-y: auto;
    padding: 15px;
    position: relative;

}

/* Header - small simple header */

header h1 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 2.3em;
    font-weight: 600;
    color: white;
    text-decoration: underline;
}

/* Push pins */
.pin {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.3),
        inset 0 2px 3px rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.pin::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    top: 4px;
    left: 4px;
}

.pin::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 10px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.pin-red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
    top: 15px;
    left: 30%;
}

main {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) 1fr;
    gap: 20px;
    padding: 10px 20px;
    align-items: start;
}

/* Map as polaroid photo */
.map-container {
    position: relative;
    background: white;
    padding: 12px 12px 45px 12px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.15);
    margin: 5px;
    height: fit-content;
    align-self: center;
    transition: transform 0.3s ease;
    transform: rotate(1.5deg);
}

.map-container:hover {
    transform: rotate(1.5deg) translateY(-5px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.2);
}

.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    overflow: visible;
}

.uk-map-svg {
    width: 100%;
    height: auto;
    display: block;
}

#mapOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#mapOverlay text {
    font-family: 'Caveat', cursive;
    font-weight: 700;
}

/* Stats container */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px;
}

/* Sticky note cards */
.stat-card {
    position: relative;
    padding: 15px 18px;
    min-height: auto;
    flex-shrink: 0;
    background: white;
    border-radius: 8px;
}

.stat-card h2 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #2c2416;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.stat-card h3 {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #2c2416;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 2.2em;
    font-weight: 700;
    color: #2c2416;
    margin: 6px 0;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #666;
    font-size: 0.95em;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #64af77, #0d6327);
    width: 0%;
    transition: width 1s ease-out;
}

.progress-text {
    text-align: center;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.3em;
    color: #2c2416;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.comparison {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0;
    position: relative;
    z-index: 1;
}

.comparison span {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5em;
}

.plan-note {
    margin-top: 4px;
}

.target {
    color: #666;
}

.actual {
    color: #2c2416;
    font-weight: 600;
}

.difference {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 1em;
    font-weight: 600;
    margin-top: 6px;
    padding: 8px;
    border-radius: 5px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.difference.ahead {
    color: #fff;
    background: radial-gradient(circle at 30% 30%, #64af77, #0d6327);
}

.difference.behind {
    color: #fff;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
}

/* Message cards */
.error-message {
    background: #f5f1e8;
    color: #c0392b;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #f44336;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.loading-message {
    background: #f5f1e8;
    color: #1565c0;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
    background: white;
    text-align: center;
    color: black;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9em;
    border-radius: 8px;
    width: fit-content;
    padding: 12px 20px;
    margin: 0 auto;
    opacity: 0.8;
}

footer a {
    color: #FC5200;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.last-updated {
    margin-top: 4px;
    font-size: 0.9em;
}

/* Responsive design */
@media (max-width: 968px) {
    main {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    header h1 {
        font-size: 2.2em;
    }

    .stat-value {
        font-size: 1.8em;
    }

    .map-container {
        max-width: 500px;
        margin: 10px auto;
    }

    .wood-frame {
        border-width: 20px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .cork-board {
        padding: 15px;
    }

    main {
        padding: 5px;
    }

    .comparison-row {
        flex-direction: column;
    }

    .comparison span {
        font-size: 1.2em;
    }

    .wood-frame {
        border-width: 15px;
    }
}
