a:link, a:visited {
    color: black;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a1628 0%, #1a2744 50%, #0f1c35 100%);
    position: relative;
    height: 100vh;
    width: 100vw;
    touch-action: none;
    padding: 0;
    margin: 0;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: url("../images/starry-sky/ideestar-background.webp");
    background-size: cover;
    background-position: center;
}

.star-bg {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0.2;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    animation: starTwinkle 4s infinite ease-in-out;
}

@keyframes starTwinkle {
    0% {
        opacity: 0.2;
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    }
    22% {
        opacity: 0.7;
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    }
    36% {
        opacity: 0.3;
        box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    }
    58% {
        opacity: 0.9;
        box-shadow: 0 0 8px rgba(255, 255, 255, 1);
    }
    75% {
        opacity: 0.4;
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    }
    100% {
        opacity: 0.2;
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
    }
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    filter: blur(60px);
}

.logo-container {
    position: absolute;
    top: 40px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    z-index: 100;
}

.constellation-container {
    position: relative;
    width: 100%;
    height: 100%;
}

svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.connection {
    stroke-width: 1.5;
    fill: none;
    opacity: 0.8;
}
.connection-secondary {
    stroke: #717f8b;
    stroke-dasharray: 3, 2;
}
.connection-tertiary {
    stroke: rgba(255, 255, 255, 0.2);
}

.star-node-box {
    position: absolute;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    transform: translateZ(0);
}

.star-node-icon {
    --delay: 0s;
    transform-origin: center;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    animation: mainStarTwinkle 6s infinite ease-in-out;
    animation-delay: var(--delay);
    transform: scale(0.5);
    transition: opacity 0.8s ease-out, transform 0.3s ease;
}

body.loaded-content .star-node-icon {
    opacity: 1;
    transform: scale(0.5);
    transition-delay: 0.3s;
}

@keyframes mainStarTwinkle {
    0% {
        opacity: 0.7;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    }
    40% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    }
    100% {
        opacity: 0.7;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
    }
}

.star-node-box:hover .star-node-icon {
    transform: scale(0.8);
    z-index: 50;
    animation-play-state: paused;
}

.star-node-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: flex-start;
}

.star-node-text{
    margin-bottom: 0;
    width:100px;
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    line-height: 1;
    display: block;
}

.star-node-btn {
    visibility: hidden;
    width: 150px;
    height: 20px;
    font-size:12px;
    background-image:url("../images/starry-sky/star-node-background.png");
    background-size: 100% 100%;
    color: #fff;
    text-indent: 6px;
    padding: 11px 8px 8px;
    position: static;
    z-index: 1;
    bottom: auto;
    left: auto;
    transform: none;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.star-node-box:hover .star-node-btn {
    visibility: visible;
    opacity: 1;
}

.star-node {
    position: relative;
    gap: 5px;
    transform: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.star-node-box.vertical-layout {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
}
.star-node-box.vertical-layout .star-node-text-wrap {
    align-self: flex-start;
    text-align: left;
}

.star-node-box[data-id="tianshu"] { top: 28%; left: 75%; }
.star-node-box[data-id="tianxuan"] { top: 52%; left: 77%; }
.star-node-box[data-id="tianji"] { top: 66%; left: 63%; }
.star-node-box[data-id="tianquan"] { top: 52%; left: 55%; }
.star-node-box[data-id="yuheng"] { top: 59%; left: 43%; }
.star-node-box[data-id="kaiyang"] { top: 59%; left: 32%; }
.star-node-box[data-id="yaoguang"] { top: 74%; left: 21%; }
.star-node-box[data-id="hr"] { top: 29.17%; left: 54.22%; }
.star-node-box[data-id="ip"] { top: 17.59%; left: 39.06%; }
.star-node-box[data-id="marine"] { top: 38.61%; left: 17.97%; }
.star-node-box[data-id="edu"] { top: 49.35%; left: 7.14%; }

.star-node-box.click-animation {
    animation: nodePulse 1.2s ease-in-out;
}
@keyframes nodePulse {
    0% {
        transform: scale(1);
        box-shadow: none;
    }
    30% {
        transform: scale(1.2);
        box-shadow: 0 0 60px rgba(147, 197, 253, 0.8), 0 0 30px rgba(59, 130, 246, 0.6);
    }
    60% {
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(191, 219, 254, 0.7), 0 0 20px rgba(147, 197, 253, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(147, 197, 253, 0.3);
    }
}

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, rgba(0, 10, 30, 0.2), rgba(10, 25, 47, 0.3));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    z-index: 1;
    margin: 0;
    padding: 0;
    animation: overlayFadeIn 0.8s ease forwards;
}

.video-modal-content {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 1200px;
    max-height: 80vh;
    width: 90%;
    background: linear-gradient(180deg, rgba(0, 15, 40, 0.9), rgba(5, 20, 50, 0.85));
    border: 1px solid rgba(147, 197, 253, 0.4);
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.7) rotate(-2deg) translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
            0 0 40px rgba(59, 130, 246, 0.2),
            0 0 80px rgba(147, 197, 253, 0.1),
            inset 0 0 20px rgba(255, 255, 255, 0.05);
    z-index: 2;
}

.video-modal.active .video-modal-content {
    transform: scale(1) rotate(0deg) translateY(0);
    animation: borderGlow 3s ease-in-out infinite alternate;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    z-index: 999;
    background-color: rgba(44, 82, 196, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 197, 253, 0.3));
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 0 25px rgba(147, 197, 253, 0.8), 0 0 10px rgba(59, 130, 246, 0.6);
}

.modal-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
}

@keyframes borderGlow {
    0% {
        border-color: rgba(147, 197, 253, 0.3);
        box-shadow:
                0 0 40px rgba(59, 130, 246, 0.2),
                0 0 80px rgba(147, 197, 253, 0.1),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    }
    100% {
        border-color: rgba(191, 219, 254, 0.6);
        box-shadow:
                0 0 60px rgba(59, 130, 246, 0.3),
                0 0 100px rgba(147, 197, 253, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
}

@keyframes overlayFadeIn {
    0% {
        backdrop-filter: blur(0px);
        background: linear-gradient(135deg, rgba(0, 10, 30, 0), rgba(10, 25, 47, 0));
    }
    100% {
        backdrop-filter: blur(12px);
        background: linear-gradient(135deg, rgba(0, 10, 30, 0.2), rgba(10, 25, 47, 0.3));
    }
}

@media (max-width: 1200px) {
    .constellation-container {
        transform: scale(0.95);
        transform-origin: center center;
    }
    .logo-container {
        top: 30px;
        left: 40px;
        gap: 30px;
        transform: scale(0.95);
    }
    .star-node-text {
        font-size: 17px;
    }
    .star-node-btn {
        font-size: 11.5px;
    }
}

@media (max-width: 1024px) {
    .constellation-container {
        transform: scale(0.85);
        transform-origin: center center;
    }
    .logo-container {
        top: 20px;
        left: 30px;
        gap: 20px;
        transform: scale(0.9);
    }
    .star-node-text {
        font-size: 16px;
        width: 90px;
    }
    .star-node-btn {
        font-size: 11px;
        width: 130px;
    }
    .star-node-box:hover .star-node-icon {
        transform: scale(0.8);
    }
    .video-modal-content {
        width: 90%;
        max-height: 75vh;
        border-radius: 20px;
    }
}

@media (max-width: 768px) {
    .constellation-container {
        transform: scale(0.7);
        transform-origin: center center;
    }
    .logo-container {
        top: 15px;
        left: 15px;
        gap: 15px;
        transform: scale(0.8);
    }
    .star-node-text {
        font-size: 14px;
        width: 80px;
    }
    .star-node-btn {
        font-size: 10px;
        width: 110px;
        padding: 6px 8px;
    }
    .glow-effect {
        width: 400px;
        height: 400px;
        filter: blur(50px);
    }
    .video-modal-content {
        width: 98%;
        max-height: 70vh;
        border-radius: 16px;
    }
    .video-modal-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .constellation-container {
        transform: scale(0.8) translate(-13%, 0%);
        transform-origin: center center;
        width: 100%;
    }

    .logo-container {
        top: 10px;
        left: 10px;
        transform: scale(0.7);
    }

    .star-bg {
        width: 3px !important;
        height: 3px !important;
        box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
    }
    .glow-effect {
        width: 300px;
        height: 300px;
        filter: blur(40px);
        top: 50%;
    }

    .star-node-box {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }
    .star-node-box[data-id^="tian"],
    .star-node-box[data-id^="yuheng"],
    .star-node-box[data-id^="kaiyang"],
    .star-node-box[data-id^="yaoguang"] {
        flex-direction: row;
        justify-content: flex-start;
    }
    .star-node-box[data-id^="hr"],
    .star-node-box[data-id^="ip"],
    .star-node-box[data-id^="marine"],
    .star-node-box[data-id^="edu"] {
        flex-direction: row-reverse;
        justify-content: flex-end;
    }
    .star-node-text-wrap {
        align-self: center;
        gap: 2px;
    }
    .star-node-text {
        font-size: 10px;
        width: auto;
        text-align: left;
    }
    .star-node-btn {
        display: none;
    }

    .star-node-box:hover .star-node-icon {
        transform: none;
        animation-play-state: running;
    }

    .star-node-box[data-id="tianshu"] .star-node-icon img {
        width: 60px !important;
        height: 60px !important;
    }
    .star-node-box[data-id="tianxuan"] .star-node-icon img {
        width: 60px !important;
        height: 60px !important;
    }
    .star-node-box[data-id="tianji"] .star-node-icon img {
        width: 50px !important;
        height: 50px !important;
    }
    .star-node-box[data-id="tianquan"] .star-node-icon img {
        width: 50px !important;
        height: 50px !important;
    }
    .star-node-box[data-id="yuheng"] .star-node-icon img,
    .star-node-box[data-id="kaiyang"] .star-node-icon img,
    .star-node-box[data-id="yaoguang"] .star-node-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    .star-node-box[data-id="hr"] .star-node-icon img {
        width: 35px !important;
        height: 35px !important;
    }
    .star-node-box[data-id="edu"] .star-node-icon img {
        width: 30px !important;
        height: 30px !important;
    }
    .star-node-box[data-id="ip"] .star-node-icon img,
    .star-node-box[data-id="marine"] .star-node-icon img {
        width: 25px !important;
        height: 25px !important;
    }

    .star-node-box[data-id="tianshu"] { top: 8%; left: 35%; }
    .star-node-box[data-id="tianxuan"] { top: 5%; left: 65%; }
    .star-node-box[data-id="tianji"] { top: 23%; left: 80%; }
    .star-node-box[data-id="tianquan"] { top: 33%; left: 65%; }
    .star-node-box[data-id="yuheng"] { top: 50%; left: 72%; }
    .star-node-box[data-id="kaiyang"] { top: 63%; left: 70%; }
    .star-node-box[data-id="yaoguang"] { top: 77%; left: 85%; }
    .star-node-box[data-id="hr"] { top: 33%; left: 25%; }
    .star-node-box[data-id="ip"] { top: 55%; left: 10%; }
    .star-node-box[data-id="marine"] { top: 82%; left: 30%; }
    .star-node-box[data-id="edu"] { top: 93%; left: 35%; }

    .video-modal-content {
        max-height: 60vh;
        border-radius: 12px;
    }
    .video-modal-overlay {
        background: linear-gradient(135deg, rgba(0, 10, 30, 0.1), rgba(10, 25, 47, 0.2));
    }
    @keyframes nodePulse {
        0% { transform: scale(1); box-shadow: none; }
        30% { transform: scale(1.1); box-shadow: 0 0 40px rgba(147, 197, 253, 0.6); }
        60% { transform: scale(1.05); box-shadow: 0 0 20px rgba(147, 197, 253, 0.4); }
        100% { transform: scale(1); box-shadow: 0 0 10px rgba(147, 197, 253, 0.2); }
    }
}