* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #f6f6f6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: grab;
}

body:active {
    cursor: grabbing;
}

/* 加载页面样式 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f6f6f6;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-progress-container {
    width: 300px;
    height: 2px;
    background: rgba(26, 26, 26, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: #1a1a1a;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* 3D 场景容器 */
.scene {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#webglCanvas {
    width: 100%;
    height: 100%;
    display: block;
}



/* 导航栏 - 极简编辑风格 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 4px;
    display: flex;
    justify-content: left;
    z-index: 1000;
}

.nav-links {
    display: flex;
    width: 100vw;
    gap: 4px;
}

.nav-links a {
    padding: 40px 10px 7px;
    flex-grow: 1;
    max-width: 250px;
    text-decoration: none;
    color: #6c6c6c;
    font-size: 12px;
    border-radius: 5px;
    opacity: 1;
    transition: opacity 0.25s ease;
    border: 1px solid #777777;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* 随背景明暗自适应：由 JS 根据背后亮度设置 data-dark，暗底白字、亮底黑字 */
.nav-links a .link-text,
.footer-links a .link-text {
    color: #777777;
    transition: color 0.2s ease;
}

.nav[data-dark="true"] .link-text,
.footer[data-dark="true"] .link-text {
    color: #fff;
}

/* 页脚 - 与导航栏样式一致 */
.footer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 4px;
    display: flex;
    justify-content: right;
    z-index: 1000;
}

.footer-links {
    display: flex;
    gap: 4px;
}

.footer-links a {
    padding: 10px;
    flex-grow: 1;
    max-width: 250px;
    text-decoration: none;
    color: #848484;
    font-size: 12px;
    border-radius: 5px;
    opacity: 1;
    transition: opacity 0.25s ease;
    border: 1px solid #d2d2d2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* 滚动指示器 */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.scroll-indicator.visible {
    opacity: 1;
}

/* 卡片标题cursor样式 */
.card-title-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 12px;
    color: #c6c6c6;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translate(10px, 10px);
}

.card-title-cursor.visible {
    opacity: 1;
}

/* Contact 模态框样式 - 参考 nav 样式 */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.contact-modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid #d2d2d2;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.contact-modal.active .contact-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

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

.contact-modal-title {
    font-size: 16px;
    font-weight: 400;
    color: #e2e2e2;
    letter-spacing: -0.3px;
}

.contact-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #e2e2e2;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease;
}

.contact-modal-close:hover {
    color: #ffffff;
}

.contact-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.contact-section {
    margin-bottom: 40px;
}

.contact-section:last-child {
    margin-bottom: 0;
}

.contact-section-title {
    font-size: 12px;
    font-weight: 400;
    color: #e2e2e2;
    margin-bottom: 5px;
    letter-spacing: -0.3px;
}

.contact-email {
    font-size: 12px;
    color: #e2e2e2;
    text-decoration: none;
    transition: color 0.25s ease;
}

.contact-email:hover {
    color: #ffffff;
}

.contact-form {
    width: 100%;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .form-input,
.contact-form .form-textarea {
    width: 100%;
    padding: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #e2e2e2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid #b5b5b5;
    border-radius: 5px;
    font-family: inherit;
    transition: all 0.25s ease;
}

.contact-form .form-input::placeholder,
.contact-form .form-textarea::placeholder {
    color: #c7c7c7;
}

.contact-form .form-textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .form-input:focus,
.contact-form .form-textarea:focus {
    outline: none;
    border-color: #dbf0ff;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.contact-form .btn {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 400;
    color: #e2e2e2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid #b5b5b5;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
}

.contact-form .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #e2e2e2;
}

.contact-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-message-status {
    margin-top: 15px;
    padding: 12px;
    font-size: 11px;
    border-radius: 5px;
    display: none;
}

.contact-message-status.success {
    display: block;
    background: rgba(255, 255, 255, 0.1);
    color: #f3fff3;
}

.contact-message-status.error {
    display: block;
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动设备样式 */
    .loader-progress-container {
        width: 250px;
    }
    
    .contact-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .contact-modal-body {
        padding: 20px;
    }
}
