* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #0a0510;
    min-height: 100vh;
    font-family: 'Georgia', serif;
    padding: 20px;
    padding-top: 80px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0510 0%, #000 100%);
    z-index: -2;
}
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="10" cy="10" r="1.5" fill="white" opacity="0.3"/><circle cx="50" cy="30" r="1" fill="white" opacity="0.2"/><circle cx="80" cy="15" r="2" fill="white" opacity="0.15"/><circle cx="120" cy="45" r="1.5" fill="white" opacity="0.25"/><circle cx="160" cy="20" r="1" fill="white" opacity="0.2"/><circle cx="190" cy="60" r="2" fill="white" opacity="0.15"/><circle cx="30" cy="80" r="1" fill="white" opacity="0.3"/><circle cx="70" cy="95" r="1.5" fill="white" opacity="0.2"/><circle cx="110" cy="75" r="1" fill="white" opacity="0.25"/><circle cx="150" cy="100" r="2" fill="white" opacity="0.15"/><circle cx="180" cy="130" r="1.5" fill="white" opacity="0.2"/><circle cx="20" cy="150" r="1" fill="white" opacity="0.3"/><circle cx="60" cy="170" r="2" fill="white" opacity="0.15"/><circle cx="100" cy="140" r="1.5" fill="white" opacity="0.2"/><circle cx="140" cy="180" r="1" fill="white" opacity="0.25"/><circle cx="170" cy="160" r="2" fill="white" opacity="0.15"/></svg>');
    background-size: 200px 200px;
    z-index: -1;
    opacity: 0.5;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}
.page-header h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: #ff88aa;
    text-shadow: 0 0 40px #ff4499, 0 0 80px #ff2277;
    font-weight: 300;
    letter-spacing: 4px;
}
.page-header p {
    color: rgba(255, 200, 200, 0.5);
    font-size: 1rem;
    letter-spacing: 2px;
    margin-top: 8px;
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    padding: 12px 24px;
    background: rgba(255, 68, 102, 0.1);
    border: 1.5px solid rgba(255, 68, 102, 0.3);
    border-radius: 50px;
    color: #ff88aa;
    text-decoration: none;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.back-btn:hover {
    background: rgba(255, 68, 102, 0.2);
    border-color: #ff6688;
    transform: scale(1.05);
}
.back-btn:active {
    transform: scale(0.95);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.moment-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 68, 102, 0.12);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.moment-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 68, 102, 0.3);
    box-shadow: 0 15px 50px rgba(255, 68, 102, 0.08);
}
.moment-card .media {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #1a0a1a;
}
.moment-card .media-placeholder {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0a1a, #2a102a);
    color: rgba(255, 200, 200, 0.15);
    font-size: 4rem;
}
.moment-card .content {
    padding: 16px 18px 20px;
}
.moment-card .content .date {
    color: rgba(255, 200, 200, 0.25);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.moment-card .content h3 {
    color: #ffd966;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.moment-card .content p {
    color: rgba(255, 200, 200, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 300;
}
.moment-card .actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.moment-card .actions button {
    padding: 6px 14px;
    background: rgba(255, 68, 102, 0.08);
    border: 1px solid rgba(255, 68, 102, 0.15);
    border-radius: 20px;
    color: #ff88aa;
    font-size: 0.75rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}
.moment-card .actions button:hover {
    background: rgba(255, 68, 102, 0.15);
}
.moment-card .actions button.delete-btn:hover {
    border-color: #ff2244;
    color: #ff4466;
}

.add-btn {
    display: block;
    width: 100%;
    padding: 20px;
    background: rgba(255, 68, 102, 0.03);
    border: 2px dashed rgba(255, 68, 102, 0.15);
    border-radius: 20px;
    color: rgba(255, 200, 200, 0.3);
    font-size: 1.1rem;
    font-family: 'Georgia', serif;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    touch-action: manipulation;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.add-btn:hover {
    background: rgba(255, 68, 102, 0.06);
    border-color: rgba(255, 68, 102, 0.3);
    color: rgba(255, 200, 200, 0.5);
}
.add-btn:active {
    transform: scale(0.97);
}
.add-btn .icon {
    font-size: 2.5rem;
}

/* ================================================================ */
/*  МОДАЛЬНЫЕ ОКНА                                                  */
/* ================================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: rgba(20, 10, 30, 0.95);
    border: 1px solid rgba(255, 68, 102, 0.15);
    border-radius: 24px;
    padding: 30px;
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-content .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: rgba(255, 200, 200, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-content .close:hover {
    color: #ff88aa;
}
.modal-content h2 {
    color: #ff88aa;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
}
.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 68, 102, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}
.modal-content input:focus,
.modal-content textarea:focus {
    border-color: rgba(255, 68, 102, 0.4);
}
.modal-content textarea {
    min-height: 100px;
    resize: vertical;
}
.modal-content input[type="file"] {
    padding: 10px;
    border: 1.5px dashed rgba(255, 68, 102, 0.2);
}
.modal-content button {
    width: 100%;
    padding: 14px;
    background: rgba(255, 68, 102, 0.12);
    border: 1.5px solid rgba(255, 68, 102, 0.3);
    border-radius: 12px;
    color: #ff88aa;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-content button:hover {
    background: rgba(255, 68, 102, 0.2);
}

.comment-input {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 68, 102, 0.1);
}
.comment-input input,
.comment-input textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 68, 102, 0.15);
    border-radius: 12px;
    color: #fff;
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}
.comment-input textarea {
    min-height: 60px;
    resize: vertical;
}
.comment-input button {
    width: 100%;
    padding: 10px;
    background: rgba(255, 68, 102, 0.1);
    border: 1.5px solid rgba(255, 68, 102, 0.2);
    border-radius: 12px;
    color: #ff88aa;
    font-size: 0.9rem;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}
.comment-input button:hover {
    background: rgba(255, 68, 102, 0.2);
}

.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 68, 102, 0.05);
}
.comment-item .author {
    color: #ff88aa;
    font-weight: 400;
    font-size: 0.85rem;
}
.comment-item .text {
    color: rgba(255, 200, 200, 0.6);
    font-size: 0.9rem;
    margin-top: 4px;
}
.comment-item .time {
    color: rgba(255, 200, 200, 0.2);
    font-size: 0.65rem;
}

/* ================================================================ */
/*  АДАПТАЦИЯ                                                       */
/* ================================================================ */

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .moment-card .media,
    .moment-card .media-placeholder {
        height: 180px;
    }
    .back-btn {
        top: 15px;
        left: 15px;
        padding: 10px 18px;
        font-size: 0.8rem;
    }
    body {
        padding: 15px;
        padding-top: 70px;
    }
    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .moment-card .media,
    .moment-card .media-placeholder {
        height: 140px;
    }
    .modal-content {
        padding: 16px;
    }
}