/* -----------------------------------------
GENERAL PAGE
----------------------------------------- */

body {
    font-family: Arial, sans-serif;
    background: #eef5f7;
    margin: 0;
    padding: 20px;
    color: #222;
}

.app {
    max-width: 700px;
    margin: auto;
}

h1 {
    text-align: center;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #666;
}


/* -----------------------------------------
BUTTONS
----------------------------------------- */

button {
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 5px;
    font-size: 16px;
    cursor: pointer;
    background: #1976d2;
    color: white;
}

button:hover {
    background: #125ca3;
}

#recordButton {
    display: block;
    width: 100%;
    margin: 25px 0;
    font-size: 20px;
}


/* -----------------------------------------
RECORD FORM
----------------------------------------- */

.hidden {
    display: none;
}

#recordForm {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.instruction {
    color: #666;
    line-height: 1.4;
}


/* -----------------------------------------
INPUTS
----------------------------------------- */

#bankNickname {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.nickname-container {
    position: relative;
}

.nickname-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.nickname-suggestion {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.nickname-suggestion:hover {
    background: #eef5f7;
}

.selection-status {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 15px;
}

select,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

textarea {
    height: 100px;
    resize: vertical;
}


/* -----------------------------------------
SCORE BUTTONS
----------------------------------------- */

.score-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.score-buttons button {
    width: 45px;
    height: 45px;
    padding: 0;
}

#selectedScore {
    font-weight: bold;
    text-align: center;
}


/* -----------------------------------------
RECORDING MAP
----------------------------------------- */

#recordMap {
    height: 350px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 10px;
}

.map-status {
    text-align: center;
    font-weight: bold;
    color: #555;
}


/* -----------------------------------------
SAVED BANK MAP
----------------------------------------- */

.map-section {
    margin-bottom: 20px;
}

#map {
    height: 450px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}


/* -----------------------------------------
HISTORICAL IMAGERY
----------------------------------------- */

#historicalControls {
    background: white;
    padding: 15px;
    margin-top: 12px;
    border-radius: 10px;
}

#historicalControls h3 {
    margin-top: 0;
}

.historical-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

#historicalControls label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

#historicalControls select {
    margin-bottom: 10px;
}

.historical-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.historical-buttons button {
    flex: 1;
    min-width: 180px;
}

#clearHistoricalButton {
    background: #666;
}

#clearHistoricalButton:hover {
    background: #444;
}

.historical-status {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 0;
}


/* -----------------------------------------
SAVED BANK RECORDS
----------------------------------------- */

.bank {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.bank h3 {
    margin-top: 0;
}

.observation-count {
    color: #666;
    font-size: 14px;
}

.historical-bank-button {
    width: 100%;
    margin: 5px 0 0 0;
    background: #455a64;
}

.historical-bank-button:hover {
    background: #263238;
}


/* -----------------------------------------
MAP CONTROLS
----------------------------------------- */

.leaflet-control-layers {
    border-radius: 8px;
}


/* -----------------------------------------
MOBILE
----------------------------------------- */

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #recordMap {
        height: 300px;
    }

    #map {
        height: 350px;
    }

    #historicalControls {
        padding: 12px;
    }

    .historical-buttons {
        display: block;
    }

    .historical-buttons button {
        width: 100%;
        margin: 5px 0;
    }
}

/* =========================================
   INVITE SCREEN
========================================= */

.invite-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.invite-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.invite-box h1 {
    margin-bottom: 10px;
}

.invite-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 20px 0 10px;
    font-size: 16px;
}

.invite-box button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.invite-status {
    min-height: 24px;
    margin-top: 12px;
}