*, *::before, *::after {
    box-sizing: border-box;
}

/* 全局超链接样式 - 去掉下划线 */
a {
    text-decoration: none;
}

/* 全局列表样式 - 去掉圆点 */
ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

:root {
    --primary-red: #e60012;
    --primary-red-dark: #c4000f;
    --primary-red-light: #ff1a2e;
}

.hero {
    background: linear-gradient(135deg, rgb(0,100,235) 0%, rgb(0,100,235) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.png') center/cover;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px -5px rgba(230, 0, 18, 0.25), 0 10px 15px -5px rgba(230, 0, 18, 0.15);
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 100%;
}

.text-primary-red {
    color: #e60012;
}

.bg-primary-red {
    background-color: #e60012;
}

.bg-primary-red:hover {
    background-color: #c4000f;
}

.border-primary-red {
    border-color: #e60012;
}

a.course-card,
a.course-card.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: block;
}

a.course-card:hover,
a.course-card.card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 15px 35px -5px rgba(230, 0, 18, 0.25), 0 10px 15px -5px rgba(230, 0, 18, 0.15) !important;
}

.course-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.course-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin: 0 auto;
}

.course-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.about-image {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    overflow-x: hidden;
}

body {
    padding-top: 60px;
    overflow-x: hidden;
}

/* 滚动动画样式 */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* 移动端菜单下拉动画 */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.show {
    max-height: 300px;
    opacity: 1;
}

#mobile-menu a {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    border-bottom: 1px solid #e5e7eb !important;
}

#mobile-menu a:last-child {
    border-bottom: none !important;
}

/* 学习工具手机端下划线 */
#tools-mobile .tools-item {
    border-bottom: 1px solid #e5e7eb;
}

#tools-mobile .tools-item:last-child {
    border-bottom: none;
}

#mobile-menu.show a {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.show a:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.show a:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.show a:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.show a:nth-child(4) { transition-delay: 0.2s; }

/* ============================================
   产品标签样式
   ============================================ */
.product-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 10;
}

@media (min-width: 768px) {
    .product-tag {
        top: 8px;
        left: 8px;
        font-size: 12px;
        padding: 4px 8px;
    }
}

.product-tag-hot {
    background-color: #e60012;
}

.product-tag-presale {
    background-color: #f97316;
}

/* ============================================
   手工编写的 CSS 类（替代 Tailwind CSS）
   ============================================ */

/* 布局 - Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Flexbox */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.col-span-full {
    grid-column: 1 / -1;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* 间距 - Spacing */
.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.px-10 {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.pr-4 {
    padding-right: 1rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* 背景 - Background */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-800 {
    background-color: #1f2937;
}

/* 文字 - Typography */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #ffffff;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.leading-relaxed {
    line-height: 1.625;
}

/* 边框 - Border */
.border-2 {
    border-width: 2px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-white {
    border-color: #ffffff;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-700 {
    border-color: #374151;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 阴影 - Shadow */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 尺寸 - Sizing */
.w-10 {
    width: 2.5rem;
}

.w-16 {
    width: 4rem;
}

.w-20 {
    width: 5rem;
}

.w-32 {
    width: 8rem;
}

.w-48 {
    width: 12rem;
}

.w-auto {
    width: auto;
}

.w-full {
    width: 100%;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-md {
    max-width: 28rem;
}

.h-8 {
    height: 2rem;
}

.h-10 {
    height: 2.5rem;
}

.h-13 {
    height: 3.25rem;
}

.h-16 {
    height: 4rem;
}

.h-20 {
    height: 5rem;
}

.h-32 {
    height: 8rem;
}

.h-48 {
    height: 12rem;
}

.h-auto {
    height: auto;
}

/* 显示 - Display */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

/* 过渡 - Transition */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* 响应式断点 - Responsive */
@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:flex {
        display: flex;
    }

    .md\:grid {
        display: grid;
    }

    .md\:hidden {
        display: none;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:gap-6 {
        gap: 1.5rem;
    }

    .md\:gap-8 {
        gap: 2rem;
    }

    .md\:space-x-8 > * + * {
        margin-left: 2rem;
    }

    .md\:p-6 {
        padding: 1.5rem;
    }

    .md\:px-10 {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .md\:py-4 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .md\:py-12 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .md\:py-16 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .md\:py-24 {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .md\:mr-2 {
        margin-right: 0.5rem;
    }

    .md\:mr-4 {
        margin-right: 1rem;
    }

    .md\:mb-4 {
        margin-bottom: 1rem;
    }

    .md\:mb-12 {
        margin-bottom: 3rem;
    }

    .md\:mt-0 {
        margin-top: 0;
    }

    .md\:mt-8 {
        margin-top: 2rem;
    }

    .md\:text-left {
        text-align: left;
    }

    .md\:text-sm {
        font-size: 0.875rem;
    }

    .md\:text-base {
        font-size: 1rem;
    }

    .md\:text-lg {
        font-size: 1.125rem;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
    }

    .md\:text-3xl {
        font-size: 1.875rem;
    }

    .md\:text-6xl {
        font-size: 3.75rem;
    }

    .md\:w-13 {
        width: 3.25rem;
    }

    .md\:w-32 {
        width: 8rem;
    }

    .md\:h-10 {
        height: 2.5rem;
    }

    .md\:h-13 {
        height: 3.25rem;
    }

    .md\:h-32 {
        height: 8rem;
    }

    .md\:max-w-sm {
        max-width: 24rem;
    }

    .md\:max-w-md {
        max-width: 28rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:gap-8 {
        gap: 2rem;
    }
}

/* 交互状态 - Interactive States */
.hover\:text-primary-red:hover {
    color: #e60012;
}

.hover\:text-white:hover {
    color: #ffffff;
}

.hover\:bg-blue-600:hover {
    background-color: #2563eb;
}

.hover\:\!text-white:hover {
    color: #ffffff !important;
}

.focus\:outline-none:focus {
    outline: none;
}

/* 列表 - Lists */
.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-x-8 > * + * {
    margin-left: 2rem;
}

/* 溢出 - Overflow */
.overflow-hidden {
    overflow: hidden;
}

/* 定位 - Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.top-0 {
    top: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

.z-1000 {
    z-index: 1000;
}

/* 其他 - Miscellaneous */
.object-cover {
    object-fit: cover;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.cursor-pointer {
    cursor: pointer;
}

.appearance-none {
    appearance: none;
}

/* 响应式网格间距 */
@media (max-width: 767px) {
    .grid-cols-2 {
        gap: 0.75rem;
    }
}
