/* ============================================
   叩门 - 出山页面 · 星图主题样式
   ============================================ */

/* 星空 Canvas */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 星云装饰层 */
.nebula-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: nebulaDrift 20s ease-in-out infinite alternate;
}

.nebula-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #1a237e 0%, transparent 70%);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.nebula-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #4a148c 0%, transparent 70%);
    bottom: 10%;
    left: -5%;
    animation-delay: -7s;
}

.nebula-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #0d47a1 0%, transparent 70%);
    top: 40%;
    left: 40%;
    animation-delay: -14s;
}

@keyframes nebulaDrift {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
    100% { transform: translate(10px, -10px) scale(1.05); }
}

/* 页面容器 */
.starmap-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 100px;
    color: #e0e0e0;
}

/* ============================================
   顶部标题区
   ============================================ */
.starmap-header {
    text-align: center;
    padding: 60px 20px 30px;
}

.starmap-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(100, 181, 246, 0.5), 0 0 60px rgba(100, 181, 246, 0.2);
    letter-spacing: 0.2em;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 30px rgba(100, 181, 246, 0.5), 0 0 60px rgba(100, 181, 246, 0.2); }
    100% { text-shadow: 0 0 40px rgba(100, 181, 246, 0.7), 0 0 80px rgba(100, 181, 246, 0.3); }
}

.starmap-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 2;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   星辰统计
   ============================================ */
.star-stats {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    color: #64b5f6;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   星图区域
   ============================================ */
.constellation-section {
    padding: 20px 40px;
}

.constellation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

/* ============================================
   星辰卡片
   ============================================ */
.star-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.star-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.star-card:hover::before {
    opacity: 1;
}

.star-card:hover {
    transform: translateY(-6px);
    border-color: rgba(100, 181, 246, 0.3);
    box-shadow: 0 8px 32px rgba(100, 181, 246, 0.15), 0 0 60px rgba(100, 181, 246, 0.05);
}

/* 已点亮状态 */
.star-card.lit {
    border-color: rgba(100, 181, 246, 0.25);
    background: rgba(100, 181, 246, 0.06);
}

.star-card.lit::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 30px rgba(100, 181, 246, 0.08);
    pointer-events: none;
}

/* 星辰图标 */
.star-icon {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-visual {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    filter: drop-shadow(0 0 0px transparent);
}

.star-card:hover .star-visual {
    color: rgba(255, 255, 255, 0.5);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.star-card.lit .star-visual {
    color: #ffd54f;
    filter: drop-shadow(0 0 12px rgba(255, 213, 79, 0.6)) drop-shadow(0 0 24px rgba(255, 213, 79, 0.3));
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(255, 213, 79, 0.6)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 20px rgba(255, 213, 79, 0.8)); }
}

/* 星辰光晕 */
.star-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

.star-card:hover .star-halo {
    opacity: 1;
    width: 100px;
    height: 100px;
}

.star-card.lit .star-halo {
    opacity: 1;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 213, 79, 0.2) 0%, transparent 70%);
    animation: haloBreath 3s ease-in-out infinite;
}

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

/* 先贤信息 */
.star-mentor-name {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.star-card:hover .star-mentor-name,
.star-card.lit .star-mentor-name {
    color: #ffffff;
}

.star-mentor-era {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
}

.star-mentor-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* 点亮按钮 */
.light-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 24px;
    border-radius: 20px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.light-btn:hover {
    background: rgba(100, 181, 246, 0.15);
    border-color: rgba(100, 181, 246, 0.4);
    color: #64b5f6;
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.2);
}

.star-card.lit .light-btn {
    background: rgba(255, 213, 79, 0.1);
    border-color: rgba(255, 213, 79, 0.3);
    color: #ffd54f;
    cursor: default;
}

.star-card.lit .light-btn:hover {
    box-shadow: none;
}

/* 点亮人数 */
.lit-count-inline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 8px;
}

.star-card.lit .lit-count-inline {
    color: rgba(255, 213, 79, 0.5);
}

/* ============================================
   提名区域
   ============================================ */
.nomination-section {
    padding: 40px 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.nomination-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.nomination-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    line-height: 1.8;
}

.nominate-btn {
    background: transparent;
    color: #64b5f6;
    border: 1px solid rgba(100, 181, 246, 0.3);
    padding: 12px 28px;
    border-radius: 24px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nominate-btn:hover {
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.5);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.15);
}

/* ============================================
   我的点亮记录
   ============================================ */
.my-stars-section {
    padding: 20px 40px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.my-stars-section .section-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 16px;
}

.my-stars-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-star-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.my-star-item .star-mini {
    font-size: 1.2rem;
    color: #ffd54f;
    filter: drop-shadow(0 0 4px rgba(255, 213, 79, 0.5));
}

.my-star-item .star-name {
    flex: 1;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.my-star-item .star-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

.empty-stars {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
}

/* ============================================
   点亮成功弹窗
   ============================================ */
.lit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.lit-modal.show {
    opacity: 1;
    visibility: visible;
}

.lit-modal-content {
    background: linear-gradient(145deg, rgba(30, 40, 80, 0.95) 0%, rgba(15, 20, 50, 0.95) 100%);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 360px;
    padding: 40px 32px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 60px rgba(100, 181, 246, 0.15), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.lit-modal.show .lit-modal-content {
    transform: scale(1);
}

.lit-star-icon {
    font-size: 3rem;
    color: #ffd54f;
    filter: drop-shadow(0 0 20px rgba(255, 213, 79, 0.6));
    margin-bottom: 16px;
    animation: starBurst 0.6s ease-out;
}

@keyframes starBurst {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.lit-title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.lit-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.lit-count {
    font-size: 0.8rem;
    color: rgba(100, 181, 246, 0.6);
    margin-bottom: 24px;
}

.lit-confirm-btn {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2) 0%, rgba(100, 181, 246, 0.1) 100%);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #64b5f6;
    padding: 10px 36px;
    border-radius: 24px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lit-confirm-btn:hover {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.3) 0%, rgba(100, 181, 246, 0.15) 100%);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.2);
}

/* ============================================
   提名弹窗
   ============================================ */
.nomination-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.nomination-modal.show {
    opacity: 1;
    visibility: visible;
}

.nom-modal-content {
    background: linear-gradient(145deg, rgba(30, 40, 80, 0.95) 0%, rgba(15, 20, 50, 0.95) 100%);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 0 40px rgba(100, 181, 246, 0.1);
}

.nomination-modal.show .nom-modal-content {
    transform: scale(1);
}

.nom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nom-modal-header h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 400;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nom-modal-body {
    padding: 24px;
}

.nom-modal-body .form-group {
    margin-bottom: 16px;
}

.nom-modal-body .form-group:last-child {
    margin-bottom: 0;
}

.nom-modal-body label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.form-input-dark,
.form-textarea-dark {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}

.form-input-dark:focus,
.form-textarea-dark:focus {
    border-color: rgba(100, 181, 246, 0.5);
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.1);
}

.form-input-dark::placeholder,
.form-textarea-dark::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.nom-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cancel-dark {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.btn-cancel-dark:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-submit-glow {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.25) 0%, rgba(100, 181, 246, 0.15) 100%);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #64b5f6;
}

.btn-submit-glow:hover {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.35) 0%, rgba(100, 181, 246, 0.2) 100%);
    box-shadow: 0 0 20px rgba(100, 181, 246, 0.2);
}

/* ============================================
   底部导航（深色版）
   ============================================ */
.bottom-nav-dark {
    background: rgba(10, 15, 35, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.bottom-nav-dark .nav-item {
    color: rgba(255, 255, 255, 0.35);
}

.bottom-nav-dark .nav-item:hover,
.bottom-nav-dark .nav-item.active {
    color: #64b5f6;
}

/* ============================================
   流星粒子效果（点亮时）
   ============================================ */
.sparkle-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffd54f;
    pointer-events: none;
    z-index: 999;
    animation: sparkleFly 1s ease-out forwards;
}

@keyframes sparkleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .starmap-title {
        font-size: 2.2rem;
    }
    
    .constellation-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
        padding: 20px;
    }
    
    .nomination-section,
    .my-stars-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .nebula-1 { width: 300px; height: 300px; }
    .nebula-2 { width: 250px; height: 250px; }
    .nebula-3 { width: 200px; height: 200px; }
}
