/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 格兰芬多配色 - 红色和金色 */
    --gryffindor-red: #740001;
    --gryffindor-gold: #D3A625;
    --gryffindor-red-bright: #AE0001;
    --gryffindor-gold-bright: #EEBA30;
    --magic-purple: #4A0E4E;
    --magic-blue: #0E4C92;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(116, 0, 1, 0.15);
    --text-light: #ffffff;
    --text-gray: #d4af37;
    --text-gold: #EEBA30;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* 魔法星星效果 - 增强版 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(3px 3px at 20% 30%, rgba(238, 186, 48, 0.8), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(174, 0, 1, 0.6), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(238, 186, 48, 0.9), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(211, 166, 37, 0.7), transparent),
        radial-gradient(3px 3px at 90% 60%, rgba(174, 0, 1, 0.5), transparent),
        radial-gradient(2px 2px at 15% 80%, rgba(238, 186, 48, 0.8), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(211, 166, 37, 0.6), transparent),
        radial-gradient(2px 2px at 40% 90%, rgba(238, 186, 48, 0.7), transparent),
        radial-gradient(3px 3px at 85% 85%, rgba(211, 166, 37, 0.9), transparent),
        radial-gradient(1px 1px at 25% 15%, rgba(174, 0, 1, 0.5), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: magicStars 15s ease infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes magicStars {
    0%, 100% { 
        background-position: 0% 0%;
        opacity: 0.8;
    }
    25% {
        background-position: 100% 0%;
        opacity: 1;
    }
    50% { 
        background-position: 100% 100%;
        opacity: 0.6;
    }
    75% {
        background-position: 0% 100%;
        opacity: 1;
    }
}

/* Vanta Background */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Gryffindor Banner */
.gryffindor-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, 
        var(--gryffindor-red) 0%, 
        var(--gryffindor-gold) 50%, 
        var(--gryffindor-red) 100%);
    padding: 10px 0;
    text-align: center;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(116, 0, 1, 0.5);
    animation: bannerGlow 3s ease-in-out infinite;
}

.banner-text {
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    font-family: 'Georgia', serif;
}

@keyframes bannerGlow {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(116, 0, 1, 0.5);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(211, 166, 37, 0.8);
    }
}

/* Container */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px 40px 20px; /* 顶部加padding给横幅留空间 */
}

/* Header Section */
.header {
    text-align: center;
    margin-bottom: 80px;
    padding: 60px 20px;
}

/* Avatar */
.avatar-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto 30px;
    overflow: hidden; /* 隐藏超出容器的部分 */
    background: transparent; /* 透明背景 */
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 42%; /* 调整图片位置，显示上部（脸部） */
    border: 6px solid var(--gryffindor-gold);
    box-shadow: 0 0 60px var(--gryffindor-gold),
                0 0 120px rgba(211, 166, 37, 0.8),
                0 0 180px var(--gryffindor-red);
    position: relative;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
    transform: scale(2); /* 图片放大到200% */
    transform-origin: center 42%; /* 从人物中心放大 */
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gryffindor-gold) 0%, var(--gryffindor-red) 50%, transparent 70%);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

/* Neon Title - 格兰芬多风格 */
.neon-title {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--gryffindor-red), var(--gryffindor-gold), var(--gryffindor-red-bright), var(--gryffindor-gold-bright));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
    text-shadow: 0 0 30px rgba(211, 166, 37, 0.5);
    margin-bottom: 20px;
    position: relative;
    font-family: 'Cinzel', 'Georgia', serif;
    letter-spacing: 2px;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--gryffindor-red-bright);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--gryffindor-gold-bright);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(61px, 9999px, 90px, 0); }
    20% { clip: rect(33px, 9999px, 65px, 0); }
    40% { clip: rect(28px, 9999px, 47px, 0); }
    60% { clip: rect(84px, 9999px, 95px, 0); }
    80% { clip: rect(45px, 9999px, 78px, 0); }
    100% { clip: rect(22px, 9999px, 56px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(26px, 9999px, 85px, 0); }
    20% { clip: rect(54px, 9999px, 36px, 0); }
    40% { clip: rect(71px, 9999px, 91px, 0); }
    60% { clip: rect(15px, 9999px, 68px, 0); }
    80% { clip: rect(82px, 9999px, 41px, 0); }
    100% { clip: rect(39px, 9999px, 73px, 0); }
}

/* Welcome Text */
.welcome-text {
    font-size: 1.4rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in;
}

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

/* Contact Info */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-gray);
}

.contact-item a {
    color: var(--gryffindor-gold-bright);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: var(--gryffindor-red-bright);
    text-shadow: 0 0 10px var(--gryffindor-gold);
}

.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Section Title */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-light);
}

/* Category */
.category {
    margin-bottom: 80px;
}

.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--gryffindor-gold-bright);
    text-shadow: 0 0 20px rgba(238, 186, 48, 0.5);
}

.category-icon {
    width: 36px;
    height: 36px;
    stroke-width: 2;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.video-card {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    border: 2px solid rgba(211, 166, 37, 0.4);
    box-shadow: 0 8px 32px rgba(116, 0, 1, 0.3);
    transition: all 0.4s ease;
}

.video-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--gryffindor-gold), 
        var(--gryffindor-red),
        var(--gryffindor-gold-bright));
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 300% 300%;
    animation: videoGlow 3s linear infinite;
}

.video-card:hover::before {
    opacity: 0.6;
}

@keyframes videoGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.video-card:hover {
    transform: translateY(-10px);
    border-color: var(--gryffindor-gold);
    box-shadow: 0 0 40px rgba(211, 166, 37, 0.6),
                0 12px 48px rgba(116, 0, 1, 0.4),
                0 0 60px rgba(238, 186, 48, 0.3);
}

.video-card iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Project Card */
.project-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid rgba(211, 166, 37, 0.3);
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: var(--text-light);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--gryffindor-gold) 0%, var(--gryffindor-red) 50%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--gryffindor-gold);
    box-shadow: 0 0 50px rgba(211, 166, 37, 0.6),
                0 15px 60px rgba(116, 0, 1, 0.5);
}

.project-card:hover .card-glow {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
}

.card-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(211, 166, 37, 0.5));
    animation: bounce 2s ease-in-out infinite;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover .card-icon {
    filter: drop-shadow(0 0 30px var(--gryffindor-gold)) 
            drop-shadow(0 0 40px var(--gryffindor-red));
    transform: scale(1.1) rotate(5deg);
}

/* 卡片图标的魔法光晕 */
.card-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, 
        rgba(238, 186, 48, 0.3) 0%, 
        transparent 70%);
    border-radius: 50%;
    animation: iconPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes iconPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.project-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.project-card p {
    font-size: 1rem;
    color: var(--text-gray);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .neon-title {
        font-size: 2.5rem;
    }

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

    .category-title {
        font-size: 1.5rem;
    }

    .avatar-container {
        width: 140px;
        height: 140px;
    }

    .contact-info {
        flex-direction: column;
        gap: 15px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 40px 20px;
        margin-bottom: 40px;
    }

    .banner-text {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .gryffindor-banner {
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .neon-title {
        font-size: 2rem;
    }

    .welcome-text {
        font-size: 1.1rem;
    }

    .contact-item {
        font-size: 0.95rem;
    }

    .project-card {
        padding: 30px 20px;
    }

    .card-icon {
        font-size: 3rem;
    }
}

/* Scroll Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category {
    animation: slideUp 0.6s ease-out;
}

/* 霍格沃茨信封效果 - 给邮箱链接 - 增强版 */
.contact-item a[href^="mailto"] {
    position: relative;
    display: inline-block;
}

.contact-item a[href^="mailto"]::before {
    content: '✉️ ';
    display: inline-block;
    animation: owlPost 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(238, 186, 48, 0.6));
}

/* 添加魔法粒子效果 */
.contact-item a[href^="mailto"]::after {
    content: '✨';
    position: absolute;
    left: -10px;
    top: -10px;
    font-size: 0.8em;
    animation: magicParticle 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes owlPost {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-8deg);
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
    }
    75% {
        transform: translateY(-6px) rotate(8deg);
    }
}

@keyframes magicParticle {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-5px, -15px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-10px, -25px) scale(0.5);
    }
}

/* 魔法光环效果 - 增强版 */
.project-card::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        var(--gryffindor-red), 
        var(--gryffindor-gold), 
        var(--gryffindor-red-bright),
        var(--gryffindor-gold-bright),
        var(--gryffindor-red));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 400% 400%;
    animation: magicGlow 4s linear infinite;
    filter: blur(8px);
}

.project-card:hover::after {
    opacity: 0.8;
}

@keyframes magicGlow {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 添加悬停时的魔法粒子 */
.project-card:hover .card-icon::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    animation: sparkle 1s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
}

/* Tabs Styles */
.tabs-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.tabs-nav {
    position: sticky;
    top: 60px; /* 在Gryffindor banner下方 */
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    background: rgba(116, 0, 1, 0.95);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: rgba(116, 0, 1, 0.2);
    border: 2px solid var(--gryffindor-gold);
    border-radius: 15px;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 186, 48, 0.3), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    background: rgba(174, 0, 1, 0.4);
    border-color: var(--gryffindor-gold-bright);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(211, 166, 37, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--gryffindor-red-bright), var(--gryffindor-gold));
    border-color: var(--gryffindor-gold-bright);
    box-shadow: 0 8px 25px rgba(211, 166, 37, 0.6);
    transform: scale(1.05);
}

.tab-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.tabs-content {
    position: relative;
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

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

/* 个人简介样式 */
.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-text {
    background: rgba(116, 0, 1, 0.15);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid var(--gryffindor-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-light);
}

.intro-text h3 {
    color: var(--gryffindor-gold-bright);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlight-box {
    background: rgba(174, 0, 1, 0.2);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 5px solid var(--gryffindor-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.highlight-box ul {
    list-style: none;
    padding-left: 0;
}

.highlight-box ul li {
    padding: 10px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(211, 166, 37, 0.2);
}

.highlight-box ul li:last-child {
    border-bottom: none;
}

.highlight-box.challenge {
    background: rgba(74, 14, 78, 0.3);
    border-left-color: var(--magic-purple);
}

.highlight-box.achievement {
    background: linear-gradient(135deg, rgba(174, 0, 1, 0.2), rgba(211, 166, 37, 0.2));
    border-left-color: var(--gryffindor-gold-bright);
}

.highlight-box strong {
    color: var(--gryffindor-gold-bright);
}

.thanks {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gryffindor-gold-bright);
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(238, 186, 48, 0.5);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 20px rgba(238, 186, 48, 0.8);
    }
}

/* 成就图片展示 */
.achievement-photos {
    display: flex;
    gap: 25px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(211, 166, 37, 0.3);
    align-items: flex-start;
}

.photo-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photo-right {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.achievement-img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: 3px solid var(--gryffindor-gold);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.achievement-img-tall {
    max-height: none; /* 竖版图片允许更高 */
}

.achievement-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(211, 166, 37, 0.5);
    border-color: var(--gryffindor-gold-bright);
}

/* 响应式：小屏幕时垂直堆叠 */
@media (max-width: 768px) {
    .achievement-photos {
        flex-direction: column;
    }
}

/* 文档卡片样式 */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.document-card {
    background: rgba(116, 0, 1, 0.15);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid var(--gryffindor-gold);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(211, 166, 37, 0.4);
}

.document-preview {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
}

.document-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.document-info {
    text-align: center;
}

.document-info h4 {
    color: var(--gryffindor-gold-bright);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.view-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--gryffindor-red-bright), var(--gryffindor-gold));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(211, 166, 37, 0.3);
}

.view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(211, 166, 37, 0.5);
}

/* 视频卡片样式 - 更新为本地视频 */
.video-card {
    position: relative;
    background: rgba(116, 0, 1, 0.15);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--gryffindor-gold);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(211, 166, 37, 0.4);
}

.video-card video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

.video-card h4 {
    padding: 15px;
    color: var(--gryffindor-gold-bright);
    font-size: 1rem;
    text-align: center;
    background: rgba(10, 10, 10, 0.8);
}

/* 竖版视频布局 */
.video-grid-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 30px;
    margin-top: 30px;
    justify-content: center;
}

.video-card-vertical {
    position: relative;
    background: rgba(116, 0, 1, 0.15);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--gryffindor-gold);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    max-width: 320px;
    margin: 0 auto;
}

.video-card-vertical:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(211, 166, 37, 0.4);
}

.video-card-vertical video {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    background: #000;
    object-fit: contain;
}

.video-card-vertical h4 {
    padding: 15px;
    color: var(--gryffindor-gold-bright);
    font-size: 0.95rem;
    text-align: center;
    background: rgba(10, 10, 10, 0.8);
}

/* 分类标题样式 */
.category-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    color: var(--gryffindor-gold-bright);
    margin: 30px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gryffindor-gold);
}

.category-icon {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    color: var(--gryffindor-gold);
}
