* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    --color-primary: #f8f7f1;
    --color-secondary: #FFFF00;
    --color-accent: #ff5858;
    --color-light: #f5f5f5;
    --color-dark: #333;

    --heading-large: clamp(4rem, 3.0196rem + 4.183vw, 6rem);
    --heading-medium: clamp(2.5rem, 2.2549rem + 1.0458vw, 3rem);
    --heading-small: clamp(1.5rem, 1.8137rem + 0.2614vw, 2rem);
    --text-normal: 1rem;
    --text-small: 0.875rem;
}
body {
    font-family: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1rem;
    background: var(--color-primary);
    color: var(--color-dark);
    min-height: 100vh;
}
main {
    position: relative;
    z-index: 1;
    overflow-x: clip; 
}
.container {
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 40px;
}
h1, h2, h3 {
    font-weight: 500;
    line-height: 1.2;
}
p, span {
    font-weight: 400;
    line-height: 1.25;
}
button {
    font-family: inherit;
}
.svg-line-container {
    position: absolute;
    top: 100px;
    bottom: 0;
    /* left: 50%; */
    left: 0;
    /* transform: translate(-50%, 0); */
    max-width: 100%;
    overflow-x: clip;
    z-index: 0;
}
.svg-line-container svg {
    overflow: visible;
    width: 1050px;
    z-index: 0;
}
form label {
    display: block;
    color: var(--color-dark);
    font-weight: 500;
    font-size: var(--text-normal);
}
form input,
form textarea {
    padding: 12px 24px;
    border-radius: 16px;
    font-family: inherit;
    font-size: var(--text-normal);
    border: 1.5px solid rgba(0, 0, 0, 0.4);
}
form input:focus,
form textarea:focus {
    border-color: rgba(0, 0, 0, 1);
}
form input:focus-visible,
form textarea:focus-visible {
    outline: none;
}
form textarea {
    resize: vertical;
    min-height: 100px;
}
form .important-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}
form button[type=submit] {
    width: fit-content;
    margin: 0 auto;
    background-color: var(--color-secondary);
    color: var(--color-dark);
    border-radius: 16px;
    border: 2px solid var(--color-dark);
    font-size: var(--text-normal);
    font-family: inherit;
    cursor: pointer;
    padding: 16px 40px;
    transition: transform 0.2s;
}
input[type="file"] {
    padding: 10px;
    cursor: pointer;
}
header {
    background-color: var(--color-primary);
	box-shadow: 0px 1px 8px 0px rgba(0, 0, 0, 0.1);
    color: white;
    padding-block: 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: top 0.2s ease-out;
}
header.hidden {
    top: -120px;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.header-content .logo {
    width: 150px;
}
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.main-nav ul li a {
    padding: 1rem;
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-normal);
    transition: color 0.3s;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}
.year-select {
    padding: 12px 24px 12px 24px;
    border: 1.5px solid #333;
    border-radius: 16px;
    background: var(--color-secondary);
    color: #333;
    font-family: inherit;
    font-size: var(--text-normal);
    cursor: pointer;
    appearance: none;
    backdrop-filter: blur(10px);
}
.year-select:focus {
    outline: none;
    border-color: white;
}

/* Home page */
section.hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.1;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 20px;
    padding-block: 100px;
    margin-bottom: 100px;
    position: relative;
}
.hero-container .flowers {
    position: absolute;
    width: 200px;
    left: -60px;
    bottom: -150px;
    z-index: -1;
}
.hero-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.hero-video {
    position: relative;
}
.hero-video::before {
    content: '';
    position: absolute;
    top: -83px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    height: 100px;
    aspect-ratio: 2.34;
    background-image: url(../images/flower-bouquet.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.year-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}
.year-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}
.year-title {
    font-family: "Rouge Script", -apple-system, 'Segoe UI', sans-serif;
    font-size: var(--heading-large);
    font-weight: 700;
    color: var(--color-accent);
}
.year-count {
    font-size: var(--text-small);
    color: #888;
    background: var(--color-secondary);
    padding: 5px 15px;
    border-radius: 20px;
}
.image-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.image-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    will-change: transform;
}
.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.image-wrapper {
    position: relative;
    width: 100%;
    background: #f0f0f0;
    cursor: pointer;
}
.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s;
}
.image-wrapper img:hover {
    opacity: 0.95;
}
.image-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.image-date {
    font-size: var(--text-small);
    text-align: center;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}
.image-title {
    font-size: var(--heading-small);
    font-weight: 500;
    text-align: center;
    color: #333;
    margin-bottom: 16px;
}
.image-description {
    font-size: var(--text-normal);
    text-align: center;
    color: #666;
    margin-bottom: 16px;
}
.image-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.image-actions .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 12px;
    font-size: var(--text-small);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-comment {
    background: #667eea;
    color: white;
}
.btn-comment:hover {
    background: #5568d3;
}
.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.share-buttons button svg {
    width: 1.25rem;
    height: 1.25rem;
}
.share-buttons button {
    border: none;
    border-radius: 50%;
    padding: 8px;
    display: inline-flex;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-whatsapp {
    background: #25D366;
    color: white;
}
.btn-whatsapp:hover {
    background: #1da851;
}
.btn-facebook {
    background: #1877f2;
    color: white;
}
.btn-facebook:hover {
    background: #145dbf;
}
.comments-section {
    margin-top: 20px;
    border-top: 1px solid #e8e8e8;
}
.comment-form {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 12px;
    display: none;
}
.comment-form.active {
    display: flex;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}
.comment-form textarea {
    resize: vertical;
    min-height: 80px;
}
.comment-form button[type="submit"] {
    margin: 0;
    padding: 8px 16px;
    font-size: var(--text-small);
    border-radius: 12px;
}
.comment-list {
    margin-top: 15px;
}
.comment {
    padding: 12px;
    background: #f4f4f4;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.comment-author {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 4px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.comment-author svg {
    width: 1.25rem;
    height: 1.25rem;
}
.comment-text {
    font-size: var(--text-small);
    color: var(--color-dark);
}
.comment-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.comment-actions .btn {
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-block;
}
.comment-actions .approve-btn {
    background: #4CAF50;
}
.comment-actions .delete-btn {
    background: #f44336;
}
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox.active {
    display: flex;
}
.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}
.lightbox-close svg {
    width: 2rem;
    height: 2rem;
}
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #888;
}
.empty-state svg {
    width: 100px;
    height: 100px;
    opacity: 0.3;
    margin-bottom: 20px;
}
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 1500;
}
.scroll-top:hover {
    background: #5568d3;
    transform: translateY(-3px);
}
.scroll-top.visible {
    display: flex;
}
.file-info {
    margin-top: 8px;
    font-size: var(--text-small);
    color: #888;
}
.message {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: var(--text-small);
    width: 100%;
}
.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login form */
.form-container {
    margin-top: 50px;
    margin-inline: auto;
    padding: 50px;
    max-width: min(600px, 100%);
    background-color: var(--color-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}
.form-container h1 {
    text-align: center;
}
.login-form,
.image-upload-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.login-form input,
.image-upload-form input,
.image-upload-form textarea {
    width: 100%;
}
footer {
    padding-block: 80px 20px;
    position: relative;
    overflow-x: hidden;
}
footer .flowers {
    position: absolute;
    height: 120px;
    right: -40px;
    top: 40px;
    z-index: -1;
    transform: rotate(160deg);
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}
.footer-content .logo {
    width: 200px;
}
.footer-content p {
    font-size: var(--text-small);
    color: var(--color-dark);
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 100px;
    }
    .hero h1 {
        text-align: center;
    }
}
@media (max-width: 768px) {
    .container {
        padding-inline: 20px;
    }
    .menu-toggle {
        display: flex;
    }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px;
        border-top: 1px solid #eee;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.3s ease, max-height 0.4s ease, visibility 0.3s ease;
    }
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        max-height: 32rem;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    .main-nav li {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .main-nav a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
    }
    .hero-container {
        gap: 80px;
    }
    .hero-container .flowers {
        width: 150px;
        left: -20px;
        bottom: -50px;
    }
    .hero-video::before {
        top: -65px;
        height: 80px;
    }
    .image-actions {
        justify-content: center;
    }
    .comment-form button[type="submit"] {
        align-self: center;
    }
	.form-container {
		padding-inline: 20px;
	}
    footer .flowers {
        height: 80px;
    }
    .scroll-top {
        bottom: 20px;
        right: 20px;
    }
}
