* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.page.active {
    opacity: 1;
    visibility: visible;
}

.loading-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.compass {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    animation: spin 3s linear infinite;
}

.compass::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
}

.compass::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 30px;
    background: #ff6b6b;
    border-radius: 2px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.loading-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress {
    width: 0;
    height: 100%;
    background: white;
    border-radius: 4px;
    animation: loading 2s ease-out forwards;
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

.home-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.home-content {
    text-align: center;
    z-index: 1;
    color: white;
}

.home-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.home-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.start-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease 0.4s both;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.element-1 {
    width: 100px;
    height: 100px;
    background: #ffd93d;
    top: 20%;
    left: 10%;
    animation: float 4s ease-in-out infinite;
}

.element-2 {
    width: 60px;
    height: 60px;
    background: #6bcb77;
    top: 60%;
    right: 15%;
    animation: float 3s ease-in-out infinite 1s;
}

.element-3 {
    width: 80px;
    height: 80px;
    background: #4d96ff;
    bottom: 25%;
    left: 20%;
    animation: float 5s ease-in-out infinite 0.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.game-page {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.progress-bar-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd93d, #ff6b6b);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-text {
    color: white;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

.game-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 150px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.card {
    width: 160px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
    position: relative;
}

.card-1 {
    animation: floatCard 3s ease-in-out infinite;
}

.card-2 {
    animation: floatCard 3.5s ease-in-out infinite 0.5s;
}

.card-3 {
    animation: floatCard 4s ease-in-out infinite 1s;
}

.card-4 {
    animation: floatCard 3.2s ease-in-out infinite 1.5s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(-2deg); }
}

.card-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover .card-inner,
.card:active .card-inner {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.card-hint {
    font-size: 12px;
    opacity: 0.6;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .card-glow {
    opacity: 1;
}

.card.unlocked .card-inner {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.3) 0%, rgba(255, 107, 107, 0.2) 100%);
    border-color: rgba(255, 217, 61, 0.6);
}

.game-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
}

.footer-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    padding: 20px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.close-btn:active {
    transform: scale(0.9);
}

.achievement-icon {
    font-size: 80px;
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.achievement-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.achievement-text {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

.modal-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-btn:active {
    transform: scale(0.98);
}

.poster-modal-content {
    padding-top: 50px;
}

.poster-container {
    margin-bottom: 20px;
}

#poster-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

#poster-image:active {
    transform: scale(0.98);
}

.poster-caption {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 10px;
}

.poster-desc h3,
.audio-desc h3,
.video-desc h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.poster-desc p,
.audio-desc p,
.video-desc p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

.audio-modal-content {
    padding-top: 50px;
}

.audio-player {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.audio-cover {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 auto 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.waveform-container {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 60px;
}

.waveform-bar {
    width: 8px;
    background: #667eea;
    border-radius: 4px;
    animation: wave 0.6s ease-in-out infinite;
}

.waveform-bar.bar-1 { height: 20px; animation-delay: 0s; }
.waveform-bar.bar-2 { height: 40px; animation-delay: 0.1s; }
.waveform-bar.bar-3 { height: 60px; animation-delay: 0.2s; }
.waveform-bar.bar-4 { height: 45px; animation-delay: 0.3s; }
.waveform-bar.bar-5 { height: 35px; animation-delay: 0.4s; }
.waveform-bar.bar-6 { height: 50px; animation-delay: 0.5s; }
.waveform-bar.bar-7 { height: 25px; animation-delay: 0.6s; }

@keyframes wave {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.5); }
}

.audio-player.playing .waveform-bar {
    animation-play-state: running;
}

.audio-player.paused .waveform-bar {
    animation-play-state: paused;
}

.audio-info {
    text-align: center;
}

.audio-title {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
}

.audio-progress-container {
    margin-bottom: 20px;
}

.audio-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin-bottom: 8px;
}

.audio-progress-fill {
    height: 100%;
    background: #667eea;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: left 0.1s linear;
}

.audio-time {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.audio-play-btn {
    width: 60px;
    height: 60px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #667eea;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.audio-play-btn:active {
    transform: scale(0.9);
}

.video-modal-content {
    padding-top: 50px;
}

.video-player {
    margin-bottom: 20px;
}

#video-element {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.ending-page {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 20px;
}

.ending-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
}

.ending-content {
    position: relative;
    z-index: 1;
}

.ending-title {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.works-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.work-thumb {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-thumb:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.work-icon {
    font-size: 32px;
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.profile-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.profile-card p {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
}

.design-thinking {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.design-thinking h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.design-thinking p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    text-align: justify;
}

.ending-buttons {
    display: flex;
    gap: 15px;
}

.ending-btn {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.ending-btn:active {
    transform: scale(0.98);
}

.share-btn {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.star-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.star {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ffd93d;
    border-radius: 50%;
    animation: starPop 1s ease forwards;
}

@keyframes starPop {
    0% {
        opacity: 1;
        transform: scale(0) translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: scale(1) translate(var(--tx), var(--ty));
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--tx), var(--ty));
    }
}

@media (max-width: 480px) {
    .card {
        width: 140px;
        height: 180px;
    }
    
    .card-icon {
        font-size: 40px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .game-container {
        height: calc(100vh - 180px);
    }
}