/* VideoGen 自定义样式 */

/* 全局样式 */
:root {
    --transition-speed: 0.3s;
}

* {
    transition: all var(--transition-speed) ease;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 卡片悬停效果增强 */
/* .card:hover {
    transform: translateY(-4px);
} */

/* 按钮加载动画 */
.btn.loading {
    pointer-events: none;
}

/* Toast 通知样式 */
.toast {
    z-index: 10000;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

/* iframe 响应式 */
@media (max-width: 768px) {
    .video-app-iframe {
        height: 600px !important;
    }
}

/* 导航栏激活状态 */
.navbar .menu li a.active {
    background-color: hsl(var(--p) / 0.1);
    color: hsl(var(--p));
}

/* 导航栏下拉菜单层级修复 */
.navbar .menu details[open] > ul {
    z-index: 1000 !important;
    position: absolute;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 二级菜单位置调整 - 往右移动 */
.navbar .menu details ul details[open] > ul {
    left: calc(100% + 0px) !important; /* 在右侧，增加 8px 间距 */
    top: 0 !important;
    border-radius: 0.5rem !important; /* 添加圆角 */
}

/* 移除二级菜单左侧的装饰线/边框 */
.navbar .menu details ul details > ul::before {
    display: none !important;
}

.navbar .menu details ul details > ul {
    border-left: none !important;
}

/* 主题切换器样式 */
.dropdown-content .menu li a[data-theme] {
    position: relative;
    padding-left: 2.5rem;
}

.dropdown-content .menu li a[data-theme].active {
    background-color: hsl(var(--p) / 0.15);
    color: hsl(var(--p));
    font-weight: 600;
}

.dropdown-content .menu li a[data-theme].active::before {
    content: '✓';
    position: absolute;
    left: 0.75rem;
    font-weight: bold;
    color: hsl(var(--p));
}

.dropdown-content .menu li a[data-theme]:hover {
    background-color: hsl(var(--p) / 0.1);
}

/* 表单聚焦样式 */
.input:focus,
.textarea:focus,
.select:focus {
    outline: 2px solid hsl(var(--p));
    outline-offset: 2px;
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* 渐入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 卡片网格优化 */
.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 统计卡片样式 */
.stats .stat {
    padding: 1.5rem;
}

.stats .stat-value {
    font-size: 2.5rem;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .stats .stat-value {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn,
    .dropdown {
        display: none !important;
    }
}

/* 页脚 */
.app-footer {
    border-top: 1px solid hsl(var(--bc) / 0.08);
    background-color: hsl(var(--b2));
    padding: 2.5rem 1.25rem;
}

.app-footer__inner {
    max-width: 67.5rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: hsl(var(--bc) / 0.5);
    text-align: center;
    line-height: 1.45;
}

.app-footer__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: hsl(var(--bc) / 0.75);
}

.app-footer__copy {
    color: hsl(var(--bc) / 0.4);
    font-size: 0.82rem;
}

.app-footer__records {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.25rem;
}

.app-footer__records a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: hsl(var(--bc) / 0.45);
    text-decoration: none;
}

.app-footer__records svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    object-fit: contain;
}

.app-footer__records img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

@media (max-width: 640px) {
    .app-footer__records {
        justify-content: center;
    }
}

/* 辅助功能 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 禁用状态 */
.disabled,
[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(var(--b2));
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--bc) / 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--bc) / 0.3);
}

/* ==================== 阿里云验证码样式修复 ==================== */
/* 防止 DaisyUI 的 checkbox 样式干扰阿里云验证码 */

/* 只移除 DaisyUI 在验证码 checkbox-body 上添加的 ::before 伪元素 */
div[id*="aliyunCaptcha-checkbox-body"]::before,
div[class*="aliyunCaptcha-checkbox-body"]::before {
    content: none !important;
    display: none !important;
}

