/* ============================================
   desktop.css - 網頁版樣式
   ============================================ */

/* === 全局設定 === */
.mobile-break {
    display: none;
}

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* === 導航欄 === */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: sticky;
    top: 0;
    background: transparent;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 100;
}

nav a.active {
    color: #3b82f6;
    font-weight: bold;
}

nav.scrolled {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    position: relative;
    z-index: 1002;
    white-space: nowrap;
}

.logo a {
    position: relative;
    z-index: 1003;
    display: inline-block;
    color: white;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    opacity: 0.7;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* === 作品集 Gallery === */
.gallery-section {
    padding: 60px 10%;
    scroll-margin-top: 12vh;
    padding-bottom: 160px;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-section h2 {
    font-size: 2rem;
    margin-top: -10px;
    padding-left: 20px;
    margin-left: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

.project-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.media-wrapper {
    position: relative;
    padding-bottom: 110%;
    height: 0;
    overflow: hidden;
    background-color: #1e1e1e;
}

.media-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.info {
    padding: 20px;
}

.info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.info p {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

/* === Lightbox (Viewer) === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    scroll-margin-top: 20vh;
    height: 100vh;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 2px;
}

.lightbox.single-view .prev-btn,
.lightbox.single-view .next-btn,
.lightbox.single-view .image-counter {
    display: none !important;
}

.lightbox.single-view img {
    cursor: default;
}

.close-btn, .prev-btn, .next-btn {
    position: absolute;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    padding: 10px;
}

.close-btn:hover, .prev-btn:hover, .next-btn:hover {
    color: #3b82f6;
}

.close-btn { top: 20px; right: 30px; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.image-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1001;
}

.prev-btn.disabled, .next-btn.disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* === YouTube 專區 === */
.youtube-section {
    padding: 80px 10%;
    background-color: #0f0f0f;
    border-bottom: 1px solid #333;
}

.yt-section-title {
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    margin-top: -30px;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    padding-left: 20px;
    margin-left: 0;
    max-width: 1600px;
    margin-right: auto;
}

.channel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 50px;
    flex-wrap: wrap;
}

.channel-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1f1f1f;
}

.channel-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: white;
}

.sub-count {
    color: #aaa;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.channel-desc {
    color: #ccc;
    max-width: 500px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.yt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #cc0000;
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.yt-btn:hover {
    background-color: #ff0000;
    transform: scale(1.05);
}

.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.yt-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.yt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.4);
    border-color: #555;
    background: #252525;
}

.yt-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.yt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.yt-card:hover .yt-thumb img {
    transform: scale(1.05);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.yt-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yt-title {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-meta {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.yt-desc {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Photo Category (Gallery) === */
.photo-category-section {
    padding: 50px 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
}

.photo-category-section img {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.photo-category-section .photo-card:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.photo-category-section img:active {
    transform: scale(0.98);
}

.container-80 {
    width: 80%;
    max-width: 1600px;
    margin: 0 auto;
}

.main-section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: left;
    border-left: 6px solid var(--accent-color);
    padding-left: 20px;
    line-height: 1;
    margin-top: 0px;
}

.photo-group {
    margin-bottom: 100px;
}

.category-title {
    font-size: 1.7rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
}

.photo-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.photo-card {
    display: flex;
    flex-direction: column;
}

.img-wrapper {
    width: 90%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #1e1e1e;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.caption {
    text-align: left;
}

.caption h4 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: white;
    font-weight: 700;
}

.caption p {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.photo-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.photo-card:hover h4 {
    color: var(--accent-color);
}

/* === 統一標題樣式 === */
.section-title,
.gallery-section h2,
.yt-section-title,
.main-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--text-color);
    border-left: 6px solid var(--accent-color);
    padding-left: 20px;
    margin-top: 30px;
    margin-bottom: 50px;
    text-align: left;
    text-shadow: none;
}

/* === 導航錨點定位 === */
.gallery-section,
.about-section {
    scroll-margin-top: 100px;
}

.youtube-section {
    scroll-margin-top: 50px;
}

/* === Footer === */
footer {
    background-color: #000000;
    padding: 60px 5% 40px;
    color: #888;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-line {
    width: 50px;
    height: 2px;
    background-color: #333;
    margin: 0 auto 30px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.back-to-top {
    color: #666;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 20px;
    transition: 0.3s;
}

.back-to-top:hover {
    color: white;
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* === 回到頂部浮動按鈕 === */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === HERO 全幅背景輪播 === */
.hero-fullbleed {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;     /* 垂直居中 */
    justify-content: center; /* 水平居中 (新增) */
}

/* --- 背景輪播 (保持不變) --- */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slideshow .slide.active {
    opacity: 1;
}

.hero-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease-out;
}

.hero-slideshow .slide.active img {
    transform: scale(1);
}

/* --- 漸層遮罩 (修改為適合居中文字) --- */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* 改成全黑半透明，或者從下往上的漸層，確保中間文字清晰 */
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* 加強底部的漸層，讓白色文字更明顯 */
.hero-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 整體壓暗一點 */
}

/* --- 文字內容 (修改為居中) --- */
.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 0;      /* 移除左邊距 */
    max-width: 800px;     /*稍微加寬 */
    text-align: center;   /* 文字居中 */
    display: flex;
    flex-direction: column;
    align-items: center;  /* 讓子元素(如按鈕)水平居中 */
}

.hero-subtitle {
    display: flex;
    align-items: center;
    justify-content: center; /* 子標題居中 */
    gap: 15px;
    font-size: 0.9rem;       /* 稍微加大 */
    letter-spacing: 6px;     /* 字距拉寬更有氣勢 */
    color: #3b82f6;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* 如果你想保留短線，可以改成這樣（或是直接在HTML移除 span.subtitle-line） */
.subtitle-line {
    display: block;
    width: 40px;
    height: 2px;
    background-color: #3b82f6;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
    color: white;
    margin: 0 0 25px 0;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 40px;
    margin-top: -0.5px;
    max-width: 480px;
}

/* --- CTA 按鈕 --- */
.hero-cta {
    display: flex;
    align-items: center;
    gap: 25px;
}

.btn-primary {
    padding: 14px 36px;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: black;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-play {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-play i {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-play:hover {
    color: white;
}

.btn-play:hover i {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* --- 輪播指示器 --- */
.slide-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    border-color: white;
}

.indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* --- 滾動提示 --- */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    right: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.scroll-hint span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    letter-spacing: 3px;
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.3;
        transform: scaleY(0.6);
    }
}

/* === 關於我 (About) === */
.about-section {
    padding: 100px 5%;
    background-color: #1a1a1a;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.about-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.about-name {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 0px;
}

.about-role {
    font-size: 0.1rem;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 17px;
    margin-top: -10px;
}

/* --- 分隔線 --- */
.about-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    border-radius: 2px;
    margin: 0 auto 50px;
    margin-bottom: 25px;
}

.about-text {
    width: 100%;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
}

.about-text p {
    color: #ccc;
    font-size: 1.1rem;
}

/* === 聯絡資訊 === */
.contact-info {
    list-style: none;
    padding: 0;
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.contact-info a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    color: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}