/* Portfolio Page Styles */

/* Placeholder Images */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: placeholderFloat 8s ease-in-out infinite;
}

.placeholder-content {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* UI Design Placeholders */
.ui-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ui-mockup {
    width: 200px;
    height: 140px;
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.mockup-header {
    width: 100%;
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0, #e0e0e0);
    border-radius: 4px;
    margin-bottom: 12px;
}

.mockup-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mockup-element {
    height: 16px;
    background: linear-gradient(90deg, var(--primary-color), #ff8c5a);
    border-radius: 4px;
}

.mockup-element.small {
    width: 60%;
    height: 12px;
}

/* Mobile UI Placeholder */
.mobile-placeholder {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.mobile-mockup {
    width: 120px;
    height: 200px;
    background: #333;
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.mobile-header {
    width: 100%;
    height: 16px;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    border-radius: 8px;
    margin-bottom: 12px;
}

.mobile-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.mobile-card {
    height: 32px;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
}

/* 3D Placeholder */
.three-d-placeholder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    perspective: 1000px;
}

.three-d-scene {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3d 8s linear infinite;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.face {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255,255,255,0.3);
}

.front { background: rgba(255, 107, 53, 0.8); transform: rotateY(0deg) translateZ(50px); }
.back { background: rgba(78, 205, 196, 0.8); transform: rotateY(180deg) translateZ(50px); }
.right { background: rgba(102, 126, 234, 0.8); transform: rotateY(90deg) translateZ(50px); }
.left { background: rgba(240, 147, 251, 0.8); transform: rotateY(-90deg) translateZ(50px); }
.top { background: rgba(79, 172, 254, 0.8); transform: rotateX(90deg) translateZ(50px); }
.bottom { background: rgba(245, 87, 108, 0.8); transform: rotateX(-90deg) translateZ(50px); }

@keyframes rotate3d {
    0% { transform: rotateX(0) rotateY(0); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Abstract Placeholder */
.abstract-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.abstract-shapes {
    width: 150px;
    height: 150px;
    position: relative;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: floatShape 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.shape-2 {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    top: 60px;
    right: 30px;
    animation-delay: -2s;
}

.shape-3 {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    bottom: 30px;
    left: 40px;
    animation-delay: -4s;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Video Placeholder */
.video-placeholder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
}

.video-player {
    width: 180px;
    height: 120px;
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-button {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.video-timeline {
    width: 80%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    position: relative;
}

.video-timeline::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 40%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Music Placeholder */
.music-placeholder {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.music-visualizer {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
}

.bar {
    width: 8px;
    background: linear-gradient(to top, var(--primary-color), #ff8c5a);
    border-radius: 4px 4px 0 0;
    animation: bounce 1.5s ease-in-out infinite;
}

.bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.bar:nth-child(2) { height: 40px; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 60px; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 35px; animation-delay: 0.3s; }
.bar:nth-child(5) { height: 25px; animation-delay: 0.4s; }

@keyframes bounce {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.3); }
}

@keyframes placeholderFloat {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(1px, -2px) scale(1.01); }
    66% { transform: translate(-1px, 1px) scale(0.99); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Different delays for placeholder types */
.three-d-placeholder { animation-delay: -1.5s; }
.abstract-placeholder { animation-delay: -3s; }

/* Different animation delays for each work card */
.work-card:nth-child(1) .work-image { animation-delay: 0s; }
.work-card:nth-child(2) .work-image { animation-delay: -1s; }
.work-card:nth-child(3) .work-image { animation-delay: -2s; }
.work-card:nth-child(4) .work-image { animation-delay: -3s; }
.work-card:nth-child(5) .work-image { animation-delay: -4s; }
.work-card:nth-child(6) .work-image { animation-delay: -5s; }

.work-category {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.work-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-tag {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.work-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.work-details {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.work-challenge,
.work-solution {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.work-challenge:last-child,
.work-solution:last-child {
    margin-bottom: 0;
}

.work-challenge strong,
.work-solution strong {
    color: var(--primary-color);
}

.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.coming-soon-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.coming-soon-description {
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Modal styles for future use */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 1;
}

/* Make work cards clickable */
.work-card:not(.featured-card) {
    cursor: pointer;
}

.work-card:not(.featured-card):hover .work-overlay {
    opacity: 1;
}

.portfolio-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(255, 255, 255, 0.1) 100%), url('../images/portfolio/hero_port.png') top center/contain no-repeat;
    background-attachment: fixed;
    text-align: center;
    position: relative;
}

.portfolio-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.portfolio-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.portfolio-note {
    font-size: 0.95rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 1.5rem auto 0;
    opacity: 0.8;
    font-style: italic;
    line-height: 1.6;
}

/* Services Overview Section */
.services-overview {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.services-overview .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.services-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.services-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Service Card Styles */
.service-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.service-card-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.service-card-image img,
.service-card-image svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.service-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
    opacity: 1 !important;
}

.service-card-description {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: #1a1a1a !important;
    font-weight: 500 !important;
    margin-bottom: 1.5rem !important;
    flex: 1 !important;
    opacity: 1 !important;
}

.service-card-btn {
    align-self: flex-start;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(243, 156, 18, 0.3);
}

.service-card-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

/* Featured Works Intro Section */
.featured-works-intro {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    text-align: center;
}

.featured-works-intro .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.featured-description {
    margin-bottom: 2.5rem;
}

.featured-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.featured-note {
    font-size: 0.95rem !important;
    color: var(--text-light) !important;
    font-style: italic;
    margin-top: 2rem !important;
}

.playground-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #e67e22 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.playground-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.playground-link-btn .btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.playground-link-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.portfolio-filters {
    padding: 1.5rem 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    width: 100%;
}

.portfolio-filters.is-sticky {
    position: fixed;
    top: 80px; /* 导航栏高度 */
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.portfolio-filters .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap; /* 防止按钮文字换行 */
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.portfolio-grid {
    padding: 4rem 0;
    background: var(--bg-light);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Playground page: Hero background */
.playground-page .portfolio-hero {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%), url('../images/portfolio/hero_play.png') top center/contain no-repeat;
    background-attachment: fixed;
}

/* Playground page: 3 columns layout */
.playground-page .works-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Playground page: Featured image - show complete gif */
.playground-page .featured-image {
    background: linear-gradient(180deg, #445eb1 0%, #4d3fb6 30%, #6b2bae 70%, #7c21ad 100%) !important;
}

.playground-page .featured-image .container {
    height: auto !important;
    overflow: visible !important;
}

.playground-page .featured-image img {
    object-fit: contain !important;
    height: auto !important;
    position: relative !important;
    transform: none !important;
    max-height: 600px;
}

.work-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    animation: cardFloatIn 0.6s ease-out forwards;
}

/* Card float-in animation */
@keyframes cardFloatIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.work-card:nth-child(1) { animation-delay: 0s; }
.work-card:nth-child(2) { animation-delay: 0.1s; }
.work-card:nth-child(3) { animation-delay: 0.2s; }
.work-card:nth-child(4) { animation-delay: 0.3s; }
.work-card:nth-child(5) { animation-delay: 0.4s; }
.work-card:nth-child(6) { animation-delay: 0.5s; }
.work-card:nth-child(7) { animation-delay: 0.6s; }
.work-card:nth-child(8) { animation-delay: 0.7s; }
.work-card:nth-child(9) { animation-delay: 0.8s; }
.work-card:nth-child(10) { animation-delay: 0.9s; }
.work-card:nth-child(11) { animation-delay: 1s; }
.work-card:nth-child(12) { animation-delay: 1.1s; }

/* Load more button */
.load-more-indicator {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.load-more-text {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-more-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

.work-card:hover {
    transform: translateY(-15px) rotateX(8deg) rotateY(5deg);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform-style: preserve-3d;
}

.work-card:hover .work-image {
    transform: translateZ(20px);
}

.work-card:hover .work-info {
    transform: translateZ(15px);
}

.work-card:hover .work-meta {
    transform: translateZ(25px);
}

.work-card:hover .work-title {
    transform: translateZ(30px);
}

.work-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--primary-color), #ff8c5a, var(--primary-color));
    border-radius: 16px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
}

.work-card:hover::before {
    opacity: 0.1;
}

.work-image {
    width: 100%;
    height: 280px;
    background: #000;  /* 黑色背景 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.125rem;
    position: relative;
    overflow: hidden;
}

/* 视频图标 */
.video-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    background: rgba(78, 205, 196, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    transition: all 0.3s ease;
    opacity: 1;
    pointer-events: none;
}

.video-icon svg {
    width: 24px;
    height: 24px;
}

/* 鼠标悬停时隐藏图标 */
.work-card:hover .video-icon {
    opacity: 0;
    transform: scale(0.8);
}

/* Category overview cards - keep gradient background for placeholders */
.work-card.category-overview .work-image {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    animation: floatImage 6s ease-in-out infinite;
}

.work-card.category-overview .work-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-color), #ff8c5a);
    opacity: 0.1;
}

/* All work cards with images/videos - Complete display (Dribbble style) */
.work-card .work-image img,
.work-card .work-image video {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* 完整显示图片，不裁剪 */
    object-position: center;
    display: block;
    background: #000;  /* 黑色背景填充空白区域 */
}

/* 隐藏视频的默认控制按钮 */
.work-card .work-image video::-webkit-media-controls {
    display: none !important;
}

.work-card .work-image video::-webkit-media-controls-enclosure {
    display: none !important;
}

.work-card .work-image video::-webkit-media-controls-panel {
    display: none !important;
}

.work-card .work-image video::-webkit-media-controls-play-button {
    display: none !important;
}

.work-image img {
    transition: transform 0.3s ease;
}

.work-card:hover .work-image img {
    transform: scale(1.05) rotate(1deg);
}

.work-content, .work-info {
    padding: 1.5rem;
}

.work-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

.work-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.work-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

/* 不同分类的颜色 - Playground 页面 */
.work-card[data-card-type="3D Art"] .work-type {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.work-card[data-card-type="Motion / Animation"] .work-type {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.work-card[data-card-type="Game UI"] .work-type {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.work-card[data-card-type="Watch UI"] .work-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.work-card[data-card-type="Illustration"] .work-type {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

/* 不同分类的颜色 - Portfolio 页面 */
.work-card[data-card-type="Web / Multilingual / Brand"] .work-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.work-card[data-card-type="App / UI / SaaS"] .work-type {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.work-card[data-card-type="3D × Web / Visual"] .work-type {
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
}

.work-card[data-card-type="Motion / Micro Interaction"] .work-type {
    background: linear-gradient(135deg, #56ccf2 0%, #2f80ed 100%);
}

.work-card[data-card-type="フィンテック"] .work-type,
.work-card[data-card-type="Fintech"] .work-type {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.work-card[data-card-type="企業プロジェクト"] .work-type,
.work-card[data-card-type="Corporate Project"] .work-type {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.work-card[data-card-type="プロダクト"] .work-type,
.work-card[data-card-type="Product"] .work-type {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.work-card[data-card-type="E-Commerce"] .work-type {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.work-card[data-card-type="ゲーム"] .work-type,
.work-card[data-card-type="Game"] .work-type {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.work-card[data-card-type="教育"] .work-type,
.work-card[data-card-type="Education"] .work-type {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.work-duration {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Portfolio Stats */
.portfolio-stats {
    padding: 3rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Portfolio Modal Styles */
.portfolio-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.portfolio-modal.active {
    display: flex;
}

.portfolio-modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    touch-action: pan-y; /* Allow vertical scrolling */
}

/* Swipe indicator at the top of modal */
.portfolio-modal-content::before {
    content: '';
    position: sticky;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    display: block;
    margin: 12px auto 8px;
    z-index: 10;
    transition: background 0.3s ease;
}

.portfolio-modal-content:active::before {
    background: #bbb;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.portfolio-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.portfolio-modal-close:hover {
    background: #f0f0f0;
    color: #000;
    transform: scale(1.1);
}

/* Dribbble-style vertical image layout */
.detail-image {
    width: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    position: relative;
}

.detail-image img,
.detail-image video {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #000;
}

/* Responsive - images stay vertical on mobile too */
@media (max-width: 768px) {
    .detail-image img,
    .detail-image video {
        width: 100%;
        height: auto;
    }
}

.detail-content {
    padding: 40px;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.detail-category {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.detail-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 10px;
}

.detail-section ul {
    list-style: none;
    padding-left: 0;
}

.detail-section li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.detail-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.detail-tag {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.detail-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

@keyframes floatImage {
    0% { transform: translate(0px, 0px) rotate(0deg); }
    25% { transform: translate(2px, -3px) rotate(0.5deg); }
    50% { transform: translate(-1px, -2px) rotate(-0.3deg); }
    75% { transform: translate(-2px, 1px) rotate(0.2deg); }
    100% { transform: translate(0px, 0px) rotate(0deg); }
}

@media (max-width: 768px) {
    .portfolio-hero {
        background-attachment: scroll;
    }

    .portfolio-title {
        font-size: 2rem;
    }

    .services-overview {
        padding: 60px 0;
    }

    .services-overview .container {
        padding: 0 20px;
    }

    .services-title {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .services-subtitle {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card-image {
        height: 200px;
        padding: 1.5rem;
    }

    .service-card-content {
        padding: 1.5rem;
    }

    .service-card-title {
        font-size: 1.25rem;
    }

    .service-card-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .service-card-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .featured-works-intro {
        padding: 60px 0;
    }

    .featured-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .featured-description p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .featured-note {
        font-size: 0.9rem !important;
        margin-top: 1.5rem !important;
    }

    .playground-link-btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 20px;
    }

    .portfolio-filters {
        padding: 1rem 0;
    }

    .portfolio-filters.is-sticky {
        top: 80px; /* 移动端导航栏高度也是 80px */
    }

    .filter-buttons {
        justify-content: flex-start;
        flex-wrap: nowrap; /* 不换行 */
        overflow-x: auto; /* 横向滚动 */
        overflow-y: hidden;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
        scrollbar-width: none; /* Firefox 隐藏滚动条 */
        -ms-overflow-style: none; /* IE/Edge 隐藏滚动条 */
    }

    /* 隐藏滚动条 */
    .filter-buttons::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex-shrink: 0; /* 防止按钮被压缩 */
    }

    .portfolio-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
    }

    .portfolio-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .detail-content {
        padding: 20px;
    }

    .detail-title {
        font-size: 1.8rem;
    }

    .detail-image {
        height: auto;
        min-height: auto;
    }

    .detail-image img,
    .detail-image video {
        width: 100%;
        height: auto;
        display: block;
    }

    .detail-section {
        margin-bottom: 20px;
    }

    .detail-section h3 {
        font-size: 1.1rem;
    }

    .detail-section p,
    .detail-section li {
        font-size: 0.95rem;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }

    .detail-tags {
        flex-wrap: wrap;
        gap: 8px;
    }

    .detail-tag {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

