/* Audiora Theme - Structural Skeleton - Snake Year 2026 */
:root {
    --primary-orange: #FF4D00;
    --text-white: #FFFFFF;
    --text-black: #000000;
    --glass-bg: rgba(255, 255, 255, 0.15);
    /* 漸層與圓角基礎 */
    --sheet-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #FFFFFF 100%);
    --card-radius: 24px;
    --font-main: 'Inter', 'Noto Sans TC', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: #1a1a1a;
    /* Desktop Black Background */
    color: var(--text-white);
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* iOS Fix: Dynamic Viewport Height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Phone Simulator Container */
/* Phone Simulator Container */
#app {
    width: 100%;
    height: 100%;
    background-color: transparent;
    /* Fix: Remove orange flash */
    position: relative;
    overflow: hidden;
}

/* Desktop: Restore Phone Simulator Look */
@media (min-width: 500px) {
    #app {
        width: 390px;
        height: 844px;
        border-radius: 40px;
        box-shadow: 0 0 0 12px #000, 0 20px 50px rgba(0, 0, 0, 0.5);
    }
}

/* --- 佈局通用樣式 --- */
.screen-container,
.scroll-snap-container {
    width: 100%;
    height: 100%;
    /* Fill #app (844px) */
    position: relative;
    overflow-y: auto;
    /* Enable scroll */
    scrollbar-width: none;
    scroll-snap-type: y mandatory;
    /* Enable snap */
    scroll-behavior: smooth;

    /* FOUC Fix: Hide initially, revealed by JS */
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.screen-container::-webkit-scrollbar,
.scroll-snap-container::-webkit-scrollbar {
    display: none;
}

.screen-full,
.audiora-screen {
    /* FIT CONTAINER, NOT VIEWPORT */
    height: 100%;
    /* Force full height per section */
    min-height: 100%;
    width: 100%;
    /* STOP SHRINKING: Force full height per section */
    flex-shrink: 0;
    position: relative;
    /* Containing block for absolute utility-sheet */
    padding: 0;
    /* Let flex children handle padding */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    /* Restore Snap */
    scroll-snap-stop: always;
}

.bg-orange {
    background-color: var(--primary-orange);
}

.bg-custom-image {
    background-image: url('assets/bg_final.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-repeat: no-repeat;
    background-color: #f5f5f0;
    /* Fallback: Warm Beige (Paper) - NO ORANGE */
    /* Fallback */
}

.flex-center {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* --- 標題與文字 --- */
.hero-title {
    font-size: 100px;
    font-weight: 300;
    line-height: 0.8;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.8;
}

.hero-title-small {
    font-size: 56px;
    /* Increased from 40px */
    font-weight: 800;
    margin-top: 0px;
    /* Reduced top margin */
    line-height: 1;
}

.hero-subtitle-small {
    font-size: 20px;
    opacity: 0.95;
    /* Increased opacity */
    font-weight: 500;
    margin-bottom: 15px;
    margin-top: 5px;
    /* Soft shadow for legibility */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* --- 首頁元件 --- */
#view-home {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Top align everything */
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px 0px 30px;
    /* Adjusted padding */
    flex: 0 0 auto;
    /* Don't grow */
}

.header-left {
    display: flex;
    align-items: center;
}

.header-decoration {
    height: 56px;
    width: auto;
    object-fit: contain;
    margin-right: -10px;
    /* Slight overlap */
    display: block;
    /* changed from inline-block for flex parent */
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 左右各一半 */
    gap: 16px;
    margin-top: 10px;
    /* Reduced from 20px */
    padding: 0 30px;
    /* Unified Side Padding */
    flex: 0 0 auto;
}

.btn-primary {
    /* height: 90px; Remove fixed height, let aspect ratio or content decide */
    aspect-ratio: 1 / 1.1;
    /* 接近方形 */
    width: 100%;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    /* 上下排列 */
    justify-content: space-between;
    align-items: flex-start;
    /* 靠左對齊 */
    cursor: pointer;
    position: relative;
    overflow: hidden;
}



/* Orange Tint for White Lantern */
.header-decoration[src*="white"] {
    filter: invert(37%) sepia(93%) saturate(1919%) hue-rotate(2deg) brightness(102%) contrast(106%) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

/* Main Buttons: Go back to subtle/thin styling */
.btn-primary.glass-btn {
    background: rgba(255, 77, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Thin border */
    box-shadow: 0 4px 15px rgba(255, 77, 0, 0.2);
    /* No thick bottom border */
    transition: transform 0.1s, border-bottom-width 0.1s;
}

.btn-primary.solid-btn {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-orange);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Thin border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.1s, border-bottom-width 0.1s;
}

.btn-primary:active {
    border-bottom-width: 1px;
}

/* ... existing code ... */

.utility-sheet {
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;

    background: url('assets/theme_bg.png') no-repeat top center;
    background-size: cover;

    border-top-left-radius: 30px;
    border-top-right-radius: 30px;

    /* Reduced Padding to shrink the area */
    padding: 20px 24px;
    padding-bottom: calc(25px + env(safe-area-inset-bottom));

    color: #333;
    z-index: 10;
    position: relative;
}

/* ... existing code ... */

.btn-white {
    background: rgba(255, 255, 255, 0.7);
    color: #333;
    backdrop-filter: blur(8px);
    /* 3D Border */
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-black {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    backdrop-filter: blur(8px);
    /* 3D Border */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.action-label h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.action-icon {
    width: 72px;
    /* Visual enlargement */
    height: 72px;
    border-radius: 50%;
    /* Keep circular clipping for avatars */
    background: transparent;
    /* Remove container background */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    align-self: flex-end;
    /* Bottom-right */
    overflow: hidden;
    /* Clip image to circle */
}

.action-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-orange {
    background: var(--primary-orange) !important;
    color: #fff;
}

.text-orange {
    color: var(--primary-orange);
}

.text-dark {
    color: #333;
}

/* --- Entrance & Background --- */
#view-entrance {
    /* Background video handles visuals now */
    background: #000;
    /* Fallback */
    justify-content: flex-start;
    /* Move content to top */
    padding-top: 15vh;
    /* Initial top spacing */
    position: relative;
    overflow: hidden;
    /* Clip video */
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.8;
    /* Slight dim if needed, or 1.0 */
}

.home-hero {
    flex: 0 0 auto;
    /* STOP GROWING - Fixes vertical center issue */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    z-index: 2;
    padding: 40px 30px 20px 30px;
    /* Spacing from header */
    position: relative;
}

/* Utility Sheet - Pinned to Bottom */
.utility-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    /* Solid white for flush look */
    border-radius: 30px 30px 0 0;
    padding: 20px 30px 40px 30px;
    /* Extra bottom padding for safe area */
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
    backdrop-filter: blur(10px);
    /* 3D Stroke Effect */
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15), 0 -2px 5px rgba(0, 0, 0, 0.05);
    /* Deep + Sharp shadow */
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    align-self: center;
}

.sheet-buttons {
    display: flex;
    gap: 15px;
}

.small-pill {
    flex: 1;
    padding: 12px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.btn-white {
    background: rgba(255, 255, 255, 0.6);
    color: #333;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* 3D Pill Look - Deep Press */
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 4px solid rgba(0, 0, 0, 0.15);
    /* Thicker shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-white:active {
    transform: translateY(3px);
    /* Physically move down */
    border-bottom-width: 1px;
    /* Collapse shadow */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.btn-black {
    background: rgba(0, 0, 0, 0.65);
    /* Slightly darker */
    color: #fff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* 3D Pill Look - Deep Press */
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 4px solid rgba(0, 0, 0, 0.5);
    /* Deep dark shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-black:active {
    transform: translateY(3px);
    border-bottom-width: 1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}



.content-layer {
    position: relative;
    z-index: 1;
    /* Ensure text is above video */
}

/* Loading Bar Interaction */
.loading-bar-container {
    position: absolute;
    bottom: 25%;
    /* Roughly below the visual center/dolls */
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    z-index: 2;
}

.loading-bar-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    animation: fillBar 2.2s ease-out forwards;
    /* Slightly longer than 2s for smoothness */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes fillBar {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* Hero Text & Icon styles removed (replaced by video content) */

/* 底部功能區 - Flex Item (Not Absolute) */
.utility-sheet {
    flex: 0 0 auto;
    /* Don't grow, don't shrink arbitrarily */
    width: 100%;
    margin-top: auto;
    /* Push to bottom if extra space exists */

    background: url('assets/theme_bg.png') no-repeat top center;
    background-size: cover;

    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 20px 24px;
    /* iOS Safe Area Fix: Ensure buttons are above home indicator/toolbar */
    padding-bottom: calc(25px + env(safe-area-inset-bottom));

    color: #333;
    z-index: 10;
    position: relative;
    /* Setup for internal absolutes if any */
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    /* Lighter handle for visibility on image */
    border-radius: 10px;
    margin: 0 auto 20px;
}

/* .sheet-title deleted from HTML, style removed */

.sheet-buttons {
    display: flex;
    gap: 12px;
}

.sheet-buttons {
    display: flex;
    gap: 12px;
}

.small-pill {
    flex: 1;
    height: 50px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}



/* --- 分享家藝廊 --- */
.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    margin-right: 15px;
}

.horizontal-carousel {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 20px 30px;
    /* Aligned with global padding */
    scrollbar-width: none;
}

.carousel-card {
    min-width: 280px;
    /* Original Width */
    height: 340px;
    /* New Compact Height */
    width: auto;
    position: relative;
    /* Fixed: Was absolute */
    flex-shrink: 0;
    /* Prevent shrinking in flex container */
    display: flex;
    flex-direction: column;
    /* transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); */
    transition: transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
    /* Improved easing */
    padding: 20px;
    border-radius: 30px;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    /* 漸層與圓角基礎 */
    --sheet-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, #FFFFFF 100%);
    --card-radius: 24px;
    --font-main: 'Inter', 'Noto Sans TC', sans-serif;
}

/* Main Buttons: Go back to subtle/thin styling */
.btn-primary.glass-btn {
    background: rgba(255, 77, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Thin border */
    box-shadow: 0 4px 15px rgba(255, 77, 0, 0.2);
    /* No thick bottom border */
}

.btn-primary.solid-btn {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-orange);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Thin border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-primary:active {
    transform: scale(0.98);
    /* Subtle scale instead of deep press */
    border-bottom-width: 1px;
}

/* ... (Bottom buttons .btn-white/.btn-black retain their thick 3D look from previous edit, so I don't touch them here) ... */

/* CAROUSEL CARDS UPDATE */
.card-light {
    /* IG Card: Glass White */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card-glass {
    /* Event Card: Existing Glass */
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    color: #fff;
}

.card-dark {
    /* Sales Card: Orange Glass (Matches iLighter) */
    background: rgba(255, 77, 0, 0.65);
    /* Orange */
    backdrop-filter: blur(12px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.info-area {
    margin-top: 20px;
}

.info-box {
    padding: 20px;
    border-radius: 20px;
}

.info-box.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
}

/* --- 彈窗與表單 (Glassmorphism Upgrade) --- */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Slightly lighter dim */
    backdrop-filter: blur(4px);
    /* Blur background behind modal */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 100;
}

.modal-content,
.form-container {
    background: rgba(255, 255, 255, 0.85);
    /* Semi-transparent white */
    backdrop-filter: blur(20px);
    /* Heavy blur for content legibility */
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    padding: 30px 24px;
    color: #333;
    max-height: 90%;
    overflow-y: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    /* iOS Fix: Extra scroll space at bottom so button isn't stuck behind keyboard/bar */
    padding-bottom: 80px;
}

.modal-content,
.form-container {
    border-radius: 30px;
    width: 90%;
    margin-bottom: 5%;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.5);

    /* Custom Scrollbar */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    /* Firefox */
}

/* Chrome/Safari/Edge Scrollbar */
.modal-content::-webkit-scrollbar,
.form-container::-webkit-scrollbar {
    width: 6px;
    /* Thin */
}

.modal-content::-webkit-scrollbar-track,
.form-container::-webkit-scrollbar-track {
    background: transparent;
    margin: 30px 0;
    /* Add margin to top/bottom */
}

.modal-content::-webkit-scrollbar-thumb,
.form-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    /* Darker than glass but transparent */
    border-radius: 20px;
    border: 2px solid transparent;
    /* Padding effect */
    background-clip: content-box;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.form-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

.form-header,
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.close-btn {
    background: #f0f0f0;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    /* Fix mobile blue color */
    -webkit-appearance: none;
    /* Fix mobile default styling */
    appearance: none;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #666;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.add-row-btn,
.remove-row-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: #eee;
    cursor: pointer;
    font-size: 20px;
    /* Fix mobile blue color */
    -webkit-appearance: none;
    /* Fix mobile default styling */
    appearance: none;
    display: flex;
    /* Ensure centering */
    align-items: center;
    justify-content: center;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0 14px;
    width: 100%;
}

.input-with-prefix .prefix {
    font-weight: 700;
    color: #333;
    margin-right: 5px;
    font-size: 16px;
}

.input-with-prefix input {
    border: none !important;
    padding-left: 0 !important;
    outline: none;
    flex: 1;
}

.submit-btn,
.query-btn {
    width: 100%;
    padding: 16px;
    border-radius: 30px;
    border: none;
    background: var(--primary-orange);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

/* 查詢結果 */
.loading-state {
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #eee;
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-note {
    font-size: 13px;
    color: #888;
    margin-top: -5px;
    margin-bottom: 20px;
    text-align: right;
    /* Suggest right align or left */
    font-weight: 500;
}

/* Dynamic Row Buttons */
.add-row-btn,
.remove-row-btn {
    background: #e0e0e0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #333 !important;
    /* Force black */
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.result-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin-top: 15px;
    line-height: 1.6;
}

/* Success Modal Specifics */
.success-box {
    text-align: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.success-box h3 {
    margin-bottom: 30px;
    /* Spacing between text and button */
    font-size: 24px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Added for card alignment */
.card-footer {
    margin-top: auto;
    text-align: left;
    width: 100%;
}