* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Philosopher", sans-serif;
  font-optical-sizing: auto;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    /* font-family: "EB Garamond", serif; */
    background: linear-gradient(135deg, #f0f2f5 0%, #e8ebf0 50%, #dde1e6 100%);
    color: #2c3e50;
    line-height: 1.6;
    height: 100dvh;
    width: 100vw;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #d6dce5;
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.08),
        0 4px 24px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    flex-shrink: 0;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
}

.header::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.app-title {
    height: 54px;
}

.logo {
    width: 350px;
    height: auto;
    object-fit: contain;
}

.app-subtitle {
    font-size: 15px;
    color: #6c757d;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.main-container {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.map-container {
    width: 100%;
    height: 100%;
}

.floating-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    padding: 14px 24px;
    border-radius: 3px;
    border: 1px solid #d6dce5;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-width: calc(100% - 40px);
    backdrop-filter: blur(10px);
    position: relative;
}

.floating-info::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.floating-info p {
    font-size: 14px;
    color: #495057;
    text-align: center;
    margin: 0;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.search-container {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    margin: 0 auto;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    border: 1px solid #d6dce5;
    border-radius: 3px;
    padding: 0;
    display: flex;
    height: 50px;
    align-items: center;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.search-box::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

#location-search {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 16px;
    font-size: 15px;
    color: #374151;
    outline: none;
    font-weight: 500;
    border-radius: 3px 0 0 3px;
}

#location-search::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

#location-search:focus {
    color: #1f2937;
}

#search-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    border: none;
    border-left: 1px solid #d6dce5;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 0;
    min-width: 48px;
    min-height: 50px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

#clear-search-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    border: none;
    border-left: 1px solid #e5e7eb;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    height: 50px;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    padding: 14px 12px;
    font-size: 14px;
    min-width: 40px;
    min-height: 50px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

#search-btn::before,
#clear-search-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 3px;
    right: 3px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

#search-btn:hover,
#clear-search-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    color: #495057;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-0.5px);
}

#search-btn:active,
#clear-search-btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 50%, #d6dbdf 100%);
}



.search-results {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    border: 1px solid #d6dce5;
    border-top: none;
    border-radius: 0 0 3px 3px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 6px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
}

.search-results::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #1f2937;
}

.search-result-item:active {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
}

.search-result-icon {
    font-size: 16px;
    color: #6b7280;
    min-width: 20px;
    text-align: center;
}

.search-result-text {
    flex: 1;
    font-weight: 500;
}

.search-loading {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    border: 1px solid #d6dce5;
    position: relative;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .modal-content {
        margin: 0;
        width: 90%;
        max-width: 650px;
        height: auto;
        max-height: calc(100vh - 40px);
        border-radius: 3px;
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.25),
            0 8px 24px rgba(0, 0, 0, 0.15),
            0 40px 120px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    }
}

.modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    border-radius: 3px 3px 0 0;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
    border: 1px solid #d0d7de;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    font-weight: 600;
    position: relative;
}

.close-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 3px;
    right: 3px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.close-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    color: #495057;
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-0.5px);
}

.close-btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

.memory-form {
    padding: 28px;
}

.location-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8ff 50%, #e8f4fd 100%);
    padding: 16px 20px;
    border-radius: 3px;
    border: 1px solid #b3d9ff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 
        inset 0 1px 3px rgba(0, 123, 255, 0.08),
        inset 0 2px 6px rgba(0, 123, 255, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    position: relative;
}

.location-info::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.location-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    /* font-family: "EB Garamond", serif; */
    font-size: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 50%, #f8f9fa 100%);
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 3px 6px rgba(0, 0, 0, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 3px 6px rgba(0, 0, 0, 0.03),
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.character-counter {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.category-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

.category-grid::-webkit-scrollbar {
    width: 6px;
}

.category-grid::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.category-grid::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.category-grid::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.category-option {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #f3f4f6 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 10px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 4px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    width: 100%;
    white-space: nowrap;
}

.category-option::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 6px;
    right: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.category-option:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 6px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.category-option.selected {
    border-color: #2563eb;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 50%, #cffafe 100%);
    box-shadow: 
        0 4px 12px rgba(37, 99, 235, 0.15),
        0 6px 20px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 2px 4px rgba(37, 99, 235, 0.08),
        inset 0 -1px 0 rgba(37, 99, 235, 0.1);
}

.category-emoji {
    font-size: 18px;
    filter: 
        drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.category-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    flex: 1;
}

.category-option.selected .category-text {
    color: #1e40af;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.image-upload-container {
    border: 2px dashed #d1d5db;
    border-radius: 3px;
    padding: 24px;
    text-align: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 50%, #e5e7eb 100%);
    transition: all 0.2s ease;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 4px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-content: center;
    overflow: visible;
}

.image-upload-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.image-upload-container:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
}

.upload-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 30%, #f1f3f4 70%, #e9ecef 100%);
    border: 1px solid #d1d5db;
    border-radius: 3px;
    padding: 12px 20px;
    /* font-family: "EB Garamond", serif; */
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    display: block;
    margin: 0 auto;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 6px;
    right: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.upload-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 30%, #dee2e6 70%, #d6dbdf 100%);
    border-color: #9ca3af;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.upload-btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 50%, #d6dbdf 100%);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    padding: 16px;
    overflow: visible;
}

.image-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.12),
        0 6px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    border: 1px solid #991b1b;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 
        0 2px 6px rgba(220, 38, 38, 0.4),
        0 4px 12px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.remove-image:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.5),
        0 6px 20px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    flex: 1;
    padding: 16px 28px;
    border: 1px solid;
    border-radius: 3px;
    /* font-family: "EB Garamond", serif; */
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 6px 12px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
}

.btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.btn-secondary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 30%, #dee2e6 70%, #d6dbdf 100%);
    color: #6c757d;
    border-color: #ced4da;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 30%, #d6dbdf 70%, #ced4da 100%);
    color: #495057;
    border-color: #adb5bd;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 30%, #1d4ed8 70%, #1e40af 100%);
    color: white;
    border-color: #1e40af;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 30%, #1e40af 70%, #1e3a8a 100%);
    border-color: #1e3a8a;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.4),
        0 6px 20px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.memory-content {
    padding: 28px;
}

.memory-header {
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 20px;
}

.memory-category {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.memory-category-emoji {
    font-size: 22px;
    filter: 
        drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.memory-category-text {
    font-size: 15px;
    color: #6b7280;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.memory-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-story {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
    white-space: pre-wrap;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.memory-images {
    margin-bottom: 24px;
}

.memory-images {
    position: relative;
}

.memory-image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
    width: 100%;
    max-width: 350px;
}

.memory-images img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: filter 0.3s ease;
}

.memory-images img.blurred {
    filter: blur(20px);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    transition: opacity 0.3s ease;
}

.view-image-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 30%, #1d4ed8 70%, #1e40af 100%);
    color: white;
    border: 1px solid #1e40af;
    padding: 12px 20px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 8px;
}

.view-image-btn::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

.view-image-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 30%, #1e40af 70%, #1e3a8a 100%);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.4),
        0 6px 16px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.view-image-btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%);
}

.moderation-warning {
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #fca5a5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.memory-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    padding: 20px;
    border-radius: 3px;
    border: 1px solid #d6dce5;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 3px 6px rgba(0, 0, 0, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
}

.memory-meta::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.meta-item {
    text-align: center;
}

.meta-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.meta-value {
    font-size: 15px;
    color: #1f2937;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.memory-location {
    margin-top: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #e8f4fd 100%);
    border-radius: 3px;
    border: 1px solid #b3d9ff;
    box-shadow: 
        inset 0 1px 3px rgba(14, 165, 233, 0.08),
        inset 0 2px 6px rgba(14, 165, 233, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 -1px 0 rgba(14, 165, 233, 0.1);
    position: relative;
}

.memory-location::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.memory-location-label {
    font-size: 13px;
    color: #0369a1;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memory-location-text {
    font-size: 15px;
    color: #0c4a6e;
    font-weight: 600;
}

.memory-shared {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    backdrop-filter: blur(10px);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-left: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.05);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.leaflet-popup-content-wrapper {
    border-radius: 3px;
    border: 1px solid #d1d5db;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f1f3f4 100%);
}

.leaflet-popup-content {
    /* font-family: "EB Garamond", serif; */
    margin: 16px 20px;
}

.popup-memory-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    text-shadow: 
        0 1px 1px rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.popup-memory-category {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.popup-read-more {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 30%, #1d4ed8 70%, #1e40af 100%);
    color: white;
    border: 1px solid #1e40af;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    /* font-family: "EB Garamond", serif; */
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 
        0 2px 4px rgba(59, 130, 246, 0.3),
        0 4px 8px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    position: relative;
}

.popup-read-more::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.popup-read-more:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 30%, #1e40af 70%, #1e3a8a 100%);
    box-shadow: 
        0 4px 8px rgba(59, 130, 246, 0.4),
        0 6px 16px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.popup-read-more:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%);
}

.popup-create-memory::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    right: 4px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

.floating-action-btn {
    position: fixed;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 30%, #f1f3f4 70%, #e9ecef 100%);
    border: 1px solid #d1d5db;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.floating-action-btn::before {
    content: '';
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
}

.floating-action-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 30%, #dee2e6 70%, #d6dbdf 100%);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transform: translateY(-2px) scale(1.05);
}

.floating-action-btn:active {
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0) scale(0.98);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 50%, #d6dbdf 100%);
}

.search-toggle-btn {
    bottom: 92px;
}

.search-toggle-btn.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 30%, #93c5fd 70%, #60a5fa 100%);
    border-color: #3b82f6;
    color: #1e40af;
}

.random-memory-btn {
    bottom: 24px;
}

.random-memory-btn.spinning {
    animation: spinDice 0.8s ease-in-out;
}

@keyframes spinDice {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@media (max-width: 767px) {
    .header {
        padding: 16px 20px;
    }
    
    .app-title {
        font-size: 22px;
    }
    
    .floating-info {
        top: 16px;
        padding: 12px 20px;
    }
    
    .floating-info p {
        font-size: 13px;
    }
    
    .search-container {
        top: 70px;
        left: 16px;
        right: 16px;
        max-width: calc(100vw - 32px);
    }
    
    #location-search {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    #search-btn {
        padding: 12px 14px;
        font-size: 14px;
        min-width: 44px;
        border-left: 1px solid #d6dce5;
        min-height: 44px;
    }
    
    #clear-search-btn {
        min-width: 36px;
        padding: 12px 10px;
        font-size: 12px;
        border-left: 1px solid #e5e7eb;
        min-height: 44px;
    }
    
    .search-result-item {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .memory-form {
        padding: 20px;
    }
    
    .category-option {
        padding: 8px 12px;
    }
    
    .category-emoji {
        font-size: 16px;
    }
    
    .category-text {
        font-size: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .memory-meta {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .btn {
        padding: 14px 24px;
    }

    .floating-action-btn {
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .search-toggle-btn {
        bottom: 80px;
    }
    
    .random-memory-btn {
        bottom: 20px;
    }
}

@media (max-height: 600px) {
    .header {
        padding: 12px 20px;
    }
    
    .app-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .app-subtitle {
        font-size: 13px;
    }
} 