@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Noto Sans TC', 'Orbitron', sans-serif;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
}

/* 星空背景 */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: -2;
    pointer-events: none; /* 不阻擋互動 */
}

.stars {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out alternate;
}

.meteor {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #ffffff, 0 0 30px #ffffff;
    animation: meteor 3s linear infinite;
}
@keyframes meteor {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw) translateY(100vh);
        opacity: 0;
    }
}



@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* 以位移為主體的飛行動畫：起亮→最亮→淡出，同步完成 translate */
@keyframes fly {
    0% {
        opacity: 0;
        transform: rotate(var(--angle)) translate3d(0,0,0) scale(var(--scale));
        filter: drop-shadow(0 0 2px currentColor);
    }
    10% {
        opacity: 1;
        filter: drop-shadow(0 0 8px currentColor);
    }
    60% {
        opacity: 1;
        filter: drop-shadow(0 0 12px currentColor);
    }
    100% {
        opacity: 0;
        transform: rotate(var(--angle)) translate3d(var(--dx), var(--dy), 0) scale(var(--scale));
        filter: drop-shadow(0 0 0 currentColor);
    }
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
/* 修正：補上淡出類 */
.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.font-tech {
    font-family: 'Orbitron', monospace;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.neon-red {
    color: #dc2626;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.neon-glow {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.tech-card {
    background: linear-gradient(145deg, rgba(26,26,26,0.8), rgba(15,15,15,0.9));
    border: 1px solid #333;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s;
}

.tech-card:hover::before { left: 100%; }

.tech-card:hover {
    transform: translateY(-5px);
    border-color: #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #dc2626;
    color: #dc2626;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

.smooth-scroll { scroll-behavior: smooth; }

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rounded-image {
    -webkit-mask-image: 
      radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%),
      linear-gradient(to top,    rgba(0,0,0,0), rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0)),
      linear-gradient(to left,   rgba(0,0,0,0), rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0));
    -webkit-mask-composite: destination-in;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: cover;

    mask-image: 
      radial-gradient(circle, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%),
      linear-gradient(to top,    rgba(0,0,0,0), rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0)),
      linear-gradient(to left,   rgba(0,0,0,0), rgba(0,0,0,1) 20%, rgba(0,0,0,1) 80%, rgba(0,0,0,0));
    mask-composite: intersect;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: cover;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.nav-glass {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #333;
}

.text-gradient {
    background: linear-gradient(45deg, #ffffff, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


textarea:focus,input:focus {
    outline: none;        /* 移除瀏覽器預設藍色框 */
    box-shadow: none;     /* 移除陰影 (像 Chrome 會有藍光暈) */
}