/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgb(18, 22, 221);
}

.user-info span {
    font-weight: 500;
}

/* User dropdown menu */
.user-dropdown {
    position: relative;
}

.user-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgb(235, 12, 12);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.user-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.user-menu-item:first-child {
    border-radius: 10px 10px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 10px 10px;
}

.user-menu-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.user-menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* Tlačítka */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #333;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Hlavní kontejner */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Mapa sekce */
.map-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.address-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.address-input:focus {
    border-color: #667eea;
}

#map {
    height: 300px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

/* Informační sekce */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Formuláře */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
}

/* Uživatelský koutek */
.user-dashboard {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-item {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.dashboard-item:hover {
    transform: scale(1.05);
    color: white;
}

/* Responzivní design pro mobily */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .address-input {
        min-width: 100%;
    }
    
    #map {
        height: 250px;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Animace načítání */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifikace */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 80%;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: #e74c3c;
}

.toast.warning {
    background: #f39c12;
}

.toast.success {
    background: #27ae60;
}

/* Důležité zprávy budou mít zvýrazněný vzhled */
.toast.important {
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    border-left: 5px solid white;
}

/* Skrytí elementů */
.hidden {
    display: none !important;
}

/* Modální okno pro přihlášení */
#loginModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#loginModal .form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#loginModal h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
