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

/* SOS Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a0d2e 0%, #4a508e 50%, #1a0d2e 100%);
    color: #d99449;
    overflow: hidden;
}

/* Container Layouts */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a0d2e 0%, #4a508e 50%, #1a0d2e 100%);
}

.auth-container {
    background: #d99449;
    border: 4px solid #bf393e;
    padding: 40px 30px;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #1a0d2e;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #bf393e;
    font-weight: 900;
    text-shadow: 2px 2px 0px #4a508e;
    letter-spacing: 3px;
}

h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #d99449;
    font-weight: 900;
    text-shadow: 1px 1px 0px #4a508e;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #d99449;
    font-weight: 900;
    text-shadow: 1px 1px 0px #4a508e;
}

.subtitle {
    color: #4a508e;
    margin-bottom: 30px;
    font-size: 1rem;
    font-weight: bold;
    /*text-shadow: 1px 1px 0px #4a508e;*/
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 900;
    color: #4a508e;
    font-size: 1rem;
    /*text-shadow: 1px 1px 0px #4a508e;*/
}

.input {
    width: 100%;
    padding: 12px 16px;
    border: 3px solid #bf393e;
    border-radius: 0;
    font-size: 1rem;
    transition: none;
    background: #120e27;
    color: #479dc0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.input:focus {
    outline: none;
    border: 3px solid #bf393e;
    background: #1a0d2e;
    box-shadow: inset 0px 0px 4px rgba(230, 57, 70, 0.08);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: 4px solid #bf393e;
    border-radius: 0;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: none;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.btn-primary {
    background: #be6a3b;
    color: #000;
    box-shadow: 4px 4px 0px #4a508e;
}

.btn-primary:hover {
    box-shadow: 2px 2px 0px #4a508e;
    transform: translate(2px, 2px);
    background: #d99449;
}

.btn-primary:active {
    box-shadow: 2px 2px 0px #4a508e;
    transform: translate(4px, 4px);
}

.btn-secondary {
    background: #479dc0;
    color: #000;
    box-shadow: 4px 4px 0px #4a508e;
}

.btn-secondary:hover {
    box-shadow: 2px 2px 0px #4a508e;
    transform: translate(2px, 2px);
    background: #d99449;
    color: #000;
}

.btn-secondary:active {
    box-shadow: 2px 2px 0px #4a508e;
    transform: translate(4px, 4px);
}

.btn-small {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #d99449;
    color: #000;
    box-shadow: 3px 3px 0px #4a508e;
}

.btn-small:hover {
    box-shadow: 2px 2px 0px #4a508e;
    transform: translate(1px, 1px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #3B2D7F;
    color: #d99449;
    border-bottom: 4px solid #479dc0;
    box-shadow: 0px 4px 0px #bf393e;
    flex-wrap: wrap;
    gap: 10px;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.user-badge {
    font-size: 0.9rem;
    font-weight: bold;
    color: #bf393e;
    text-shadow: 1px 1px 0px #000;
}

/* Mobile responsive text */
.mobile-show {
    display: none;
}

.mobile-hide {
    display: inline;
}

/* Map */
.map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    border: 4px solid #479dc0;
    box-shadow: inset 0px 0px 6px rgba(43, 155, 168, 0.06);
}

#map {
    width: 100%;
    height: 100%;
}

/* Custom Markers - Google Maps Style Pin */
.custom-marker {
    background: none;
    border: none;
}

.marker-user {
    width: 44px;
    height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Google Maps pin: rounded top with pointed bottom */
.marker-user::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    top: 0;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    z-index: 1;
    border: 2px solid #bf393e;
    background: var(--marker-color, #d99449);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.marker-label {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #4a508e;
    color: #479dc0;
    padding: 4px 8px;
    border: 2px solid #479dc0;
    font-size: 11px;
    white-space: nowrap;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

/* Pin Markers */
.pin-marker-container {
    background: none;
    border: none;
    display: flex;
}

.pin-marker-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    width: 100%;
    height: 100%;
}

.pin-marker-wrapper .pin-label {
    background: #4a508e;
    color: #bf393e;
    padding: 2px 6px;
    border: 2px solid #bf393e;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    border-radius: 3px;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    max-width: 100px;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

.pin-marker-wrapper .pin-icon {
    flex-shrink: 0;
    width: 32px;
    height: 40px;
}

/* Members Panel */
.members-panel {
    background: #4a508e;
    padding: 15px 20px;
    border-top: 4px solid #479dc0;
    border-bottom: 4px solid #479dc0;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: inset 0px 0px 6px rgba(43, 155, 168, 0.06);
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #1a0d2e;
    border: 3px solid #479dc0;
    cursor: pointer;
    transition: none;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.25);
}

.member-item:hover {
    background: #479dc0;
    color: #000;
    box-shadow: 3px 3px 0px #4a508e;
    transform: translate(-2px, -2px);
}

.sport-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #bf393e;
    background: #d99449;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-info strong {
    font-size: 0.95rem;
    color: #d99449;
    font-weight: 900;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

.member-info small {
    font-size: 0.8rem;
    color: #479dc0;
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    border-radius: 0;
    padding: 0;
    border: 4px solid #bf393e;
    background: #4a508e;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content {
    margin: 10px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #479dc0;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

.leaflet-popup-tip {
    background: #4a508e;
    border-left: 4px solid #bf393e;
    border-right: 4px solid #bf393e;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        padding: 10px 12px;
        gap: 8px;
    }

    .header h2 {
        font-size: 1.1rem;
    }

    .user-badge {
        font-size: 0.8rem;
    }

    .btn-small {
        padding: 6px 10px;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    /* Show icon-only buttons on mobile */
    .mobile-show {
        display: inline;
    }

    .mobile-hide {
        display: none;
    }

    /* Make buttons wrap better on mobile */
    .header > div:last-child {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        width: 100%;
    }

    .header > div:last-child button {
        font-size: 1rem;
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        border: 3px solid #bf393e;
    }

    h1 {
        font-size: 2rem;
    }

    .header {
        padding: 8px 10px;
        gap: 6px;
    }

    .header h2 {
        font-size: 0.95rem;
    }

    .user-badge {
        font-size: 0.7rem;
    }

    .btn-small {
        padding: 8px 4px;
        font-size: 1.1rem;
    }

    /* Stack buttons in 3 columns on small mobile */
    .header > div:last-child {
        grid-template-columns: repeat(3, 1fr);
    }

    .members-panel {
        max-height: 180px;
    }
}

/* Scrollbar Styling */
.members-panel::-webkit-scrollbar {
    width: 8px;
}

.members-panel::-webkit-scrollbar-track {
    background: #4a508e;
}

.members-panel::-webkit-scrollbar-thumb {
    background: #479dc0;
    border: 2px solid #4a508e;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.25);
}

.members-panel::-webkit-scrollbar-thumb:hover {
    background: #d99449;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.25);
}

.hint {
    font-size: 0.75rem;
    color: #4a508e;
    margin-top: 4px;
    /*text-shadow: 1px 1px 0px rgba(0,0,0,0.6);*/
}

