@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Caveat:wght@400;600&display=swap');

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

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: linear-gradient(135deg, #fdf5f7 0%, #f8e8ed 100%);
    background-attachment: fixed;
    color: #4a3540;
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid rgba(200, 120, 150, 0.2);
    margin-bottom: 40px;
}

h1 {
    font-family: 'Caveat', cursive;
    font-size: 48px;
    font-weight: 600;
    color: #b86b8a;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.sort-toggle {
    display: flex;
    gap: 6px;
}

.sort-toggle .btn {
    padding: 8px 14px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #e8c0d0;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.7);
    color: #a05070;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #d4a0b8;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #d4899f 0%, #b86b8a 100%);
    border-color: #b86b8a;
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e099af 0%, #c87b9a 100%);
    border-color: #a85b7a;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Gallery Grid - Masonry-like */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

.photo-card {
    background: #fffbfc;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(180, 100, 130, 0.08),
        0 8px 24px rgba(180, 100, 130, 0.06);
    transition: all 0.4s ease;
    position: relative;
}

.photo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f0c0d0, #f8d8e4, #f0c0d0);
}

.photo-card:hover {
    transform: translateY(-5px) rotate(-0.5deg);
    box-shadow:
        0 8px 16px rgba(180, 100, 130, 0.12),
        0 16px 32px rgba(180, 100, 130, 0.08);
}

.photo-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8e8ed;
    cursor: pointer;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: saturate(0.95);
}

.photo-card:hover .photo-wrapper img {
    transform: scale(1.03);
}

.photo-info {
    padding: 18px 20px;
    background: linear-gradient(180deg, #fffbfc 0%, #fdf7f9 100%);
}

.photo-title {
    font-family: 'Caveat', cursive;
    font-size: 26px;
    font-weight: 600;
    color: #b86b8a;
    margin-bottom: 8px;
    line-height: 1.2;
}

.caption {
    font-size: 14px;
    margin-bottom: 10px;
    color: #6a5560;
    font-style: italic;
    line-height: 1.5;
}

.location {
    font-size: 14px;
    color: #a07088;
    margin-bottom: 6px;
    font-weight: 500;
}

.photo-date {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    color: #c08098;
    margin-bottom: 12px;
}

.photo-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(200, 120, 150, 0.15);
}

.inline-form {
    display: inline;
}

.btn-like {
    background: none;
    border: none;
    color: #e08090;
    cursor: pointer;
    font-size: 15px;
    padding: 6px 10px;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.2s;
    border-radius: 15px;
}

.btn-like:hover {
    background: rgba(224, 128, 144, 0.1);
    color: #c06070;
}

.btn-delete {
    background: none;
    border: none;
    color: #c0a0b0;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 10px;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.2s;
    border-radius: 15px;
}

.btn-delete:hover {
    background: rgba(180, 100, 130, 0.1);
    color: #a07080;
}

.date {
    color: #a08060;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #a07088;
    font-size: 18px;
    font-style: italic;
}

.empty-state a {
    color: #b86b8a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Upload Form */
.upload-form {
    max-width: 450px;
    margin: 0 auto;
    background: #fffbfc;
    padding: 40px 35px;
    border-radius: 8px;
    box-shadow:
        0 4px 12px rgba(180, 100, 130, 0.08),
        0 12px 32px rgba(180, 100, 130, 0.06);
    position: relative;
}

.upload-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f0c0d0, #e8b0c0, #f0c0d0);
    border-radius: 8px 8px 0 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
    color: #8a5070;
    letter-spacing: 0.5px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 2px dashed #e8c0d0;
    border-radius: 8px;
    background: #fdf7f9;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group input[type="file"]:hover {
    border-color: #d4a0b8;
    background: #fffbfc;
}

.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e8d0d8;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    background: #fdf7f9;
    color: #4a3540;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d090a8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(200, 120, 150, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e8d0d8;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 16px;
    background: #fdf7f9;
    color: #4a3540;
    transition: all 0.3s;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #b090a0;
    font-size: 13px;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 15px;
}

.alert-error {
    background: linear-gradient(135deg, #fdf2f4 0%, #fce8ec 100%);
    color: #8b4050;
    border: 1px solid #e8c0c8;
}

.alert-success {
    background: linear-gradient(135deg, #f4f9f2 0%, #e8f5ec 100%);
    color: #4a6b5a;
    border: 1px solid #c0dcc8;
}

.alert a {
    margin-left: 12px;
    color: inherit;
    font-weight: 600;
}

/* Preview */
.preview-container {
    max-width: 450px;
    margin: 30px auto 0;
    text-align: center;
}

.preview-container h3 {
    margin-bottom: 15px;
    font-family: 'Caveat', cursive;
    font-size: 24px;
    font-weight: 400;
    color: #b86b8a;
}

#preview-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(180, 100, 130, 0.15);
}

/* Login Page Styles */
.login-container {
    max-width: 380px;
    margin: 0 auto;
    padding-top: 15vh;
    text-align: center;
}

.login-form {
    background: #fffbfc;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow:
        0 4px 12px rgba(180, 100, 130, 0.08),
        0 16px 40px rgba(180, 100, 130, 0.1);
    position: relative;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #f0c0d0, #e8b0c0, #f0c0d0);
    border-radius: 12px 12px 0 0;
}

.login-form h1 {
    margin-bottom: 8px;
    font-family: 'Caveat', cursive;
    font-size: 52px;
    color: #b86b8a;
}

.login-form p {
    color: #a07088;
    margin-bottom: 30px;
    font-size: 16px;
    font-style: italic;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 16px;
    border: 1px solid #e8d0d8;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    margin-bottom: 20px;
    text-align: center;
    background: #fdf7f9;
    color: #4a3540;
    letter-spacing: 3px;
    transition: all 0.3s;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: #d090a8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(200, 120, 150, 0.1);
}

.login-form input[type="password"]::placeholder {
    letter-spacing: normal;
    color: #c0a0b0;
}

/* Map Page */
#map {
    height: calc(100vh - 160px);
    width: 100%;
    border-radius: 12px;
    box-shadow:
        0 4px 12px rgba(180, 100, 130, 0.08),
        0 12px 32px rgba(180, 100, 130, 0.06);
    border: 3px solid #fffbfc;
}

.photo-popup {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
}

.photo-popup img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.photo-popup .caption {
    font-size: 14px;
    margin-bottom: 4px;
    font-style: italic;
    color: #4a3540;
}

.photo-popup .location {
    font-size: 13px;
    color: #a07088;
}

.no-photos {
    text-align: center;
    padding: 80px 20px;
    color: #a07088;
    font-size: 18px;
    font-style: italic;
}

.no-photos a {
    color: #b86b8a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Decorative elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(200, 120, 150, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 150, 180, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 53, 64, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 4px;
    max-width: 85vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    text-align: center;
    padding: 20px 20px 0 20px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 12px 40px rgba(100, 50, 70, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.15);
    transform: rotate(-1deg);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.modal-content::before {
    display: none;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-content img {
    display: block;
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.modal-info {
    padding: 24px 24px 32px 24px;
    background: #fff;
    text-align: center;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.modal-info .photo-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.modal-info .caption {
    font-size: 16px;
    margin-bottom: 8px;
}

.modal-info .location {
    margin-bottom: 4px;
    text-align: left;
}

.modal-info .photo-date {
    margin-bottom: 0;
    text-align: left;
}
