/* 全局样式 */

 :root {
    /* 主色调 */
    --primary-dark: #0a1929;
    /* 深蓝色背景 */
    --primary-light: #1e3a5f;
    /* 较亮的蓝色 */
    --accent-gold: #d4af37;
    /* 金色强调 */
    --accent-red: #8b0000;
    /* 暗红色强调 */
    --text-light: #e0e0e0;
    /* 浅色文本 */
    --text-dark: #121212;
    /* 深色文本 */
    --metal-gray: #3a3a3c;
    /* 金属灰 */
    --metal-light: #7a7a7c;
    /* 浅金属灰 */
    /* 字体 */
    --font-main: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --font-title: 'Cinzel', 'SimHei', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    background-image: linear-gradient(rgba(10, 25, 41, 0.95), rgba(10, 25, 41, 0.95)), url('../images/dragon-scale-pattern.svg');
    background-attachment: fixed;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--text-light);
    transition: all 0.3s ease;
}


/* 导航栏样式 */

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(10, 25, 41, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--accent-gold);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
    filter: drop-shadow(0 0 5px var(--accent-gold));
}

.logo-text {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-gold);
}

.nav-links a.active::after {
    width: 100%;
}

.admission-btn {
    background-color: var(--accent-red);
    padding: 0.5rem 1rem !important;
    border-radius: 4px;
    color: var(--text-light) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

.admission-btn:hover {
    background-color: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.7);
}


/* Hero区域样式 */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 60px;
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.9), rgba(30, 58, 95, 0.8)), url('../images/castle-bg.svg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    z-index: 2;
    animation: fadeIn 1.5s ease;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background-color: var(--accent-gold);
    color: var(--text-dark);
    background-color: #e5c158;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.7);
}

.btn.secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.btn.secondary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5);
}


/* 齿轮动画 */

.gear-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
    pointer-events: none;
}

.gear {
    position: absolute;
    background-image: url('../images/gear.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}

.gear-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    right: 15%;
    animation: rotate 20s linear infinite;
}

.gear-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    animation: rotate 15s linear infinite reverse;
}

.gear-3 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    right: 5%;
    animation: rotate 25s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

margin-bottom: 6rem;
opacity: 0;
transform: translateY(30px);
transition: all 1s ease;

}
section.visible {
    opacity: 1;
    transform: translateY(0);
}
section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
section h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    bottom: -10px;
    left: 20%;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* 学院简介样式 */
.intro-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.intro-text {
    flex: 2;
}
.intro-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}
.features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}
.features i {
    color: var(--accent-gold);
    font-size: 1.2rem;
}
.intro-stats {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 仪表盘效果 */
.stat-meter {
    position: relative;
    width: 200px;
    height: 200px;
}
.meter-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--metal-gray), var(--metal-light));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.5);
    border: 2px solid var(--accent-gold);
}
.meter-circle::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.meter-circle::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.meter-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.meter-label {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* 新闻区域样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.news-card {
    background-color: rgba(30, 58, 95, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    height: 300px;
    position: relative;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-gold);
}
.news-image {
    height: 60%;
    background-color: var(--primary-light);
    background-image: url('../images/news-placeholder.svg');
    background-size: cover;
    background-position: center;
    position: relative;
}
.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--primary-dark));
}
.news-content {
    padding: 1.5rem;
}
.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* 卡片通用样式 */
.card {
    background: rgba(30, 58, 95, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-gold);
}

/* 角色卡片样式 */
.character-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 0 2rem;
}
.character-card {
    background: rgba(30, 58, 95, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
}

/* 桌面端大屏幕布局 */
@media (min-width: 1400px) {
    .character-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 中等屏幕布局 */
@media (max-width: 1399px) and (min-width: 1024px) {
    .character-cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

/* 平板布局 */
@media (max-width: 1023px) and (min-width: 768px) {
    .character-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: 1.5rem;
    }
}

/* 移动端布局 */
@media (max-width: 767px) {
    .character-cards {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }
    
    .character-card {
        flex-direction: row;
        height: 160px;
    }
    
    .character-image {
        width: 120px;
        height: 160px;
    }
    
    .character-info {
        flex: 1;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}
.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-gold);
}
.character-image {
    height: 200px;
    background-color: var(--primary-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.character-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.character-card:hover .character-image img {
    transform: scale(1.05);
}
.character-info {
    padding: 1.5rem;
}
.character-info h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}
.character-info .title {
    color: var(--text-light);
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.character-info .desc {
    color: var(--text-light);
    opacity: 0.7;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.character-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}
.character-stats span {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.character-stats i {
    color: var(--accent-gold);
}

/* 装备卡片样式 */
.equipment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.equipment-card {
    background: rgba(30, 58, 95, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}
.equipment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-gold);
}
.equipment-image {
    height: 180px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}
.equipment-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.equipment-card:hover .equipment-image img {
    transform: scale(1.1);
}
.equipment-info {
    padding: 1.5rem;
}
.equipment-info h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}
.equipment-info .type {
    color: var(--text-light);
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.equipment-info .desc {
    color: var(--text-light);
    opacity: 0.7;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.equipment-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}
.equipment-stats span {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.equipment-stats i {
    color: var(--accent-gold);
}

/* 言灵图鉴样式 */
.grimoire-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}
.grimoire-card {
    width: 200px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}
.grimoire-card:hover .card-front {
    transform: rotateY(180deg);
}
.grimoire-card:hover .card-back {
    transform: rotateY(0);
}
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s ease;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.card-front {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border: 2px solid var(--accent-gold);
}
.card-back {
    background: linear-gradient(135deg, var(--accent-red), var(--primary-dark));
    transform: rotateY(180deg);
    border: 2px solid var(--accent-gold);
}
.spell-icon {
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 1rem 0;
}

/* 页脚样式 */
footer {
    background-color: rgba(10, 25, 41, 0.95);
    border-top: 1px solid var(--accent-gold);
    padding: 3rem 5% 1rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 2rem;
}
.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.footer-section ul {
    list-style: none;
}
.footer-section ul li {
    margin-bottom: 0.5rem;
}
.footer-section ul li a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        padding: 1rem;
    }
    
    .nav-logo {
        margin-bottom: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .intro-content {
        flex-direction: column;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    /* 角色卡片移动端样式 */
    
    .character-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .character-card {
        flex-direction: row;
        height: auto;
    }
    
    .character-image {
        width: 120px;
        height: 160px;
    }
    
    .character-silhouette {
        width: 80px;
        height: 120px;
    }
    
    .character-info {
        padding: 1rem;
    }
    
    .character-info h3 {
        font-size: 1.1rem;
    }
    
    .character-stats {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    /* 装备卡片移动端样式 */
    
    .equipment-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .equipment-image {
        height: 140px;
        font-size: 2.5rem;
    }
    
    .equipment-info {
        padding: 1rem;
    }
    
    .equipment-info h3 {
        font-size: 1.1rem;
    }
    
    .equipment-stats {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    /* 言灵卡片移动端样式 */
    
    .grimoire-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .grimoire-card {
        width: 90%;
        margin-bottom: 1rem;
    }
}
@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    section h2 {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    
    50% {
        transform: scale(1.05);
    }
    
    100% {
        transform: scale(1);
    }
}
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
    
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    }
    
    100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
}

/* 言灵特效 */
[data-spell="君焰"] .spell-icon {
    background-image: url('../images/spell-fire.svg');
    animation: glow 3s infinite;
    filter: hue-rotate(0deg);
}
[data-spell="君焰"]:hover .spell-icon {
    filter: hue-rotate(30deg) brightness(1.2);
}
[data-spell="时间零"] .spell-icon {
    background-color: #3a6ca8;
    border-radius: 50%;
    position: relative;
    animation: pulse 4s infinite;
}
[data-spell="时间零"] .spell-icon::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 80%;
    border: 2px solid #d4af37;
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation: rotate 10s linear infinite;
}
[data-spell="时间零"] .spell-icon::after {
    content: "";
    position: absolute;
    width: 40%;
    height: 40%;
    background-color: #d4af37;
    border-radius: 50%;
    top: 30%;
    left: 30%;
}
[data-spell="镰鼬"] .spell-icon {
    background-color: #2a4a6e;
    position: relative;
    overflow: hidden;
}
[data-spell="镰鼬"] .spell-icon::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 10px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    top: 45%;
    left: -25%;
    animation: moveLeftRight 3s ease-in-out infinite;
}
@keyframes moveLeftRight {
    0% {
        transform: translateX(-30%);
    }
    
    50% {
        transform: translateX(30%);
    }
    
    100% {
        transform: translateX(-30%);
    }
}
[data-spell="青铜御座"] .spell-icon {
    background-color: #3a3a3c;
    position: relative;
    border: 2px solid #d4af37;
}
[data-spell="青铜御座"] .spell-icon::before {
    content: "";
    position: absolute;
    width: 60%;
    height: 60%;
    border: 2px solid #d4af37;
    top: 20%;
    left: 20%;
    animation: pulse 2s infinite;
}
[data-spell="青铜御座"] .spell-icon::after {
    content: "";
    position: absolute;
    width: 30%;
    height: 30%;
    background-color: #d4af37;
    top: 35%;
    left: 35%;
}

/* 卡片悬停动画 */
.character-card:hover .character-silhouette {
    animation: pulse 2s infinite;
}
.equipment-card:hover .equipment-image i {
    animation: glow 2s infinite;
    transform: scale(1.1);
}