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;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: url("../images/starry-sky/ideestar-background.jpg");
    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;
    transition: transform 0.3s ease;
    transform-origin: center;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    animation: mainStarTwinkle 6s infinite ease-in-out;
    animation-delay: var(--delay);
}

@keyframes mainStarTwinkle {
    0% {
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
    40% {
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9));
    }
    100% {
        opacity: 0.8;
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }
}

.star-node-box:hover .star-node-icon {
    transform: scale(1.5);
    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%; }

@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(1.3);
    }
}

@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);
    }
}

@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;
        height: 3px;
    }
    .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 {
        font-size: 8px;
        width: 100px;
        height: 20px;
        padding: 0 2px;
        line-height: 20px;
        margin-top: 2px;
        visibility: visible;
        opacity: 1;
        text-indent: 4px;
    }*/

    /* 不显示中文 */
    .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: 13%; left: 25%; }
    .star-node-box[data-id="tianxuan"] { top: 5%; left: 65%; }
    .star-node-box[data-id="tianji"] { top: 27%; left: 80%; }
    .star-node-box[data-id="tianquan"] { top: 38%; left: 60%; }
    .star-node-box[data-id="yuheng"] { top: 55%; left: 64%; }
    .star-node-box[data-id="kaiyang"] { top: 70%; left: 65%; }
    .star-node-box[data-id="yaoguang"] { top: 85%; left: 75%; }
    .star-node-box[data-id="hr"] { top: 30%; left: 25%; }
    .star-node-box[data-id="ip"] { top: 47%; left: 10%; }
    .star-node-box[data-id="marine"] { top: 70%; left: 15%; }
    .star-node-box[data-id="edu"] { top: 90%; left: 25%; }
}