body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
}

nav .brand {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1, h2 {
    color: #2c3e50;
}

.btn, button {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover, button:hover {
    background: #2980b9;
}

.btn-present {
    background: #27ae60;
}

.btn-present:hover {
    background: #219150;
}

.btn.active {
    background: #2c3e50;
}

.scan-form {
    margin-bottom: 1rem;
}

.days-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.days-table th,
.days-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.days-table th {
    background: #ecf0f1;
}

.mode-switch {
    margin-bottom: 1rem;
}

.folder-filter {
    margin-bottom: 1rem;
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.folder-filter label {
    margin-right: 1rem;
    font-weight: bold;
}

.folder-filter input {
    margin-right: 0.25rem;
}

.edited-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: #3498db;
    color: white;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
}

.group-versions {
    list-style: none;
    padding: 0;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.group-versions li {
    padding: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.group-versions li:last-child {
    border-bottom: none;
}

.hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-thumb {
    position: relative;
    display: block;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.photo-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.photo-thumb .filename {
    display: block;
    padding: 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.folder-A { background: #e74c3c; }
.folder-B { background: #f39c12; }
.folder-C { background: #27ae60; }
.folder-D { background: #9b59b6; }

.photo-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.photo-preview img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.photo-meta table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.photo-meta th,
.photo-meta td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.photo-meta th {
    background: #ecf0f1;
    width: 40%;
}

#map,
#day-map {
    height: 400px;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gpx-panel {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.gpx-panel h2 {
    margin-top: 0;
}

.gpx-panel label {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: bold;
}

.gpx-actions {
    margin-top: 0.75rem;
}

.metadata-form label {
    display: block;
    margin-top: 0.75rem;
    font-weight: bold;
}

.metadata-form input,
.metadata-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
}

.metadata-form button {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .photo-layout {
        grid-template-columns: 1fr;
    }
}


.breadcrumb {
    font-size: 1.1em;
    margin-bottom: 1rem;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb .sep {
    margin: 0 0.5rem;
    color: #7f8c8d;
}

/* Kategorie tlacitka na strance fotografie */
.category-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-buttons .category-btn {
    min-width: 3rem;
    font-weight: bold;
}

.category-buttons .category-btn.category-A {
    background-color: #c0392b;
}

.category-buttons .category-btn.category-B {
    background-color: #e67e22;
}

.category-buttons .category-btn.category-C {
    background-color: #27ae60;
}

.category-buttons .category-btn.category-D {
    background-color: #2980b9;
}

.category-buttons .category-btn:disabled {
    opacity: 1;
    cursor: default;
}

.category-buttons .category-btn:not(:disabled) {
    background-color: #95a5a6;
}

.category-buttons .category-btn:not(:disabled):hover {
    background-color: #7f8c8d;
}

.photo-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.strip-item {
    flex: 0 0 auto;
    width: 120px;
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
    opacity: 0.7;
    border: 3px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.strip-item.current {
    opacity: 1;
    border-color: #2c3e50;
    transform: scale(1.05);
}

.strip-item:hover {
    opacity: 1;
}

.photo-title {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.photo-title #photo-title-input {
    font-size: inherit;
    font-weight: bold;
    font-family: inherit;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 300px;
}

.photo-title .btn {
    padding: 0.1rem 0.35rem;
    margin-left: 0.1rem;
    font-size: 0.65em;
    vertical-align: super;
    background: transparent;
    color: #999;
    opacity: 0.6;
}

.photo-title .btn:hover {
    background: transparent;
    color: #333;
    opacity: 1;
}

.present-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 10px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    vertical-align: middle;
}

.present-link:hover {
    background: #219150;
}
