@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

body {
    font-family: 'Zen Maru Gothic', 'Microsoft JhengHei', 'PingFang TC', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #fbd3e9, #bb99dd);
    color: #5d4037;
    /* Softer dark brown */
    position: relative;
    min-height: 100vh;
    padding-bottom: 80px;
    box-sizing: border-box;
    letter-spacing: 0.05em;
    /* Add some breathing room */
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 登入頁面 --- */
#login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

#login h1 {
    margin-bottom: 20px;
    color: #6d3a8c;
    font-weight: 700;
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(109, 58, 140, 0.1);
    /* Cute pop effect */
    font-size: 2.5em;
}

#login input[type="password"] {
    padding: 12px 20px;
    font-size: 1.1em;
    border: 2px solid #bb99dd;
    border-radius: 50px;
    /* More rounded */
    margin: 15px 0;
    outline: none;
    text-align: center;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

#login input[type="password"]:focus {
    border-color: #6d3a8c;
    box-shadow: 0 0 15px rgba(109, 58, 140, 0.2);
}

#login button {
    padding: 10px 35px;
    font-size: 1.1em;
    color: #fff;
    background-color: #6d3a8c;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    box-shadow: 0 4px 6px rgba(109, 58, 140, 0.3);
    font-family: inherit;
    font-weight: 700;
}

#login button:hover {
    background-color: #5a2d75;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(109, 58, 140, 0.4);
}

header {
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly more transparent */
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(109, 58, 140, 0.1);
    /* Softer shadow */
    display: flex;
    justify-content: center;
}

.header-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.back-link {
    position: relative;
    display: inline-block;
    margin-top: 10px;

    font-size: 1.1em;
    color: #6d3a8c;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.back-link:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(109, 58, 140, 0.2);
}

.counter {
    font-size: 1.4em;
    font-weight: 700;
    color: #6d3a8c;
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(109, 58, 140, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* 首頁封面縮圖水平排列 */
.covers-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    /* Increased gap */
    padding: 40px 20px;
}

.cover-card {
    flex: 0 0 auto;
    text-align: center;
    max-width: 220px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s;
}

.cover-card:hover {
    transform: translateY(-5px);
}

.cover-card img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    /* More rounded */
    box-shadow: 0 8px 16px rgba(109, 58, 140, 0.2);
    transition: transform 0.3s ease-in-out;
}

.cover-card img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(109, 58, 140, 0.3);
}

.cover-card figcaption {
    margin-top: 12px;
    font-size: 1.15em;
    color: #5d4037;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

/* footer */
footer {
    margin-top: 20px;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.8);
    text-align: center;
    font-size: 0.9em;
    color: #6d3a8c;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}



/* 輪播圖示按鈕 (懸浮右下角) */
#slideshow-btn-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#slideshow-btn-container:hover {
    transform: scale(1.1) rotate(5deg);
}

.slideshow-icon {
    width: 80px;
    /* 根據圖片大小調整 */
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    /* 增加陰影讓它浮起來 */
    /* 如果原圖有背景，這裡無法用 CSS 去背，只能靠修圖 */
}

/* 泡泡動畫 */
.bubble {
    position: absolute;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: float 10s infinite ease-in-out;
    pointer-events: none;
}

.bubble:nth-child(1) {
    top: 50%;
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
    width: 10px;
    height: 10px;
}

.bubble:nth-child(2) {
    top: 70%;
    left: 50%;
    animation-duration: 10s;
    animation-delay: 1s;
    width: 10px;
    height: 10px;
}

.bubble:nth-child(3) {
    top: 90%;
    left: 80%;
    animation-duration: 14s;
    animation-delay: 2s;
    width: 20px;
    height: 20px;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-1200px) scale(1.5);
        opacity: 0;
    }
}

/* 可愛小圖 */
#cute-image {
    position: fixed;
    bottom: 0px;
    left: 5px;
    z-index: 1000;
    opacity: 1;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#cute-image img {
    width: 150px;
    height: auto;
}

#cute-image:hover {
    transform: scale(1.2);
    opacity: 1;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-items: center;
}

.gallery-grid figure {
    margin: 0;
    text-align: center;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    max-width: 300px;
    /* 限制每張最大寬度不超過 300px */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* 登入畫面小企鵝 */
.corner-image {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: auto;
    z-index: 9999;
}

.floral-border-decoration {
    position: absolute;
    /* 讓它固定在視窗的某個位置，不隨捲動而移動 */
    /*top: 330;*/
    /* 如果你想放在頁面頂部 */
    bottom: 0;
    /* 如果你想放在頁面底部，則改用 bottom: 0; top: auto; */
    left: 0;
    width: 100%;
    /* 讓它佔滿整個視窗寬度 */
    height: 50px;
    /* 固定高度，您可以根據花花圖片的高度調整 */
    background-image: url('flower2.png');
    /* 替換成你實際的圖片路徑 */
    background-repeat: repeat-x;
    /* 讓圖片在水平方向重複 */
    background-size: auto 100%;
    /* 讓背景圖片的高度填滿容器高度，寬度自動調整 */
    z-index: 99;
    /* 確保它顯示在其他內容的上方，您可以調整這個值 */
    /* 如果你的圖片本身不是半透明，可以加上 opacity */
    opacity: 1;
}