
:where([class^="ri-"])::before { content: "\f3c2"; }
:root {
    --scrollbar-width: 17px;
}
html {
    overflow-y: scroll; /* 始终显示滚动条避免跳动 */
}
header {
    position: sticky;
    top: 0;
    width: 100%;
    /* 如果上面方法无效，可以尝试显式减去滚动条宽度 */
    width: calc(100% - var(--scrollbar-width));
    margin-right: var(--scrollbar-width);
}
body {
    scrollbar-gutter: stable; /* 现代浏览器支持，预留滚动条空间 */
    font-family: 'Inter', sans-serif;
}
.hero-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}
.chart-container {
    height: 200px;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.dropdown.open .dropdown-content {
    max-height: 300px;
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.3s ease-in;
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.mobile-menu.open {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 200px;
}

.mobile-dropdown.active .ri-arrow-down-s-line {
    transform: rotate(180deg);
}

.market-card {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

/* 导航栏选中状态样式 */
.nav-link.active {
    color: #2563eb !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2563eb;
    border-radius: 2px;
}

.dropdown-link.active {
    background-color: #f0f7ff;
    color: #2563eb !important;
    font-weight: 500;
}

.mobile-nav-link.active {
    background-color: #f0f7ff;
    color: #2563eb !important;
    font-weight: 500;
}

.mobile-dropdown-link.active {
    background-color: #f0f7ff;
    color: #2563eb !important;
    font-weight: 500;
}

.dropdown-btn.active {
    color: #2563eb !important;
    font-weight: 500;
}

.mobile-dropdown-btn.active {
    color: #2563eb !important;
    font-weight: 500;
}
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-container {
    aspect-ratio: 16/9; /* 保持视频比例 */
}

/* 进度条样式 */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.progress-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.progress-bar:hover::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: #2563eb;
}

.progress-bar:hover::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2563eb;
}

/* 音量条样式 - 与进度条保持一致 */
.volume-bar {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(156, 163, 175, 0.6);
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-bar:hover::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: #2563eb;
}

.volume-bar:hover::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2563eb;
}

/* 控制按钮样式 */
.progress-container button {
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.progress-container button:hover {
    background-color: rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

/* 时间显示样式 */
.progress-container span {
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    text-align: center;
}

.video-container:hover::after {
    opacity: 1;
}

.has-error {
    color: red;
    font-size: 12px;
}

.header-shadow {
    box-shadow: 0 0 16px 5px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
    border: 1px solid rgb(229 231 235 / var(--tw-border-opacity, 1));
}

.bg-certificate-primary {
    --tw-bg-opacity: 1;
    background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
}

.bg-strategy-primary {
    --tw-bg-opacity: 1;
    background-color: rgb(59 130 246 / var(--tw-bg-opacity, 1));
}

.hover\:bg-strategy-primary:hover {
    --tw-bg-opacity: 1;
    background-color: rgb(30 64 175 / var(--tw-bg-opacity, 1));
}

.home-text-primary {
    --tw-text-opacity: 1;
    color: rgb(59 130 246 / var(--tw-text-opacity, 1));
}
