/* 额外的自定义样式 */

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* 选择文本样式 */
::selection {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* 加载动画 */
.loading {
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 3D 卡片效果 */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 脉冲边框效果 */
.pulse-border {
    position: relative;
}

.pulse-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    border-radius: inherit;
    z-index: -1;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* 打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #667eea;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #667eea; }
}

/* 响应式字体大小 */
@media (max-width: 640px) {
    .responsive-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
}

@media (min-width: 641px) {
    .responsive-text {
        font-size: clamp(1.5rem, 2.5vw, 2rem);
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid #000000;
        background-color: #ffffff;
        color: #000000;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
