/* ==========================================================================
   Wupinyin Portal — Video Placeholder & Navigation
   ========================================================================== */

/* 1. Design Variables & Base System */
:root {
    --bg-main: #060608;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.14);
    --border-glass-hover: rgba(255, 255, 255, 0.35);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --brand-gradient: linear-gradient(135deg, #ffffff 25%, #e2e8f0 65%, #94a3b8 100%);
    --brand-glow: rgba(255, 255, 255, 0.15);
    --accent-glow: rgba(255, 255, 255, 0.12);
}

/* 2. Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
}

/* 3. Video Container & Atmospheric Background */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 3.5rem 4rem;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* Subtle Atmospheric Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
                linear-gradient(135deg, rgba(6, 6, 8, 0.6) 0%, rgba(6, 6, 8, 0.25) 100%);
    z-index: 2;
    pointer-events: none;
}

/* 4. Main Content Area & Portal Links */
.content {
    position: relative;
    z-index: 3;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    animation: fadeIn 2s ease-out;
    max-width: 680px;
}

.title {
    font-size: 2.85rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 25px var(--brand-glow);
    transition: transform 0.3s ease;
}

.title:hover {
    transform: scale(1.015);
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Portal Navigation Links */
.portal-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-top: 1.35rem;
    flex-wrap: wrap;
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.78rem 1.45rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    cursor: pointer;
    user-select: none;
}

.portal-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    color: #ffffff;
}

.portal-btn:active {
    transform: translateY(0);
}

.portal-btn-icon {
    width: 1.2rem;
    height: 1.2rem;
    stroke: var(--text-secondary);
    transition: stroke 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.portal-btn:hover .portal-btn-icon {
    stroke: #ffffff;
    transform: scale(1.08);
}

.portal-btn-text {
    font-weight: 500;
    color: inherit;
}

.portal-btn-arrow {
    width: 0.85rem;
    height: 0.85rem;
    stroke: var(--text-muted);
    stroke-width: 2.2;
    transition: stroke 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.portal-btn:hover .portal-btn-arrow {
    stroke: #ffffff;
    transform: translate(2px, -2px);
}

/* 5. Feedback Toast for Portal Links */
.portal-notice {
    position: fixed;
    bottom: 2.5rem;
    left: 4rem;
    z-index: 99;
    background: rgba(18, 18, 24, 0.92);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.8rem 1.35rem;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portal-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 6. Mute Toggle Button */
.mute-toggle {
    position: absolute;
    bottom: 3.5rem;
    right: 4rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.mute-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--border-glass-hover);
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.mute-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mute-toggle .icon-unmuted {
    display: none;
}

.mute-toggle.is-unmuted .icon-unmuted {
    display: block;
}

.mute-toggle.is-unmuted .icon-muted {
    display: none;
}

/* 7. Animations & Responsive Breakpoints */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .video-container {
        padding: 2.5rem 2rem;
    }

    .mute-toggle {
        bottom: 2.5rem;
        right: 2rem;
    }

    .portal-notice {
        left: 2rem;
        bottom: 2.5rem;
    }
}

@media (max-width: 768px) {
    body, html {
        overflow: auto;
    }

    .video-container {
        padding: 2rem 1.5rem;
        min-height: 100vh;
        height: auto;
        flex-direction: column;
        justify-content: space-between;
    }

    .content {
        max-width: 100%;
    }

    .title {
        font-size: 2.25rem;
    }

    .subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    .portal-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
    }

    .portal-btn {
        justify-content: center;
        padding: 0.78rem 1.25rem;
    }

    .portal-notice {
        left: 1.5rem;
        right: 1.5rem;
        bottom: 5.5rem;
    }

    .mute-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }

    .mute-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}
