/* 大屏学习社 - 全局样式 */

/* 基础样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

/* 隐藏滚动条 */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* VIP卡片渐变背景 */
.vip-card-gradient {
    background: linear-gradient(135deg, #EBF1FF 0%, #D8E4FF 100%);
}
.dark .vip-card-gradient {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

/* 图标圆形背景 */
.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* 安全区域底部边距 */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 卡片阴影 */
.shadow-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.shadow-soft {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.shadow-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* 按钮点击效果 */
button:active, a:active {
    transform: scale(0.98);
}

/* 文字渐变效果（可选） */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 响应式字体调整 */
@media (max-width: 360px) {
    .text-sm {
        font-size: 0.8125rem;
    }
    .text-xs {
        font-size: 0.6875rem;
    }
}

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    animation: toastFadeIn 0.3s ease-out;
}

@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 模态框背景 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

/* 表格响应式 */
@media (max-width: 400px) {
    table {
        font-size: 0.75rem;
    }
    table th,
    table td {
        padding: 0.5rem;
    }
}

/* 深色模式过渡 */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* 禁用状态 */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 底部导航栏固定高度 */
nav.fixed {
    height: calc(4rem + env(safe-area-inset-bottom, 0px));
}

/* 主内容区域留出底部导航空间 */
main {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}
