/* 自定义样式，补充Tailwind CSS */

/* 全局字体设置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', Roboto, Arial, sans-serif;
    color: #1a202c;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
    line-height: 1.6;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 字体排版优化 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #111827;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* 中文排版优化 */
.zh-text {
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.zh-title {
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* 文本间距优化 */
.text-spacing {
    letter-spacing: 0.01em;
    word-spacing: 0.05em;
}

/* 确保所有元素都使用border-box */
*, *::before, *::after {
    box-sizing: inherit;
}

/* 设置图片为响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 确保视频和嵌入内容响应式 */
video, iframe, embed, object {
    max-width: 100%;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 文字截断 - 多行 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 页面过渡动画 */
.page-transition {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片悬浮效果 */
.hover-card-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.hover-card-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 特殊按钮样式 */
.btn-gradient {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
}

.btn-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    z-index: -1;
}

.btn-gradient:hover::before {
    width: 100%;
}

/* 3D按钮效果 */
.btn-3d {
    position: relative;
    transition: all 0.2s;
    transform-style: preserve-3d;
    transform: perspective(800px);
}

.btn-3d:hover {
    transform: perspective(800px) translateY(-4px);
}

.btn-3d:active {
    transform: perspective(800px) translateY(-2px);
}

.btn-3d::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    border-radius: inherit;
}

/* 玻璃拟态效果 */
.glassmorphism {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 日历时间线样式 */
.timeline-dot::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* 表单控件聚焦样式增强 */
.input-focus-ring {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.input-focus-ring:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    outline: none;
}

/* 通知消息未读标记 */
.unread-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #3b82f6;
}

/* 图像浮动动画 */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 闪光按钮效果 */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    80% {
        transform: scale(0) rotate(45deg);
        opacity: 0.5;
    }
    81% {
        transform: scale(4) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(50) rotate(45deg);
        opacity: 0;
    }
}

/* 响应式调整 */
/* 小屏幕设备（手机）*/
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .calendar-view {
        display: none;
    }
    
    .list-view {
        display: block;
    }

    /* 移动端文字尺寸调整 */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem !important;
        letter-spacing: -0.015em;
    }
    
    h2 {
        font-size: 1.5rem !important;
        letter-spacing: -0.015em;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.125rem !important;
    }
    
    h5, h6 {
        font-size: 1rem !important;
    }
    
    /* 移动端行高适当减小 */
    p {
        line-height: 1.6;
    }
    
    /* 移动端间距调整 */
    .section-padding {
        padding: 2rem 0 !important;
    }
    
    /* 移动端按钮尺寸调整 */
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* 移动端卡片布局调整 */
    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* 平板设备 */
@media (min-width: 641px) and (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* 平板端布局调整 */
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* 平板端间距调整 */
    .section-padding {
        padding: 3rem 0 !important;
    }
}

/* 小型笔记本电脑 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
        margin: 0 auto;
    }
    
    /* 小型笔记本布局调整 */
    .card-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
}

/* 大型笔记本和桌面显示器 */
@media (min-width: 1025px) and (max-width: 1280px) {
    .container {
        max-width: 1140px;
        margin: 0 auto;
    }
}

/* 超大型显示器 */
@media (min-width: 1281px) {
    .container {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* 响应式表格样式 */
@media (max-width: 768px) {
    .responsive-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 移动端可滚动表格 */
    .responsive-table::-webkit-scrollbar {
        height: 4px;
    }
    
    /* 折叠表格设计 */
    .responsive-card-table {
        border: none;
    }
    
    .responsive-card-table thead {
        display: none;
    }
    
    .responsive-card-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.25rem;
    }
    
    .responsive-card-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        text-align: right;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .responsive-card-table td:last-child {
        border-bottom: none;
    }
    
    .responsive-card-table td:before {
        content: attr(data-label);
        font-weight: 600;
        float: left;
        text-align: left;
    }
}

/* 响应式导航菜单 */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block !important;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 75%;
        max-width: 300px;
        background: white;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .mobile-nav.active {
        transform: translateX(0);
    }
    
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease-in-out;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* 会议卡片增强样式 */
.conference-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.conference-card img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.conference-card:hover img {
    transform: scale(1.05);
}

/* 灵动的徽章 */
.floating-badge {
    animation: float-badge 3s ease-in-out infinite;
}

@keyframes float-badge {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

/* 卡片内容飞入动画 */
.slide-in-bottom {
    animation: slideInBottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes slideInBottom {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 下划线动画 */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* FAQ和文档页面样式增强 */
.doc-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.doc-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.doc-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.doc-content p {
    margin-bottom: 1.5rem;
}

.doc-content ul, .doc-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

.doc-content li {
    margin-bottom: 0.5rem;
}

.doc-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
}

.doc-content pre {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #1f2937;
    color: #e5e7eb;
    overflow-x: auto;
}

.doc-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.9rem;
    line-height: 1.6;
}

.doc-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #3b82f6;
    background-color: #f3f4f6;
    color: #4b5563;
    font-style: italic;
}

.doc-note {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #f0f9ff;
    border-left: 4px solid #3b82f6;
}

.doc-warning {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.doc-error {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
}

.doc-success {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #ecfdf5;
    border-left: 4px solid #10b981;
}

/* FAQ手风琴样式增强 */
.faq-container .faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq-container .faq-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-container .faq-question {
    padding: 1.25rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: #111827;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-container .faq-question:hover {
    background-color: #f3f4f6;
}

.faq-container .faq-answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-container .faq-item.active .faq-answer {
    padding: 1.25rem;
    max-height: 1000px;
}

.faq-container .faq-icon {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
    color: #6b7280;
}

.faq-container .faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* API文档特殊样式 */
.api-endpoint {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.api-method {
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
}

.api-method.get {
    background-color: #dbeafe;
    color: #1e40af;
}

.api-method.post {
    background-color: #dcfce7;
    color: #166534;
}

.api-method.put {
    background-color: #fef3c7;
    color: #92400e;
}

.api-method.delete {
    background-color: #fee2e2;
    color: #b91c1c;
}

.api-params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.api-params-table th {
    background-color: #f9fafb;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.api-params-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.api-params-table tr:last-child td {
    border-bottom: none;
}

.api-params-table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    padding: 0.2em 0.4em;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
} 