/* ============ Windy 首頁新增元素樣式 ============ */

/* Hero 全屏 */
.hero-full {
    position: relative;
    height: 92vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.hero-slides { position: absolute; inset: 0; }
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: saturate(1.1);
}
.hero-bg.active { opacity: 1; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,8,22,0.55) 0%, rgba(5,8,22,0.35) 40%, rgba(5,8,22,0.9) 100%);
}
.hero-content {
    position: relative;
    text-align: center;
    padding: 0 20px;
    z-index: 2;
}
.hero-content .hero-logo {
    height: 110px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(96,165,250,0.6));
}
.hero-wordmark {
    height: 100px;
    width: auto;
    max-width: 100%;
    margin-bottom: 22px;
    filter: drop-shadow(0 0 28px rgba(96,165,250,0.6));
    animation: float 4s ease-in-out infinite;
}
.hero-content h1 {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 14px;
    background: linear-gradient(120deg, #ffffff, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
}
.hero-tagline { color: rgba(232,237,247,0.85); font-size: 19px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 16px 38px; font-size: 17px; border-radius: 14px; }
.btn-ghost {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.hero-scroll { margin-top: 40px; color: rgba(255,255,255,0.6); font-size: 14px; animation: float 2s ease-in-out infinite; }

/* 功能導航 */
.feature-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1150px;
    margin: -60px auto 0;
    padding: 0 30px;
    position: relative;
    z-index: 5;
}
.fn-card {
    background: rgba(26, 35, 64, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 26px 20px;
    text-align: center;
    text-decoration: none;
    color: #e8edf7;
    transition: all 0.35s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.fn-card:hover {
    transform: translateY(-8px);
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(59,130,246,0.4), 0 16px 48px rgba(0,0,0,0.5);
}
.fn-icon { font-size: 38px; }
.fn-title { font-family: var(--font-display); font-size: 22px; font-weight: 900; letter-spacing: 2px; }
.fn-desc { font-size: 13px; color: #8a93a8; }

/* 關於 Windy 精簡 */
.about-preview {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}
.about-preview-img {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    background: #0b1020;
}
.about-preview-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    border-radius: 0;
}
.about-preview-img img:first-child { opacity: 1; }
.about-preview-img.rotating img { opacity: 0; }
.about-preview-img.rotating img.is-active { opacity: 1; }
.about-preview-text p { color: #8a93a8; margin-bottom: 14px; font-size: 16px; }
.about-preview-text strong { color: #e8edf7; }

/* MV 精選 */
.mv-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.mv-preview-card {
    background: rgba(26, 35, 64, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}
.mv-preview-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(0,0,0,0.5); border-color: rgba(255,0,0,0.4); }
.mv-preview-thumb { position: relative; aspect-ratio: 16/9; cursor: pointer; background: #000; }
.mv-preview-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv-preview-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mv-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: white;
    background: rgba(0,0,0,0.3);
    transition: all 0.25s;
}
.mv-preview-thumb:hover .mv-play { background: rgba(0,0,0,0.1); }
.mv-preview-info { padding: 14px 18px; }
.mv-preview-title { font-family: var(--font-display); font-weight: 900; font-size: 19px; letter-spacing: 1px; }
.mv-preview-tag { color: #8a93a8; font-size: 13px; margin-top: 2px; }
.section-more { text-align: center; margin-top: 24px; }

/* 精選相片 */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.photo-preview-grid .photo-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1/1;
    border: 2px solid transparent;
    transition: all 0.3s;
    background: #111830;
}
.photo-preview-grid .photo-item:hover { border-color: #60a5fa; transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.photo-preview-grid .photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Footer */
.footer {
    background: rgba(5,8,22,0.9);
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 60px;
    padding: 50px 30px 20px;
    position: relative;
    z-index: 1;
}
.footer-content {
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer-logo { height: 44px; width: auto; margin-bottom: 12px; }
.footer-wordmark { height: 34px; width: auto; margin-bottom: 12px; filter: drop-shadow(0 0 8px rgba(96,165,250,0.5)); }
.footer-fansclub-logo { height: 55px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 0 10px rgba(96,165,250,0.5)); }
.footer-brand p { font-weight: 700; font-size: 16px; }
.footer-sub { color: #8a93a8; font-size: 13px; margin-top: 4px; font-weight: 400; }
.footer-links h4 { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: #e8edf7; }
.footer-links a { display: block; color: #8a93a8; text-decoration: none; margin-bottom: 10px; font-size: 14px; transition: all 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-bottom {
    max-width: 1150px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: #8a93a8;
    font-size: 13px;
}

/* 響應式 */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 34px; }
    .hero-content .hero-logo { height: 80px; }
    .about-preview { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .feature-nav { margin-top: -30px; padding: 0 16px; }
}

/* ============ CTA 按鈕（半透明玻璃圖樣）============ */
.btn-glass {
    position: relative;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.25);
    overflow: hidden;
    transition: all 0.3s;
    z-index: 1;
}
.btn-glass:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(96,165,250,0.7);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(96,165,250,0.35);
}

/* ============ 花草裝飾（粗線條 + 花草）============ */
.hero-content h1::before,
.hero-content h1::after {
    content: '❀';
    display: inline-block;
    margin: 0 20px;
    font-size: 0.55em;
    color: #a78bfa;
    -webkit-text-fill-color: #a78bfa;
    vertical-align: middle;
    text-shadow: 0 0 15px rgba(167,139,250,0.7);
}
.hero-content h1::before { transform: rotate(-15deg); }
.hero-content h1::after { transform: rotate(15deg); }

/* section-title 花草 + 粗線條 */
.section-title::before {
    content: '❀';
    margin-right: 4px;
    color: #a78bfa;
    font-size: 0.85em;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, rgba(59,130,246,0.5), rgba(139,92,246,0.3), transparent);
    border-radius: 2px;
    margin-left: 16px;
}
.section-title {
    display: flex;
    align-items: center;
}

/* 粗線條裝飾（區塊之間）*/
.hero-scroll {
    position: relative;
}
.hero-scroll::before,
.hero-scroll::after {
    content: '──';
    color: rgba(255,255,255,0.4);
    margin: 0 8px;
}

/* ============ 背景音樂按鈕 ============ */
.music-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: 2px solid rgba(255,255,255,0.35);
    cursor: pointer;
    font-size: 22px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(59,130,246,0.45);
    transition: all 0.3s;
}
.music-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 30px rgba(59,130,246,0.65);
}
.music-btn.playing {
    animation: music-pulse 2s ease-in-out infinite;
}
@keyframes music-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(59,130,246,0.45); }
    50% { box-shadow: 0 4px 34px rgba(139,92,246,0.85); }
}

/* ============ 防下載保護 ============ */
.photo-guard { position: absolute; inset: 0; z-index: 1; }
.photo-item, .gallery-item { position: relative; }
.photo-item img, .gallery-item img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ============ 浮動操作欄（語言 + 登入/註冊）============ */
.floating-actions {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 999;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============ 相片歷史選擇 Modal ============ */
.history-picker-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.history-picker-content {
    background: #0d1428;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.history-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.history-picker-header h3 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 18px;
    color: white;
}
.history-picker-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.history-picker-grid {
    padding: 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.history-pick-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1/1;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #111830;
}
.history-pick-item:hover {
    border-color: #3b82f6;
    transform: scale(1.04);
}
.history-pick-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}
.history-pick-event {
    grid-column: 1 / -1;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 14px;
    color: #a78bfa;
    padding: 12px 4px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 1px;
}
.history-loading {
    text-align: center;
    color: #8a93a8;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ============ 手機：音樂掣移去右上角（避開 Little Windy 客服） ============ */
@media (max-width: 768px) {
    .music-btn {
        bottom: auto;
        top: calc(var(--nav-h, 112px) + 10px);
        right: 14px;
        width: 46px;
        height: 46px;
        font-size: 20px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
