/* Custom Styles for Grace Yang Portfolio */

:root {
    --color-bg-dark: #111827;
    --color-bg-light: #f9fafb;
    --color-text-dark: #f9fafb;
    --color-text-light: #111827;
    --color-accent: #3b82f6;
    --color-accent-hover: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* Light Mode */
body.light-mode {
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
}

body.light-mode nav {
    background-color: rgba(249, 250, 251, 0.8);
    border-bottom-color: #e5e7eb;
}

body.light-mode .bg-gray-900 {
    background-color: #f9fafb;
}

body.light-mode .text-gray-100 {
    color: #111827;
}

body.light-mode .text-gray-300 {
    color: #374151;
}

body.light-mode .text-gray-400 {
    color: #6b7280;
}

body.light-mode .text-gray-500 {
    color: #9ca3af;
}

body.light-mode .border-gray-800 {
    border-color: #e5e7eb;
}

body.light-mode .bg-gray-800\/50 {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #e5e7eb;
}

body.light-mode .border-gray-700 {
    border-color: #d1d5db;
}

body.light-mode .bg-gray-700 {
    background-color: #9ca3af;
}

body.light-mode .hover\:bg-gray-800:hover {
    background-color: #f3f4f6;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Links */
.nav-link {
    position: relative;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Section Title */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #3b82f6;
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

body.light-mode .tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Concept Tags (Purple) */
.concept-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: rgb(167, 139, 250);
    font-weight: 500;
    transition: all 0.3s ease;
}

.concept-tag:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
}

body.light-mode .concept-tag {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: rgb(124, 58, 237);
}

body.light-mode .concept-tag:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Card Front Image Container - 垂直佈局（三欄網格） */
.side-project-card .card-image-front {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1.44 / 1;
    overflow: hidden;
    border-radius: 0.75rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.side-project-card .card-image-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.side-project-card:hover .card-image-front {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.side-project-card:hover .card-image-front img {
    transform: scale(1.05);
}

/* Image Overlay - Full Coverage with Centered Title */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.70);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.overlay-status-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.625rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Work Projects 保留原本垂直佈局的圖片樣式 */
.work-card:not(.side-project-card) .card-image-front {
    width: 100%;
    overflow: hidden;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
}

.work-card:not(.side-project-card) .card-image-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.work-card:not(.side-project-card):hover .card-image-front img {
    transform: scale(1.05);
}

/* Skill Tags */
.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

body.light-mode .skill-tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Contact Links */
.contact-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background-color: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Horizontal layout for all contact links */
.contact-link-horizontal {
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
}

.contact-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    color: #3b82f6;
    transform: translateY(-4px);
}

/* Copy Icon Button - inline with text for horizontal layout */
.copy-icon-btn {
    padding: 0.25rem;
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.copy-icon-btn:hover {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    opacity: 1;
    transform: scale(1.15);
}

.copy-icon-btn:active {
    transform: scale(0.9);
}

body.light-mode .contact-link {
    background-color: rgba(255, 255, 255, 0.5);
    border-color: #e5e7eb;
    color: #6b7280;
}

body.light-mode .contact-link:hover {
    background-color: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

body.light-mode .copy-icon-btn {
    color: #9ca3af;
}

body.light-mode .copy-icon-btn:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay-1 {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

body.light-mode ::-webkit-scrollbar-track {
    background: #f3f4f6;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* About Section Enhancements */
#about .max-w-3xl p {
    animation: fadeIn 0.8s ease-out;
}

/* Core Competencies Cards */
.bg-gray-800\/50.p-6 {
    position: relative;
    overflow: hidden;
}

.bg-gray-800\/50.p-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.bg-gray-800\/50.p-6:hover::before {
    transform: scaleX(1);
}

/* Value Proposition Gradient Box */
.bg-gradient-to-r {
    position: relative;
    backdrop-filter: blur(10px);
}

body.light-mode .bg-gradient-to-r {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05)) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

/* Highlighted Numbers and Text */
.text-blue-400.font-semibold {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

body.light-mode .text-blue-400.font-semibold {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Core Competencies Section Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#about .grid > div {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

#about .grid > div:nth-child(1) {
    animation-delay: 0.1s;
}

#about .grid > div:nth-child(2) {
    animation-delay: 0.2s;
}

#about .grid > div:nth-child(3) {
    animation-delay: 0.3s;
}

/* Emoji Icons Enhancement */
.text-3xl {
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
    transition: transform 0.3s ease;
}

.bg-gray-800\/50:hover .text-3xl {
    transform: scale(1.2) rotate(5deg);
}

/* Value Proposition Checkmarks */
.text-blue-400.text-lg {
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Light mode adjustments for competency cards */
body.light-mode .bg-gray-800\/50 {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.light-mode .bg-gray-800\/50:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

body.light-mode .border-gray-700 {
    border-color: #e5e7eb;
}

/* Responsive adjustments for About section */
@media (max-width: 768px) {
    #about .text-3xl {
        font-size: 2rem;
    }

    #about h3 {
        font-size: 1.5rem;
    }

    #about .bg-gradient-to-r {
        padding: 1.5rem;
    }
}

/* Achievement Timeline Light Mode */
body.light-mode .bg-gradient-to-b {
    background: linear-gradient(to bottom, #3b82f6, #2563eb, #3b82f6) !important;
}

/* Stats Cards Enhancement */
.grid .bg-gray-800\/50 {
    transition: all 0.3s ease;
}

.grid .bg-gray-800\/50:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

body.light-mode .grid .bg-gray-800\/50:hover {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.15);
}

/* Tag Cloud Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.px-3.py-1 {
    animation: float 3s ease-in-out infinite;
}

.px-3.py-1:nth-child(1) {
    animation-delay: 0s;
}

.px-3.py-1:nth-child(2) {
    animation-delay: 0.5s;
}

.px-3.py-1:nth-child(3) {
    animation-delay: 1s;
}

.px-3.py-1:nth-child(4) {
    animation-delay: 1.5s;
}

/* Light mode for new sections */
body.light-mode .bg-gray-800\/30 {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: #e5e7eb;
}

body.light-mode .bg-gray-800\/30:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

body.light-mode .bg-gray-800\/20 {
    background-color: rgba(249, 250, 251, 0.8);
    border-color: #e5e7eb;
}

/* Photo Placeholder Light Mode */
body.light-mode .rounded-full.bg-gray-800\/50 {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Achievement Timeline Dots */
.bg-blue-500.rounded-full {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Sticky Photo Effect */
.md\:sticky {
    transition: all 0.3s ease;
}

/* Code Profile Terminal Styles */
.font-mono pre {
    line-height: 1.6;
    margin: 0;
}

/* Terminal Window Light Mode */
body.light-mode .bg-gray-900 {
    background-color: #ffffff;
}

body.light-mode .bg-gray-800 {
    background-color: #f3f4f6;
}

body.light-mode .border-gray-700 {
    border-color: #d1d5db;
}

/* Light Mode Syntax Colors */
body.light-mode .text-purple-400 {
    color: #7c3aed;
}

body.light-mode .text-blue-300 {
    color: #2563eb;
}

body.light-mode .text-red-300 {
    color: #dc2626;
}

body.light-mode .text-green-300 {
    color: #059669;
}

body.light-mode .text-yellow-300 {
    color: #d97706;
}

body.light-mode .text-gray-500 {
    color: #9ca3af;
}

body.light-mode .text-green-400 {
    color: #10b981;
}

body.light-mode .bg-gradient-to-b.from-gray-900 {
    background: linear-gradient(to bottom, #f9fafb, #ffffff) !important;
}

/* Terminal Buttons Light Mode */
body.light-mode .bg-red-500,
body.light-mode .bg-yellow-500,
body.light-mode .bg-green-500 {
    opacity: 0.8;
}

/* Terminal Window Shadow */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

body.light-mode .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Code Block Scrollbar */
.font-mono.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.font-mono.overflow-x-auto::-webkit-scrollbar-track {
    background: #1f2937;
}

.font-mono.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

body.light-mode .font-mono.overflow-x-auto::-webkit-scrollbar-track {
    background: #f3f4f6;
}

body.light-mode .font-mono.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

/* Terminal Animation */
@keyframes terminalFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-gray-900.rounded-lg {
    animation: terminalFadeIn 0.6s ease-out;
}

/* Terminal Content Max Height */
.terminal-content {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 5px;
}

.terminal-content {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.terminal-content::-webkit-scrollbar {
    width: 3px;
}

.terminal-content::-webkit-scrollbar-track {
    background: transparent !important;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: transparent !important;
    border-radius: 4px;
}

/* Terminal hover 時顯示 scrollbar */
.terminal-content:hover {
    scrollbar-color: rgba(156, 163, 175, 0.25) transparent;
}

.terminal-content:hover::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.25) !important;
}

.terminal-content::-webkit-scrollbar-thumb:active {
    background: rgba(156, 163, 175, 0.4) !important;
}

/* Light mode 覆蓋 */
body.light-mode .terminal-content::-webkit-scrollbar-track {
    background: transparent !important;
}

body.light-mode .terminal-content::-webkit-scrollbar-thumb {
    background: transparent !important;
}

body.light-mode .terminal-content:hover::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.25) !important;
}

body.light-mode .terminal-content::-webkit-scrollbar-thumb:active {
    background: rgba(107, 114, 128, 0.4) !important;
}

/* Responsive Terminal */
@media (max-width: 1024px) {
    .terminal-content {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .font-mono {
        font-size: 0.7rem;
    }

    .font-mono pre {
        white-space: pre-wrap;
        word-break: break-word;
    }
}

/* Hero + Terminal Side-by-Side Layout */
#hero .grid {
    align-items: center;
}

/* Photo Centered on First Row */
#hero .w-20.h-20 {
    transition: all 0.3s ease;
}

/* Stats Cards Vertical Stack */
#hero .space-y-3 > div {
    transition: all 0.3s ease;
}

#hero .space-y-3 > div:hover {
    transform: translateX(5px);
}

/* Responsive: Stack on Mobile/Tablet */
@media (max-width: 1023px) {
    #hero .hero-content {
        margin-top: 3rem;
    }

    #hero .grid {
        grid-template-columns: 1fr !important;
        gap: 3rem;
    }

    #hero h1 {
        font-size: 3rem;
    }

    /* CTA 按鈕與下方內容間距 */
    #hero .flex.flex-wrap.gap-6 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .text-2xl {
        font-size: 1.5rem;
    }

    #hero .w-20.h-20 {
        width: 5rem;
        height: 5rem;
    }

    /* CTA 按鈕區塊優化 */
    #hero .flex.flex-wrap.gap-6 {
        margin-top: 2rem;
        margin-bottom: 3rem;
        padding-top: 0;
        border-top: none;
        flex-direction: column;
        gap: 1rem !important;
    }

    #hero .flex.flex-wrap.gap-6 a {
        width: 100%;
        text-align: center;
    }

    /* Light mode 分隔線 */
    body.light-mode #hero .flex.flex-wrap.gap-6 {
        border-top-color: rgba(209, 213, 219, 0.5);
    }
}

/* Projects Tab Styles */
.project-tab {
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    position: relative;
    cursor: pointer;
}

.project-tab:hover {
    color: #3b82f6;
}

.project-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Tab transition */
.project-content {
    animation: fadeIn 0.4s ease-out;
}

body.light-mode .project-tab {
    color: #6b7280;
}

body.light-mode .project-tab:hover {
    color: #2563eb;
}

body.light-mode .project-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Skills Tab Styles */
.skills-tab {
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    position: relative;
    cursor: pointer;
}

.skills-tab:hover {
    color: #3b82f6;
}

.skills-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Tab transition */
.skills-tab-content {
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* Tech Stack 卡片灰字底部對齊 */
#skills-skills .bg-gray-800\/30 {
    display: flex;
    flex-direction: column;
}

#skills-skills .bg-gray-800\/30 > div {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#skills-skills .text-gray-400.text-xs {
    margin-top: auto !important;
    padding-top: 2rem;
}

body.light-mode .skills-tab {
    color: #6b7280;
}

body.light-mode .skills-tab:hover {
    color: #2563eb;
}

body.light-mode .skills-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ========================================
   Skills Section Scroll Hijacking
   ======================================== */

/* Skills Section - Normal Layout (No Scroll Hijacking) */

/* Print Styles */
@media print {
    nav,
    #theme-toggle,
    #mobile-menu-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ========================================
   Horizontal Scrolling Experience Timeline
   ======================================== */

/* Experience Wrapper - Creates virtual scroll space */
.experience-wrapper {
    position: relative;
    /* Height will be set dynamically by JavaScript */
}

/* Experience Section - Sticky Position for Scroll Hijacking */
.experience-horizontal-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    overflow: hidden;
    z-index: 1;
}

/* Scroll Container with Snap */
.experience-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */

    /* Snap Scrolling */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

.experience-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Timeline Wrapper */
.experience-timeline-wrapper {
    position: relative;
    min-width: max-content;
    min-height: 500px;
    padding: 3rem 0;
}

/* Horizontal Timeline Line */
.timeline-line-horizontal {
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #6b7280, #6b7280);
    transform: translateY(-50%);
    z-index: 1;
}

/* Experience Items Container */
.experience-items-horizontal {
    display: flex;
    gap: 8rem;
    /* Padding will be set dynamically by JavaScript to center first and last cards */
    padding: 0;
    position: relative;
    z-index: 2;
}

/* Individual Experience Item with Snap */
.experience-item-horizontal {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 400px;
    max-width: 400px;
    flex-shrink: 0;

    /* Snap to center */
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* Timeline Dot */
.timeline-dot-horizontal {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.8);
    transition: all 0.3s ease;
}

.experience-item-horizontal:hover .timeline-dot-horizontal {
    transform: translate(-50%, -50%) scale(1.3);
}

/* Active State - Centered Card */
.experience-item-horizontal.active .timeline-dot-horizontal {
    background-color: #3b82f6 !important;
    box-shadow: 0 0 12px 4px rgba(59, 130, 246, 0.7);
}

.experience-item-horizontal.active .experience-period {
    color: #60a5fa !important;
}

/* Experience Card */
.experience-card {
    background-color: transparent;
    border: none;
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 9rem;
    transition: all 0.3s ease;
}

.experience-item-horizontal:hover .experience-card {
    background-color: rgba(31, 41, 55, 0.15);
    border: none;
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Experience Period (Above Timeline) */
.experience-period {
    position: absolute;
    top: calc(30% - 4rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3;
    transition: color 0.3s ease;
}

/* Experience Card Content Styles */
.experience-card {
    padding: 2.5rem 2rem !important;
}

.experience-card h3 {
    color: #60a5fa;
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.experience-card > p {
    color: rgb(156, 163, 175) !important;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-top: 0.375rem !important;
    margin-bottom: 1rem;
}

.experience-responsibilities {
    color: rgb(209, 213, 219);
    margin-top: 1rem !important;
}

.experience-responsibilities li {
    color: rgb(209, 213, 219);
    line-height: 1.8;
    letter-spacing: 0.015em;
    margin-bottom: 0.75rem;
}

.experience-responsibilities li:last-child {
    margin-bottom: 0;
}

.experience-responsibilities li span:first-child {
    color: #60a5fa;
}

/* Education Item - Minimal Card Style */
.education-item .experience-card {
    background-color: transparent;
    border: none;
    padding: 1rem 2rem;
    margin-top: 9rem;
}

/* Education Item - Keep Original Gray Color */
.education-item .experience-card p {
    color: #9ca3af !important;
}

/* Remove hover effect for education */
.education-item:hover .experience-card {
    background-color: transparent;
    border: none;
    transform: none;
    box-shadow: none;
}

/* Scroll Hint */
.scroll-hint {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Light Mode Adjustments */
body.light-mode .timeline-line-horizontal {
    background: linear-gradient(to right, #2563eb, #9ca3af, #9ca3af);
}

body.light-mode .timeline-dot-horizontal {
    box-shadow: 0 0 0 3px rgba(229, 231, 235, 0.9);
}

body.light-mode .experience-card {
    background-color: transparent;
    border: none;
}

body.light-mode .experience-item-horizontal:hover .experience-card {
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.light-mode .experience-item-horizontal.active .timeline-dot-horizontal {
    background-color: #2563eb !important;
    box-shadow: 0 0 12px 4px rgba(37, 99, 235, 0.6);
}

body.light-mode .experience-item-horizontal.active .experience-period {
    color: #2563eb !important;
}

body.light-mode .experience-card h3 {
    color: #2563eb;
}

body.light-mode .experience-card > p {
    color: rgb(107, 114, 128) !important;
}

body.light-mode .experience-responsibilities {
    color: rgb(75, 85, 99);
}

body.light-mode .experience-responsibilities li {
    color: rgb(75, 85, 99);
}

body.light-mode .experience-responsibilities li span:first-child {
    color: #2563eb;
}

body.light-mode .education-item .experience-card {
    background-color: transparent;
    border: none;
}

body.light-mode .education-item:hover .experience-card {
    background-color: transparent;
    border: none;
    transform: none;
    box-shadow: none;
}

/* Responsive: Mobile/Tablet Vertical Layout */
@media (max-width: 1024px) {
    /* Disable horizontal scroll on mobile */
    .experience-wrapper {
        height: auto !important; /* Override JS-set height */
    }

    .experience-horizontal-section {
        position: relative; /* Disable sticky */
        min-height: auto;
        height: auto;
        padding: 3rem 0;
    }

    .experience-scroll-container {
        width: 100%;
        overflow-x: visible;
        overflow-y: visible;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .experience-timeline-wrapper {
        width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 0;
    }

    .timeline-line-horizontal {
        display: none;
    }

    /* Clean card layout without timeline decorations */
    .experience-items-horizontal {
        flex-direction: column;
        gap: 2rem;
        padding: 0;
    }

    .experience-item-horizontal {
        width: 100%;
        min-width: 0;
        max-width: none;
        position: relative;
        flex-shrink: 1;
        align-items: flex-start;
    }

    .timeline-dot-horizontal {
        display: none;
    }

    /* Time badge style */
    .experience-period {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        font-weight: 600;
        background-color: rgba(59, 130, 246, 0.15);
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 9999px;
        color: #60a5fa;
    }

    /* Card with comfortable spacing */
    .experience-card {
        width: 100%;
        margin-top: 0;
        padding: 1.25rem;
        background-color: transparent;
        border: none;
        border-radius: 0.75rem;
        box-shadow: none;
        box-sizing: border-box;
    }

    /* Work experience cards */
    .experience-card h3 {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: 0.375rem;
        font-weight: 600;
    }

    .experience-card > p {
        font-size: 0.875rem;
        line-height: 1.5;
        margin-top: 0.25rem;
    }

    .experience-card ul {
        margin-top: 1rem;
        padding-left: 0;
    }

    .experience-card ul li {
        font-size: 0.8125rem;
        line-height: 1.6;
        margin-bottom: 0.625rem;
    }

    .experience-card ul li:last-child {
        margin-bottom: 0;
    }

    /* Work experience hover effect for mobile - reduce translateY */
    .experience-item-horizontal:hover .experience-card {
        background-color: rgba(31, 41, 55, 0.15);
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* Education items - minimal style */
    .education-item .experience-period {
        background-color: rgba(156, 163, 175, 0.15);
        border-color: rgba(156, 163, 175, 0.3);
        color: #9ca3af;
    }

    .education-item .experience-card {
        margin-top: 0;
        padding: 1rem;
        background-color: transparent;
        border: none;
    }

    .education-item .experience-card p {
        font-size: 0.875rem;
        color: #9ca3af;
    }

    /* Education item hover effect for mobile */
    .education-item:hover .experience-card {
        border: none;
        box-shadow: none;
        transform: none;
        background-color: transparent;
    }

    .scroll-hint {
        display: none;
    }

    /* Light mode adjustments for mobile */
    body.light-mode .experience-period {
        background-color: rgba(37, 99, 235, 0.1);
        border-color: rgba(37, 99, 235, 0.25);
        color: #2563eb;
    }

    body.light-mode .experience-card {
        background-color: transparent;
        border: none;
        box-shadow: none;
    }

    body.light-mode .experience-item-horizontal:hover .experience-card {
        background-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    body.light-mode .education-item .experience-period {
        background-color: rgba(107, 114, 128, 0.1);
        border-color: rgba(107, 114, 128, 0.25);
        color: #6b7280;
    }

    body.light-mode .education-item .experience-card {
        background-color: transparent;
        border: none;
    }

    body.light-mode .education-item .experience-card p {
        color: #6b7280;
    }

    /* Education item hover effect for mobile - light mode */
    body.light-mode .education-item:hover .experience-card {
        border: none;
        box-shadow: none;
        transform: none;
        background-color: transparent;
    }
}

/* Desktop Layout - Ensure horizontal scroll and snap work correctly */
@media (min-width: 1025px) {
    /* Ensure timeline wrapper allows horizontal overflow */
    .experience-timeline-wrapper {
        min-width: max-content;
    }

    /* Ensure cards maintain fixed width for snap scrolling */
    .experience-item-horizontal {
        min-width: 400px;
        max-width: 400px;
        align-items: center;
        flex-shrink: 0;
    }

    /* Ensure scroll container allows horizontal scroll */
    .experience-scroll-container {
        overflow-x: auto;
        overflow-y: hidden;
    }
}

/* ========================================
   Work Project Card Hover Overlay
   ======================================== */

.work-card {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid rgb(55, 65, 81);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

/* 頂部動態漸層顏色條 */
.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 0.5rem 0.5rem 0 0;
    z-index: 3;
}

.work-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.work-card:hover::before {
    transform: scaleX(1);
}

/* Side Project 垂直佈局（三欄網格） */
.side-project-card .card-front {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.side-project-card .card-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

/* Work Projects 保留垂直佈局 */
.work-card:not(.side-project-card) .card-front {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 卡片上區：標題 + 時間（向上對齊） */
.card-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

/* Side Project 卡片標題放大 */
.side-project-card .card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

/* 卡片中區：描述（向上對齊，與標題保持距離） */
.card-middle {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

/* 卡片下區：Roles & Tags（向下對齊） */
.card-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Card Overlay - 適用於 Work Projects 和 Side Projects */
.work-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    opacity: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease;
    z-index: 2;
    border-radius: 0.5rem;
}

.work-card:hover .card-overlay {
    opacity: 1;
}

/* 確保遮罩內的連結可點擊 */
.card-overlay a {
    pointer-events: auto;
}

/* Light Mode 支援 */
body.light-mode .work-card .card-overlay {
    background: rgba(249, 250, 251, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

body.light-mode .work-card:hover {
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.15);
}

/* Roles 標籤樣式 (橙色系) */
.role-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: rgb(251, 146, 60);
    font-weight: 500;
}

/* Description 截斷 (限制 3 行) */
.description-front {
    font-size: 0.8125rem;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: rgb(156, 163, 175);
    display: -webkit-box;
    /* -webkit-line-clamp: 3; */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 小標題樣式 (Role / Tech) */
.label-text {
    display: block;
    font-size: 0.75rem;
    color: rgb(107, 114, 128);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* ===== 卡片背面（Overlay）佈局 ===== */

/* 專案圖片容器 */
.project-image-wrapper {
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 1.25rem;
    border-radius: 0.375rem;
    overflow: hidden;
    aspect-ratio: 16 / 9; /* 固定 16:9 比例 */
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Achievements 區塊 */
.achievements-section {
    margin-top: 5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.achievements-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(156, 163, 175);
    margin-bottom: 0.75rem;
}

.achievements-content {
    font-size: 0.8125rem;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: rgb(156, 163, 175);
}

.achievements-content p {
    margin-bottom: 0.5rem;
}

.achievements-content p:last-child {
    margin-bottom: 0;
}

/* Demo Note - 測試帳號備註 */
.demo-note {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.5rem;
}

.demo-note p {
    text-align: center;
    font-size: 0.6875rem;  /* 11px - 更小的字 */
    color: rgb(107, 114, 128);
    letter-spacing: 0.01em;
}

/* Links 區塊（底部對齊，含分隔線） */
.links-section {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.5);
    display: flex;
    align-items: center;
}

/* Side Project Description */
.side-project-description {
    font-size: 0.875rem;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: rgb(156, 163, 175);
}

/* ===== Side Project 背面按鈕區塊 ===== */

/* Demo 按鈕容器 */
.demo-actions {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Demo 按鈕（主要 CTA） */
.demo-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.demo-button:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.demo-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.demo-icon {
    font-size: 1rem;
    line-height: 1;
}

/* 次要連結組 */
.secondary-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.secondary-links a {
    font-size: 0.875rem;
    color: rgb(156, 163, 175);
    text-decoration: none;
    transition: color 0.2s ease;
}

.secondary-links a:hover {
    color: rgb(96, 165, 250);
}

/* Light Mode 支援 */
body.light-mode .side-project-card .card-image-front {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-mode .side-project-card:hover .card-image-front {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body.light-mode .image-overlay {
    /* background: rgba(0, 0, 0, 0.45); */
    background: rgba(193, 193, 193, 0.45);
}

body.light-mode .work-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgb(229, 231, 235);
}

body.light-mode .work-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-mode .role-tag {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    color: rgb(234, 88, 12);
}

body.light-mode .description-front {
    color: rgb(75, 85, 99);
}

body.light-mode .label-text {
    color: rgb(107, 114, 128);
}

body.light-mode .achievements-title {
    color: rgb(59, 130, 246);
}

body.light-mode .achievements-content {
    color: rgb(75, 85, 99);
}

body.light-mode .demo-note p {
    color: rgb(107, 114, 128);
}

body.light-mode .links-section {
    border-top-color: rgba(209, 213, 219, 0.5);
}

/* Light Mode - Demo 按鈕樣式 */
body.light-mode .demo-actions {
    border-top-color: rgba(209, 213, 219, 0.5);
}

body.light-mode .demo-button {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

body.light-mode .demo-button:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

body.light-mode .secondary-links a {
    color: rgb(107, 114, 128);
}

body.light-mode .secondary-links a:hover {
    color: rgb(37, 99, 235);
}

/* ========================================
   Toast Notification Styles
   ======================================== */

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.5rem;
    background-color: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Success Toast */
.toast-success {
    background-color: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    color: rgb(52, 211, 153);
}

/* Error Toast */
.toast-error {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(248, 113, 113);
}

/* Light Mode Toast */
body.light-mode .toast {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    color: #1f2937;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.light-mode .toast-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
    color: rgb(5, 150, 105);
}

body.light-mode .toast-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: rgb(220, 38, 38);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
        font-size: 0.875rem;
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }
}

/* ===== Side Project 垂直佈局響應式設計 ===== */

/* 所有尺寸都使用垂直佈局，只需維持圖片比例 */
@media (max-width: 640px) {
    .side-project-card .card-image-front {
        aspect-ratio: 1.44 / 1;
    }
}

/* ========================================
   Video Thumbnail and Play Button
   ======================================== */

.video-thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 1.25rem;
    border-radius: 0.375rem;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-thumbnail-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.video-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video Play Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.video-thumbnail-wrapper:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Play Icon */
.video-play-icon {
    width: 48px;
    height: 48px;
    color: white;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.video-thumbnail-wrapper:hover .video-play-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

/* ========================================
   Video Modal
   ======================================== */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Backdrop */
.video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

/* Modal Content */
.video-modal-content {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 1;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Close Button */
.video-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.video-modal-close:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95vw;
        max-height: 85vh;
    }

    .video-modal-close {
        top: auto;
        bottom: -3.5rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .video-modal-close:hover {
        transform: translateX(-50%) scale(1.05);
    }

    .video-modal-close:active {
        transform: translateX(-50%) scale(0.95);
    }
}
