:root {
    --bg-color: #0D0E15;
    --accent-cyan: #00E5FF;
    --accent-orange: #FFAB00;
    --accent-red: #FF3D71;
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: #FFFFFF;
    font-family: var(--font-primary);
    overflow: hidden; /* Zamezí scrollbaru u 100vh mapy */
}

/* Hlavička aplikace */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 14, 21, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-cyan);
    z-index: 1000;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.1);
}

#app-header h1 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    letter-spacing: 1px;
}

#app-header h1 span {
    color: var(--accent-cyan);
}

/* Map container - 100% viewport */
#map {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1;
}

/* Cyber-tech Dark Mode - Invert OSM tiles */
.leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.2);
}

/* Spodní panel (bottom-sheet) příprava pro mobil */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 14, 21, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent-cyan);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    padding: 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.bottom-sheet.active {
    transform: translateY(0);
}

/* Styly pro SVG piny na mapě (zářící efekt) */
.cyber-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
}

.cyber-marker svg {
    filter: drop-shadow(0 0 6px currentColor);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.cyber-marker:hover svg {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px currentColor);
}

/* Detail Sheet Content */
#detail-sheet {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-primary);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

#detail-title {
    font-size: 1.5rem;
    margin-right: 30px;
}

.detail-info {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-info p {
    display: flex;
    align-items: center;
}

.detail-info p span {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 8px;
    font-weight: 600;
}

.status-working { color: var(--accent-cyan); }
.status-broken { color: var(--accent-red); }
.status-unknown { color: var(--accent-orange); }

.last-updated {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
}

.last-updated span {
    background: transparent !important;
    padding: 0 !important;
    margin-left: 5px !important;
    font-weight: normal !important;
}

/* Navigation Buttons Grid */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-btn.waze { border-color: #33ccff; }
.nav-btn.google { border-color: #4285F4; }
.nav-btn.mapycz { border-color: #cc0000; }
.nav-btn.apple { border-color: #A3AAAE; }

/* Report button */
.report-btn {
    margin-top: 10px;
    padding: 12px;
    background: transparent;
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-btn:hover {
    background: rgba(255, 171, 0, 0.1);
}

/* FAB Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-cyan);
    color: var(--bg-color);
    border: none;
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), bottom 0.3s ease;
    z-index: 900;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8);
}

.fab.hidden {
    transform: scale(0);
    pointer-events: none;
}

/* Cancel Add Mode Button */
#cancel-add-mode {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-family: var(--font-primary);
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 61, 113, 0.5);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#cancel-add-mode:hover {
    background: #ff1c55;
    box-shadow: 0 6px 20px rgba(255, 61, 113, 0.8);
}

#cancel-add-mode.hidden {
    display: none;
}

/* Dialogs */
.cyber-dialog {
    margin: auto;
    background: rgba(13, 14, 21, 0.95);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    backdrop-filter: blur(8px);
}

.cyber-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.dialog-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dialog-content h3 {
    margin-bottom: 10px;
    color: var(--accent-cyan);
    font-family: var(--font-primary);
}

.close-dialog-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.9rem;
    color: #ccc;
}

.form-group input[type="text"],
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-family: var(--font-primary);
    outline: none;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    border-color: var(--accent-cyan);
}

.form-group option {
    background: var(--bg-color);
    color: #fff;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.submit-btn {
    background: var(--accent-cyan);
    color: var(--bg-color);
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--accent-cyan);
}

.coords-display {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-orange);
}

/* Desktop view pro boční panel */
@media (min-width: 768px) {
    .bottom-sheet {
        top: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        border-top: none;
        border-right: 1px solid var(--accent-cyan);
        transform: translateX(-100%);
        padding-top: 80px; /* prostor pod hlavičkou */
        padding-bottom: 20px;
    }

    .bottom-sheet.active {
        transform: translateX(0);
    }
}
