* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: #E8E0D5;
    color: #333;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Falling Petals Effect */
#falling-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #FFB6C1;
    border-radius: 50% 0 50% 0;
    opacity: 0.7;
    animation: fall linear infinite, sway ease-in-out infinite;
    transform-origin: center;
}

.petal::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #FFB6C1;
    border-radius: 50% 0 50% 0;
    transform: rotate(90deg);
}

@keyframes fall {
    0% {
        top: -10%;
        opacity: 0.7;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

@keyframes sway {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(20px) rotate(10deg);
    }

    50% {
        transform: translateX(0) rotate(0deg);
    }

    75% {
        transform: translateX(-20px) rotate(-10deg);
    }
}

/* Music Control Button */
.music-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7B1E1E, #9B2E2E);
    border: 3px solid #F5EADB;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.music-btn:active {
    transform: scale(0.95);
}

.music-icon {
    font-size: 28px;
    line-height: 1;
}

.music-btn.playing .music-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background-color: #E8E0D5;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar for Firefox */
    scrollbar-width: none;
    /* Hide scrollbar for IE and Edge */
    -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.container::-webkit-scrollbar {
    display: none;
}

.layout {
    height: 800px;
    padding: 8px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Initially hide all layouts except Layout 1 (Cover) */
.layout:not(.layout1) {
    display: none;
}

/* Show layouts when invitation is opened */
body.invitation-opened .layout:not(.layout1) {
    display: block;
}

/* Hide Layout 1 when invitation is opened */
body.invitation-opened .layout1 {
    display: none;
}

/* Style for open button in Layout 1 */
.open-invitation-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 2px solid #FFFFFF;
    color: #8B0000;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    margin: 6px auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.open-invitation-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.open-invitation-btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    font-size: 14px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.card {
    background-color: #F5EADB;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    position: relative;
    height: calc(800px - 16px);
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Layout 0: Wedding Cover Styles */
.layout0 {
    position: relative;
    overflow: hidden;
}

.cover-card {
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 50%, #C41E3A 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.corner-decoration {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid #FFD700;
    opacity: 0.6;
}

.corner-decoration.top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.corner-decoration.top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.corner-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.corner-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

.double-happiness-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 300px;
    color: rgba(255, 215, 0, 0.08);
    font-weight: 900;
    z-index: 0;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
}

.cover-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #FFD700;
}

.cover-title {
    font-size: 56px;
    font-weight: 900;
    color: #FFD700;
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.15em;
}

.cover-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #F5DEB3;
    letter-spacing: 0.3em;
    margin-bottom: 32px;
}

.cover-divider {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    margin: 24px auto;
}

.cover-names {
    font-size: 32px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.heart-symbol {
    color: #FFB6C1;
    font-size: 28px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.cover-date {
    margin: 24px 0;
}

.date-main {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
}

.date-sub {
    font-size: 14px;
    color: #F5DEB3;
}

.open-invitation-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #FFFFFF;
    color: #8B0000;
    font-size: 20px;
    font-weight: 900;
    padding: 16px 40px;
    border-radius: 50px;
    cursor: pointer;
    margin: 32px auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.open-invitation-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.open-invitation-btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    font-size: 24px;
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }
}

.cover-message {
    font-size: 16px;
    color: #F5DEB3;
    margin-top: 24px;
    font-style: italic;
}

/* Cover page hidden state */
.layout0.hidden {
    display: none;
}

/* Common Elements */
.footer-text {
    font-size: 24px;
    font-weight: 900;
    color: #7B1E1E;
    text-align: center;
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
}

.layout2 .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout3.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout4.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout5.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout6.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.photo-gallery-layout.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout9.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout10.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.footer-button {
    font-size: 20px;
    font-weight: 900;
    color: #7B1E1E;
    text-align: center;
    margin-top: auto;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-button:hover {
    transform: scale(1.05);
    color: #A02E2E;
}

.page-indicator {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #E8E0D5;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
}

/* Layout 1 Styles */
.greeting-banner {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="%23FFF5EADB" stroke="%237B1E1E" stroke-width="2" rx="4"/></svg>');
    background-color: #FFF5EADB;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 12px;
    margin: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.greeting-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #7B1E1E;
    border-radius: 4px;
    animation: borderExpand 0.6s ease-out 0.8s both;
}

@keyframes borderExpand {
    0% {
        clip-path: inset(50% 50% 50% 50%);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

.greeting-text {
    font-size: 14px;
    font-weight: 900;
    color: #7B1E1E;
    margin-bottom: 4px;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.greeting-english {
    font-size: 14px;
    font-weight: 700;
    color: #7B1E1E;
    letter-spacing: 0.9em;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.main-title {
    font-size: 40px;
    font-weight: 900;
    color: #7B1E1E;
    text-align: center;
    margin: 16px 20px 8px;
    line-height: 1;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.subtitle {
    font-size: 19px;
    color: #7B1E1E;
    text-align: center;
    margin: 0 20px 16px;
    font-weight: 700;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

/* Slide in from left animation */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right animation */
@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from bottom animation */
@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale in animation (from inside out) */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-container {
    position: relative;
    margin: 16px;
    height: 550px;
    overflow: hidden;
}

.diagonal-overlay {
    position: absolute;
    width: 500px;
    height: 100px;
    background-color: #7B1E1E;
    transform: rotate(-14deg);
    top: -60px;
    left: -50px;
}

.diagonal-overlay2 {
    position: absolute;
    width: 500px;
    height: 150px;
    background-color: #7B1E1E;
    transform: rotate(-14deg);
    top: 80px;
    left: -30px;
}

.extra-label {
    position: absolute;
    font-size: 40px;
    font-weight: 900;
    color: #F5EADB;
    transform: rotate(-10deg);
    top: -5px;
    left: 10px;
    z-index: 2;
}

.watermark-text,
.yes-text {
    position: absolute;
    font-size: 64px;
    font-weight: 900;
    color: #E8E0D5;
    opacity: 0.35;
    transform: rotate(-14deg);
    right: 20px;
    text-shadow: -1px -1px 0 #FFD700, 1px -1px 0 #FFD700, -1px 1px 0 #FFD700, 1px 1px 0 #FFD700;
    letter-spacing: 0.05em;
    z-index: 3;
}

.watermark-text {
    top: 100px;
    font-size: 64px;
}

.yes-text {
    top: 150px;
    font-size: 80px;
}

.couple-photo {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('Image/wedding_photo.webp') center/cover no-repeat;
    z-index: 5;
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

.wedding-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    margin: 0 16px;
    border-radius: 4px;
    z-index: 10;
}

.wedding-invitation-title {
    font-size: 14px;
    font-weight: 900;
    color: #7B1E1E;
    letter-spacing: 0.55em;
    margin-bottom: 8px;
    margin-left: 20px;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.wedding-info-container {
    display: flex;
    border: 2px solid transparent;
    border-radius: 4px;
    align-items: center;
    gap: 5px;
    padding: 8px;
    position: relative;
    overflow: hidden;
}

.wedding-info-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #7B1E1E;
    border-radius: 4px;
    animation: borderExpand 0.6s ease-out 0.8s both;
}

.wedding-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wedding-chars {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.wedding-chars .char {
    background-color: #7B1E1E;
    color: #E8E0D5;
    font-size: 14px;
    font-weight: 900;
    padding: 4px 8px;
}

.wedding-datetime {
    background-color: #7B1E1E;
    color: #E8E0D5;
    font-size: 14px;
    padding: 4px 8px;
    display: inline-block;
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.wedding-message {
    font-size: 12px;
    font-weight: 900;
    color: #7B1E1E;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 8px;
    border-radius: 4px;
    flex: 1;
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

/* Layout 2 Styles */
.header-banner {
    background-color: #7B1E1E;
    color: #E8E0D5;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    padding: 16px;
    margin: 12px;
    border-radius: 4px;
    letter-spacing: 0.2em;
}

.layout2 .header-banner {
    animation: slideInFromBottom 0.8s ease-out 0.6s both;
}

.photo-gallery-layout.active .header-banner {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.photos-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 24px 0;
}

.circular-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.layout2 .circular-photo {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.circular-photo:nth-child(1) {
    background: url('Image/chure.webp') center/cover no-repeat;
    animation-delay: 0.9s;
}

.circular-photo:nth-child(2) {
    background: url('Image/codau.webp') center/cover no-repeat;
    animation-delay: 1s;
}

.names-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin: 16px 0;
}

.bride-name,
.groom-name {
    font-size: 20px;
    font-weight: 700;
    color: #7B1E1E;
}

.layout2 .bride-name {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.layout2 .groom-name {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

.double-happiness {
    font-size: 56px;
    font-weight: 900;
    color: #7B1E1E;
}

.layout2 .double-happiness {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.invitation-text {
    text-align: center;
    padding: 32px;
    font-size: 16px;
    color: #7B1E1E;
}

.layout2 .invitation-text {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.invitation-text p {
    margin: 8px 0;
}

.invitation-text .greeting-bold,
.invitation-text .new-marriage {
    font-weight: 700;
    font-size: 18px;
    margin: 16px 0;
}

/* Layout1 specific - make footer-button stick to bottom */
.layout1 .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.layout1 .footer-button {
    margin-bottom: 10px;
    margin-top: 10px;
    animation: scaleIn 0.8s ease-out 0.8s both;
}


.layout2 .card {
    padding-bottom: 40px;
}

/* Layout 3 Styles */
.character-tiles {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.layout3.active .character-tiles {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.tile {
    text-align: center;
}

.layout3.active .tile {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.layout3.active .tile:nth-child(1) {
    animation-delay: 0.9s;
}

.layout3.active .tile:nth-child(2) {
    animation-delay: 1.0s;
}

.layout3.active .tile:nth-child(3) {
    animation-delay: 1.1s;
}

.layout3.active .tile:nth-child(4) {
    animation-delay: 1.2s;
}

.pinyin {
    font-size: 12px;
    color: #7B1E1E;
    font-weight: 700;
    margin-bottom: 4px;
}

.char-tile {
    width: 80px;
    height: 80px;
    background-color: #7B1E1E;
    color: #E8E0D5;
    font-size: 30px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.couple-photo-rect {
    height: 200px;
    margin: 16px;
    background: url('Image/layout3a.webp') center/cover no-repeat;
    border-radius: 4px;
}

.layout3.active .couple-photo-rect {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.couple-photo-rect2 {
    height: 200px;
    margin: 16px;
    background: url('Image/layout3b.webp') center/cover no-repeat;
    border-radius: 4px;
}

.layout3.active .couple-photo-rect2 {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
}

.layout3.active .countdown {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.countdown-item {
    text-align: center;
}

.countdown-value {
    font-size: 32px;
    font-weight: 900;
    color: #7B1E1E;
}

.countdown-label {
    font-size: 14px;
    font-weight: 700;
    color: #7B1E1E;
}

/* Layout 4 Styles */
.curved-photo-section {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.layout4.active .curved-photo-section {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.curved-photo {
    position: absolute;
    width: calc(100% + 60px);
    height: 100%;
    left: -60px;
    border-radius: 100px;
    background: url('Image/layout4.webp') center/cover no-repeat;
}

.vertical-text-panel {
    position: absolute;
    top: 40px;
    right: 0px;
    padding: 12px;
    display: flex;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.vertical-text {
    font-size: 16px;
    font-weight: 900;
    color: #E8E0D5;
    line-height: 1.5;
    letter-spacing: 0.05em;
    text-align: center;
}

.red-banner {
    position: relative;
    margin-top: -60px;
    min-height: 250px;
    background-color: #7B1E1E;
    padding: 16px;
    padding-top: 76px;
    padding-right: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
}

.layout4.active .red-banner {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

.vertical-text-white {
    font-size: 16px;
    margin-top: -20px;
    font-weight: 900;
    color: #E8E0D5;
    line-height: 1.5;
    letter-spacing: 0.05em;
    text-align: center;
}

.map-container {
    position: relative;
    margin: 16px;
    margin-top: -140px;
    height: 280px;
    border-radius: 200px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.layout4.active .map-container {
    animation: scaleIn 0.8s ease-out 0.8s both;
}


.venue-address {
    font-size: 18px;
    font-weight: 700;
    color: #7B1E1E;
    text-align: center;
    margin-top: 0px;
    padding-top: 20px;
}

.layout4.active .venue-address {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

/* Layout 5 Styles */
.wedding-time {
    letter-spacing: 0.2em;
}

.layout5.active .wedding-time {
    animation: slideInFromBottom 0.8s ease-out 0.6s both;
}

.photo-calendar-container {
    position: relative;
    height: 340px;
    margin: 8px 12px;
}

.photo-bg {
    width: 100%;
    height: 100%;
    background: url('Image/layout5.webp') center/cover no-repeat;
    border-radius: 0;
}

.layout5.active .photo-bg {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.calendar {
    position: absolute;
    top: 55%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 12px;
    padding: 12px;
    border-radius: 0;
}

.layout5.active .calendar {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.date-overlay {
    font-size: 40px;
    font-weight: 900;
    color: white;
    opacity: 0.4;
    margin-bottom: 8px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-header span {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    padding: 4px;
}

.calendar-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-week span {
    text-align: center;
    font-size: 14px;
    color: white;
    padding: 8px 4px;
}

.calendar-week span.selected {
    background-color: #7B1E1E;
    color: #E8E0D5;
    border-radius: 50%;
    font-weight: 700;
}

.red-border {
    position: absolute;
    top: 400px;
    left: 12px;
    right: 12px;
    bottom: 80px;
    border-left: 2px solid #7B1E1E;
    border-right: 2px solid #7B1E1E;
    border-bottom: 2px solid #7B1E1E;
    border-radius: 0;
    pointer-events: none;
    z-index: 1;
}

.layout5.active .red-border {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

.date-details {
    text-align: center;
    padding: 16px;
    margin-top: 150px;
    margin-left: auto;
    margin-right: auto;
    max-width: 90%;
}

.layout5.active .date-details {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.date-line {
    font-size: 16px;
    font-weight: 700;
    color: #7B1E1E;
    margin: 8px 0;
}

/* Layout 6 Styles */
.large-photo-overlay {
    position: relative;
    height: 410px;
    margin: 16px;
    border-radius: 0;
    overflow: hidden;
}

.layout6.active .large-photo-overlay {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.large-photo {
    width: 100%;
    height: 100%;
    background: url('Image/layout61.webp') center/cover no-repeat;
}

.photo-text-overlay1,
.photo-text-overlay2 {
    position: absolute;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.photo-text-overlay1 {
    bottom: 72px;
    left: 32px;
    font-size: 20px;
    font-weight: 900;
}

.photo-text-overlay2 {
    bottom: 24px;
    left: 32px;
    font-size: 12px;
    font-weight: 700;
}

.blessing-section {
    background-color: #F5EADB;
    border: 2px solid #7B1E1E;
    margin: 12px 16px;
    padding: 16dp;
    display: flex;
    gap: 16px;
    align-items: center;
}

.layout6.active .blessing-section {
    animation: slideInFromLeft 0.8s ease-out 0.8s both;
}

.blessing-columns {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: flex-start;
    align-items: center;
}

.blessing-col {
    font-size: 10px;
    font-weight: 700;
    color: #7B1E1E;
    line-height: 1.8;
    letter-spacing: 0.01em;
    text-align: center;
}

.small-photo {
    width: 160px;
    height: 160px;
    background: url('Image/layout62.webp') center/cover no-repeat;
    border-radius: 0;
    flex-shrink: 0;
}

.layout6.active .small-photo {
    animation: slideInFromRight 0.8s ease-out 0.8s both;
}

/* Photo Gallery Layout Styles */
.photo-gallery-layout.active .card {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.gallery-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: #7B1E1E;
    text-align: center;
    margin: 8px 20px 16px;
}

.photo-gallery-layout.active .gallery-subtitle {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.photo-grid-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}

.photo-gallery-layout.active .photo-grid-gallery {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.grid-photo-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1;
}

.photo-gallery-layout.active .grid-photo-item {
    animation: scaleIn 0.6s ease-out both;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(1) {
    animation-delay: 0.9s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(2) {
    animation-delay: 1.0s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(3) {
    animation-delay: 1.1s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(4) {
    animation-delay: 1.2s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(5) {
    animation-delay: 1.3s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(6) {
    animation-delay: 1.4s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(7) {
    animation-delay: 1.5s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(8) {
    animation-delay: 1.6s;
}

.photo-gallery-layout.active .grid-photo-item:nth-child(9) {
    animation-delay: 1.7s;
}

.grid-photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Lightbox Modal Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 100000;
}

.lightbox-close:hover {
    color: #FFB6C1;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 4px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Layout 9 Styles - Mừng Cưới */
.layout9 .gift-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    margin-top: 10px;
}

.layout9.active .gift-info {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.gift-card {
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #7B1E1E;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gift-name {
    font-size: 18px;
    font-weight: 900;
    color: #7B1E1E;
    text-align: center;
    margin: 0;
}

.qr-container {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 2px solid #7B1E1E;
    border-radius: 8px;
    padding: 8px;
}

.qr-code {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bank-info {
    width: 100%;
    text-align: left;
    color: #7B1E1E;
    font-size: 11px;
    line-height: 1.6;
}

.bank-info p {
    margin: 2px 0;
}

.bank-info strong {
    font-weight: 900;
}

/* Layout 10 Styles - RSVP Form */
.rsvp-header {
    background-color: #7B1E1E;
    padding: 16px;
    text-align: center;
}

.layout10.active .rsvp-header {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.char-row {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.char-row span {
    color: #E8E0D5;
    font-size: 40px;
    font-weight: 900;
}

.rsvp-photo-bg {
    position: relative;
    min-height: 300px;
    background: url('Image/layout32.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.layout10.active .rsvp-photo-bg {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

.rsvp-form {
    background-color: rgba(255, 255, 255, 0.6);
    padding: 24px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 360px;
}

.layout10.active .rsvp-form {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #7B1E1E;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #7B1E1E;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Noto Serif SC', serif;
    outline: none;
}

.form-input:focus {
    border-color: #5a1616;
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #7B1E1E;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Noto Serif SC', serif;
    outline: none;
    background-color: white;
    cursor: pointer;
}

.form-select:focus {
    border-color: #5a1616;
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #7B1E1E;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Noto Serif SC', serif;
    outline: none;
    resize: vertical;
    min-height: 80px;
}

.form-textarea:focus {
    border-color: #5a1616;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background-color: rgba(123, 30, 30, 0.1);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7B1E1E;
}

.radio-text {
    font-size: 14px;
    color: #7B1E1E;
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #7B1E1E;
    color: #E8E0D5;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
}

.submit-btn:hover {
    background-color: #5a1616;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Responsive Design */

/* Small Tablets and Large Phones */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }

    .layout {
        min-height: 100vh;
        height: auto;
    }

    .card {
        height: auto;
        min-height: calc(100vh - 16px);
    }

    /* Music button adjustment */
    .music-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }

    .music-icon {
        font-size: 24px;
    }
}

/* Standard Phones */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
        padding: 0;
    }

    .layout {
        min-height: 100vh;
        height: auto;
        padding: 6px;
    }

    .card {
        height: auto;
        min-height: calc(100vh - 12px);
        padding: 0;
        overflow: hidden;
    }

    /* Layout 1: Cover/Greeting */
    .greeting-banner {
        margin: 12px;
        padding: 8px;
    }

    .greeting-text,
    .greeting-english {
        font-size: 11px;
    }

    .main-title {
        font-size: 32px;
        margin: 12px 16px 6px;
    }

    .subtitle {
        font-size: 15px;
        margin: 0 16px 12px;
    }

    .photo-container {
        height: 400px;
        margin: 12px;
    }

    .diagonal-overlay {
        width: 150vw;
        height: 80px;
        left: -25%;
    }

    .diagonal-overlay2 {
        width: 150vw;
        height: 120px;
        left: -25%;
    }

    .extra-label {
        font-size: 28px;
        top: -10px;
        left: 8px;
    }

    .watermark-text {
        font-size: 40px;
        top: 80px;
        right: 10px;
    }

    .yes-text {
        font-size: 50px;
        top: 115px;
        right: 10px;
    }

    .wedding-details {
        margin: 0 12px;
        padding: 8px 12px;
    }

    .wedding-invitation-title {
        font-size: 11px;
        letter-spacing: 0.4em;
        margin-left: 15px;
    }

    .wedding-info-container {
        gap: 4px;
        padding: 6px;
    }

    .wedding-chars {
        gap: 6px;
        margin-bottom: 6px;
    }

    .wedding-chars .char {
        font-size: 12px;
        padding: 3px 6px;
    }

    .wedding-datetime {
        font-size: 12px;
        padding: 3px 6px;
    }

    .wedding-message {
        font-size: 10px;
        padding: 6px;
    }

    .footer-button {
        font-size: 16px;
        margin-bottom: 16px;
    }

    /* Layout 2: Circular Photos */
    .header-banner {
        font-size: 16px;
        padding: 12px;
        margin: 10px;
        letter-spacing: 0.15em;
    }

    .photos-container {
        padding: 12px;
        gap: 12px;
    }

    .circular-photo {
        width: 120px;
        height: 120px;
    }

    .names-container {
        gap: 8px;
        margin: 12px 0;
    }

    .bride-name,
    .groom-name {
        font-size: 20px;
    }

    .double-happiness {
        font-size: 28px;
    }

    .invitation-text {
        padding: 0 16px;
        margin-top: 12px;
    }

    .invitation-text p {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .greeting-bold {
        font-size: 14px !important;
    }

    .new-marriage {
        font-size: 14px !important;
    }

    .footer-text {
        font-size: 20px;
        margin-bottom: 8px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Layout 3: Character Tiles & Countdown */
    .character-tiles {
        gap: 6px;
        margin: 10px;
    }

    .tile {
        gap: 4px;
    }

    .char-tile {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .couple-photo-rect {
        height: 180px;
        margin: 10px;
    }

    .countdown {
        gap: 8px;
        margin: 16px 10px;
    }

    .countdown-item {
        gap: 4px;
    }

    .countdown-value {
        font-size: 32px;
        width: 70px;
        height: 70px;
    }

    .countdown-label {
        font-size: 12px;
    }

    .couple-photo-rect2 {
        height: 160px;
        margin: 10px;
    }

    /* Layout 4: Map & Location */
    .curved-photo-section {
        height: 260px;
    }

    .curved-photo {
        width: calc(100% + 40px);
        left: -40px;
        border-radius: 80px;
    }

    .vertical-text-panel {
        top: 30px;
        padding: 8px;
        gap: 12px;
    }

    .vertical-text {
        font-size: 14px;
    }

    .red-banner {
        margin-top: -50px;
        min-height: 200px;
        padding: 12px;
        padding-top: 60px;
        gap: 12px;
    }

    .vertical-text-white {
        font-size: 14px;
        margin-top: -15px;
    }

    .map-container {
        margin: 12px;
        margin-top: -100px;
        height: 220px;
        border-radius: 150px;
    }

    .venue-address {
        font-size: 15px;
        padding-top: 16px;
    }

    /* Layout 5: Calendar */
    .wedding-time {
        font-size: 16px;
        padding: 12px;
        margin: 10px;
    }

    .photo-calendar-container {
        height: 280px;
        margin: 6px 10px;
    }

    .calendar {
        margin: 0 10px;
        padding: 10px;
    }

    .date-overlay {
        font-size: 32px;
        margin-bottom: 6px;
    }

    .calendar-header span {
        font-size: 10px;
        padding: 3px;
    }

    .calendar-week span {
        font-size: 12px;
        padding: 6px 3px;
    }

    .red-border {
        top: 330px;
        left: 10px;
        right: 10px;
        bottom: 70px;
    }

    .date-details {
        padding: 12px;
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

    .date-line {
        font-size: 14px;
        margin-bottom: 4px;
    }

    /* Layout 6: Blessing Text */
    .large-photo-overlay {
        height: 240px;
        margin: 10px;
    }

    .large-photo {
        border-radius: 80px;
    }

    .photo-text-overlay1 {
        font-size: 16px;
        top: 12px;
        left: 12px;
        padding: 6px 10px;
    }

    .photo-text-overlay2 {
        font-size: 12px;
        bottom: 12px;
        right: 12px;
        padding: 6px 10px;
    }

    .blessing-section {
        margin: 12px;
        gap: 10px;
    }

    .blessing-columns {
        gap: 8px;
    }

    .blessing-col {
        font-size: 10px;
        padding: 2px 4px;
        min-width: 32px;
    }

    .small-photo {
        width: 120px;
        height: 200px;
        border-radius: 0;
        flex-shrink: 0;
    }

    /* Photo Gallery Layouts 7, 8, 8.5 */
    .photo-gallery-layout .card {
        padding: 12px;
    }

    .gallery-subtitle {
        font-size: 15px;
        margin: 6px 12px 12px;
    }

    .photo-grid-gallery {
        gap: 6px;
        padding: 10px;
        margin-bottom: 12px;
    }

    .grid-photo-item {
        border-radius: 3px;
    }

    /* Layout 9: Mừng Cưới */
    .layout9 .header-banner {
        font-size: 18px;
        padding: 12px;
        margin: 10px;
    }

    .layout9 .gift-info {
        gap: 10px;
        padding: 10px;
        margin-top: 8px;
    }

    .gift-card {
        padding: 10px;
        gap: 6px;
    }

    .gift-name {
        font-size: 16px;
    }

    .qr-container {
        margin: 8px 0;
        width: 200px;
        height: 200px;
    }

    .qr-code {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }

    .bank-info {
        gap: 4px;
    }

    .bank-info p {
        font-size: 13px;
    }

    /* Layout 10: RSVP Form */
    .rsvp-header {
        margin: 10px;
    }

    .char-row span {
        font-size: 32px;
        width: 70px;
        height: 70px;
        line-height: 70px;
    }

    .rsvp-photo-bg {
        margin: 10px;
        padding: 12px;
    }

    .rsvp-form {
        padding: 16px;
        gap: 12px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px;
        font-size: 14px;
    }

    .form-textarea {
        min-height: 70px;
    }

    .radio-option {
        padding: 6px;
    }

    .radio-text {
        font-size: 13px;
    }

    .submit-btn {
        padding: 14px;
        font-size: 16px;
    }
}

/* Small Phones */
@media (max-width: 375px) {
    .layout {
        padding: 4px;
    }

    .card {
        min-height: calc(100vh - 8px);
    }

    /* Layout 1 */
    .main-title {
        font-size: 28px;
        margin: 10px 12px 6px;
    }

    .subtitle {
        font-size: 13px;
    }

    .photo-container {
        height: 360px;
        margin: 10px;
    }

    .watermark-text {
        font-size: 32px;
        top: 70px;
    }

    .yes-text {
        font-size: 40px;
        top: 100px;
    }

    .footer-button {
        font-size: 14px;
    }

    /* Layout 2 */
    .circular-photo {
        width: 100px;
        height: 100px;
    }

    .bride-name,
    .groom-name {
        font-size: 18px;
    }

    .double-happiness {
        font-size: 24px;
    }

    .invitation-text p {
        font-size: 12px;
    }

    /* Layout 3 */
    .char-tile {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .countdown-value {
        font-size: 28px;
        width: 60px;
        height: 60px;
    }

    .couple-photo-rect {
        height: 150px;
    }

    .couple-photo-rect2 {
        height: 140px;
    }

    /* Layout 4 */
    .curved-photo-section {
        height: 240px;
    }

    .map-container {
        height: 200px;
        margin-top: -90px;
    }

    .red-banner {
        min-height: 180px;
    }

    /* Layout 5 */
    .photo-calendar-container {
        height: 260px;
    }

    .date-overlay {
        font-size: 28px;
    }

    .date-details {
        padding: 10px;
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Layout 6 */
    .large-photo-overlay {
        height: 220px;
    }

    .blessing-col {
        font-size: 10px;
        padding: 2px;
        min-width: 32px;
    }

    .small-photo {
        width: 120px;
        height: 180px;
        border-radius: 0;
        flex-shrink: 0;
    }

    /* Photo Gallery */
    .photo-grid-gallery {
        gap: 4px;
        padding: 8px;
    }

    /* Layout 9 */
    .qr-container {
        width: 180px;
        height: 180px;
    }

    .qr-code {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
    }

    .bank-info p {
        font-size: 12px;
    }

    /* Layout 10 */
    .char-row span {
        font-size: 28px;
        width: 60px;
        height: 60px;
        line-height: 60px;
    }

    .rsvp-form {
        padding: 12px;
        gap: 10px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 8px;
        font-size: 13px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 15px;
    }

    .footer-text {
        font-size: 18px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Layout 11: Guest Book (Lưu Bút) Styles */
.layout11 .header-banner {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.guestbook-container {
    padding: 0 20px;
    margin: 20px 0;
    overflow: visible;
    height: 480px;
    /* Fixed height to prevent pagination controls from jumping */
}

.guest-book-item {
    background: linear-gradient(135deg, #FFE5E9 0%, #FFD1DC 100%);
    border: 3px solid #C41E3A;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: none;
    /* Hidden by default, will be shown by pagination */
}

.guest-book-item.visible {
    display: block;
}

.guest-book-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
}

.guest-name-title {
    font-family: 'Brush Script MT', cursive, 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 700;
    color: #C41E3A;
    margin-bottom: 12px;
}

.guest-message-content {
    font-family: 'Comic Sans MS', cursive, 'Noto Serif SC', serif;
    font-size: 15px;
    font-style: italic;
    color: #5A5A5A;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.guest-book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(196, 30, 58, 0.2);
}

.guest-attendees {
    font-size: 14px;
    color: #7B1E1E;
    font-weight: 600;
}

.guest-date {
    font-size: 14px;
    color: #999;
    font-style: italic;
}

.layout11.active .header-banner {
    animation: slideInFromBottom 0.8s ease-out 0.8s both;
}

.layout11.active .guest-book-item {
    animation: scaleIn 0.6s ease-out both;
}

.layout11.active .guest-book-item:nth-child(1) {
    animation-delay: 0.3s;
}

.layout11.active .guest-book-item:nth-child(2) {
    animation-delay: 0.4s;
}

.layout11.active .guest-book-item:nth-child(3) {
    animation-delay: 0.5s;
}

.layout11.active .guest-book-item:nth-child(4) {
    animation-delay: 0.6s;
}

.layout11.active .guest-book-item:nth-child(5) {
    animation-delay: 0.7s;
}

.layout11.active .footer-text {
    animation: scaleIn 0.8s ease-out 0.8s both;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.pagination-btn {
    background: linear-gradient(135deg, #7B1E1E, #9B2E2E);
    color: #F5EADB;
    border: 2px solid #C41E3A;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Serif SC', serif;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #9B2E2E, #BB4E4E);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(123, 30, 30, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 6px;
}

.page-number {
    background-color: rgba(123, 30, 30, 0.1);
    color: #7B1E1E;
    border: 2px solid #C41E3A;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 35px;
    text-align: center;
}

.page-number:hover {
    background-color: rgba(196, 30, 58, 0.2);
    transform: translateY(-2px);
}

.page-number.active {
    background: linear-gradient(135deg, #C41E3A, #E02E5A);
    color: #F5EADB;
    border-color: #C41E3A;
}