/* AI魔法师 - 主样式文件 */

/* 中文字体设置 */
* {
    font-family: Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
}

.font-serif {
    font-family: "Noto Serif SC", Georgia, serif;
}

/* 深色模式变量 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
}

[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
}

/* 导航样式 */
.nav-link {
    color: #4b5563;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
    text-decoration: none;
}

.nav-link:hover {
    color: #9333ea;
}

.nav-link.active {
    color: #9333ea;
    background-color: #faf5ff;
}

.mobile-nav-link {
    color: #4b5563;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
    text-decoration: none;
}

.mobile-nav-link:hover {
    color: #9333ea;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(to right, #9333ea, #2563eb);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: linear-gradient(to right, #7c3aed, #1d4ed8);
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-secondary {
    border: 2px solid white;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    background: transparent;
}

.btn-secondary:hover {
    background: white;
    color: #9333ea;
    transform: scale(1.05);
}

/* Hero区域样式 */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 50%, #3730a3 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05' %3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 4s ease-in-out infinite;
}

/* 卡片样式 */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.learning-path-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.learning-path-card:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.success-story-card {
    transition: all 0.3s ease;
}

.success-story-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 深色模式切换 */
.dark .bg-white { background-color: var(--bg-primary); }
.dark .bg-gray-50 { background-color: var(--bg-secondary); }
.dark .text-gray-900 { color: var(--text-primary); }
.dark .text-gray-600 { color: var(--text-secondary); }

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

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-section {
        min-height: 85vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 4rem 0 3rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .floating-elements {
        display: none;
    }
    
    /* 调整卡片间距 */
    .feature-card,
    .learning-path-card,
    .success-story-card {
        margin-bottom: 1.5rem;
    }
    
    /* 导航菜单优化 */
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* 按钮适配 */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* 网格布局调整 */
    .grid {
        gap: 1rem;
    }
    
    /* 文本大小调整 */
    h2 {
        font-size: 1.875rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* 内边距调整 */
    .py-16 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-20 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    /* 工具卡片优化 */
    .tool-card {
        padding: 1rem;
    }
    
    /* 项目卡片优化 */
    .project-card {
        margin-bottom: 1rem;
    }
    
    /* FAQ项目优化 */
    .faq-item {
        padding: 1rem;
    }
    
    .faq-question {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 70vh;
        padding: 3rem 0 2rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    /* 更小的内边距 */
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    /* 卡片内边距 */
    .feature-card,
    .learning-path-card,
    .success-story-card,
    .tool-card,
    .project-card {
        padding: 1rem;
    }
    
    /* 按钮全宽 */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    /* 文本对齐 */
    .text-center {
        text-align: center;
    }
    
    /* 图标大小调整 */
    .w-16.h-16 {
        width: 3rem;
        height: 3rem;
    }
    
    .w-20.h-20 {
        width: 4rem;
        height: 4rem;
    }
    
    /* 导航按钮 */
    .filter-btn,
    .project-filter-btn,
    .sort-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    /* 统计数字 */
    .text-3xl {
        font-size: 2rem;
    }
    
    /* 时间线调整 */
    .timeline {
        padding-left: 2rem;
    }
    
    /* 团队卡片 */
    .w-24.h-24 {
        width: 4rem;
        height: 4rem;
    }
    
    /* 模态框调整 */
    #tutorial-modal .max-w-4xl {
        max-width: 95vw;
        margin: 1rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .hover\:shadow-xl:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }
    
    .hover\:transform:hover {
        transform: none;
    }
    
    .hover\:scale-105:hover {
        transform: scale(1);
    }
    
    /* 增加触摸目标大小 */
    button,
    .nav-link,
    .mobile-nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 触摸反馈 */
    button:active,
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }
}

/* 横屏手机优化 */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
}

/* 平板优化 */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 卡片间距优化 */
    .gap-8 {
        gap: 1.5rem;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1440px) {
    .max-w-7xl {
        max-width: 1400px;
    }
    
    .hero-section h1 {
        font-size: 4rem;
    }
    
    .hero-section p {
        font-size: 1.375rem;
    }
}

/* 高度较小的设备 */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        margin-bottom: 1rem;
    }
}

/* 可访问性优化 */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-float-delay {
        animation: none;
    }
    
    .transition-all,
    .transition-colors,
    .transition-transform {
        transition: none;
    }
    
    .hover\:transform:hover {
        transform: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .bg-gradient-to-r,
    .bg-gradient-to-br,
    .bg-gradient-to-l {
        background: #000;
        color: #fff;
    }
    
    .text-gray-600 {
        color: #000;
    }
    
    .text-gray-400 {
        color: #666;
    }
    
    .border {
        border-width: 2px;
    }
}

/* 打印样式优化 */
@media print {
    .fixed,
    .sticky {
        position: static;
    }
    
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: #fff;
        color: #000;
    }
    
    .text-white {
        color: #000;
    }
    
    .shadow-lg,
    .shadow-xl {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .no-print {
        display: none;
    }
}

/* 焦点管理优化 */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* 滚动条适配 */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 2px;
    }
}

/* 特殊设备适配 */
@media (max-width: 320px) {
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
}

/* 进度条样式 */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 自定义复选框 */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: all 0.3s;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #8b5cf6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* 媒体查询 */
@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;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .feature-card,
    .learning-path-card,
    .success-story-card {
        border: 2px solid #000;
    }
}