/* Bulma颜色主题覆盖 - 统一为蓝色主题 */
:root {
    /* 覆盖Bulma默认的primary颜色 */
    --bulma-primary: #1976d2;
    --bulma-primary-h: 207deg;
    --bulma-primary-s: 90%;
    --bulma-primary-l: 42%;
    --bulma-primary-invert: #ffffff;

    /* 覆盖Bulma默认的success颜色，改为蓝色系 */
    --bulma-success: #1e88e5;
    --bulma-success-h: 207deg;
    --bulma-success-s: 74%;
    --bulma-success-l: 51%;
    --bulma-success-invert: #ffffff;

    /* 覆盖Bulma默认的link颜色 */
    --bulma-link: #1976d2;
    --bulma-link-h: 207deg;
    --bulma-link-s: 90%;
    --bulma-link-l: 42%;
    --bulma-link-invert: #ffffff;

    /* 自定义主题色彩 */
    --primary-color: #1976d2;
    --primary-light: #42a5f5;
    --primary-dark: #1565c0;
    --secondary-color: #1e88e5;
    --text-light: #6c757d;
}

/* 强制覆盖Bulma的颜色变量 */
.is-primary {
    background-color: #1976d2 !important;
    color: #ffffff !important;
}

.has-background-primary {
    background-color: #1976d2 !important;
}

.has-text-primary {
    color: #1976d2 !important;
}

.button.is-primary {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
    color: #ffffff !important;
}

.button.is-primary:hover,
.button.is-primary.is-hovered {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
}

.button.is-primary:active,
.button.is-primary.is-active {
    background-color: #0d47a1 !important;
    border-color: #0d47a1 !important;
}

.navbar.is-primary {
    background-color: #1976d2 !important;
}

.navbar.is-primary .navbar-brand>.navbar-item,
.navbar.is-primary .navbar-brand .navbar-link {
    color: #ffffff !important;
}

.navbar.is-primary .navbar-brand>a.navbar-item:focus,
.navbar.is-primary .navbar-brand>a.navbar-item:hover,
.navbar.is-primary .navbar-brand .navbar-link:focus,
.navbar.is-primary .navbar-brand .navbar-link:hover {
    background-color: #1565c0 !important;
    color: #ffffff !important;
}

/* 导航栏样式 */
.navbar.is-fixed-top {
    backdrop-filter: blur(10px);
    background: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}

/* 覆盖Bulma导航栏图片高度限制，允许更大的图标 */
.navbar-item img {
    max-height: 48px !important;
    margin-right: 10px;
}

/* 导航栏图标样式 - 大圆角矩形 */
#appIcon {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#appIcon:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hero区域样式调整 - 白色背景 */
.hero.is-white {
    background: #ffffff;
}

/* 全屏Hero - 一屏显示，无滚动条 */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* body 需要为固定导航栏留出空间 */
body {
    padding-top: 52px;
    box-sizing: border-box;
}

/* #home 填满剩余空间（viewport 减去 navbar 高度） */
#home.hero.is-large {
    height: calc(100vh - 52px);
    min-height: auto;
}

/* hero-body 使用 flexbox 居中内容 */
#home.hero.is-large .hero-body {
    padding: 1rem 3rem;
    height: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* container 填满 hero-body */
#home.hero.is-large .hero-body > .container {
    width: 100%;
    height: 100%;
}

/* columns 填满 container */
#home.hero.is-large .hero-body > .container > .columns {
    height: 100%;
}

/* 右侧截图列占满高度 */
#home.hero.is-large .column.is-half.has-text-centered {
    height: 100%;
    align-self: stretch;
}


/* 手机样机样式 */
.phone-mockup {
    max-width: 300px;
    margin: 0 auto;
}

.phone-mockup img {
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    height: auto;
}

/* Hero截图轮播 */
.hero-screenshot-carousel {
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

.hero-swiper {
    width: 100%;
    overflow: visible !important;
}

.hero-swiper .swiper-wrapper {
    align-items: center;
}

.hero-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto !important;
}

.hero-swiper .phone-mockup {
    transition: transform 0.3s ease;
}

.hero-swiper .phone-mockup img {
    max-height: calc(100vh - 150px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.hero-swiper .swiper-slide-active .phone-mockup {
    transform: scale(1.02);
}

.hero-pagination {
    position: relative !important;
    margin-top: 20px;
    flex-shrink: 0;
}

.hero-pagination .swiper-pagination-bullet {
    background-color: var(--primary-color);
    opacity: 0.3;
}

.hero-pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

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

/* 下载下拉菜单样式 */
#downloadDropdown .dropdown-menu {
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
}

#downloadDropdown .dropdown-content {
    padding: 0.5rem 0;
}

#downloadDropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f4;
}

#downloadDropdown .dropdown-item:last-child {
    border-bottom: none;
}

#downloadDropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.download-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
}

.download-dropdown-item:hover {
    color: inherit;
}

.download-item-info {
    flex: 1;
}

.download-item-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.download-item-meta {
    font-size: 0.875rem;
    color: var(--text-light);
}

.download-item-icon {
    font-size: 1.5rem;
    margin-left: 1rem;
    color: var(--primary-color);
}

.download-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* 手机端优化 */
@media screen and (max-width: 768px) {
    /* Hero区域调整 - 保持一屏显示，内容靠上对齐 */
    #home.hero.is-large .hero-body {
        padding: 1rem;
        align-items: flex-start;
    }
    .column.is-half.has-text-centered {
        padding-top: 0px;
    }

    #home.hero.is-large .hero-body > .container {
        margin-top: 15px;
    }

    /* 隐藏 heroTitle，避免与 navbar 重复 */
    #heroTitle {
        display: none;
    }

    .title.is-1 {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }

    .subtitle.is-4 {
        font-size: 1.2rem !important;
        margin-bottom: 0 !important;
    }

    .phone-mockup {
        max-width: none;
        margin-top: 0.5rem;
    }

    .hero-screenshot-carousel {
        max-width: none;
        justify-content: flex-start;
    }

    .hero-swiper .phone-mockup img {
        max-height: calc(100vh - 280px);
        max-height: calc(100svh - 240px);
    }

    .hero-pagination {
        margin-top: 20px;
    }

    /* 描述和按钮横向排列 */
    .hero-description-row {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .hero-description-row #heroDescription {
        flex: 1;
        text-align: left;
    }

    .hero-description-row .mobile-inline-btn {
        flex-shrink: 0;
    }

    /* 移除按钮堆叠样式 */
    .buttons.mobile-inline-btn {
        flex-direction: row;
        align-items: center;
        margin-bottom: 0;
    }

    .buttons.mobile-inline-btn .button {
        margin-bottom: 0;
    }

    /* 手机端下载按钮缩小 */
    .mobile-inline-btn #downloadBtn.button.is-large {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* 导航栏移动端优化 */
    .navbar-burger {
        color: white;
    }

    .navbar-menu {
        background-color: var(--primary-color);
    }

    .navbar-menu .navbar-item {
        color: white;
    }

    /* 下拉菜单靠右对齐，不超出屏幕 */
    #downloadDropdown .dropdown-menu {
        left: auto !important;
        right: 0 !important;
        transform: none;
        min-width: 250px;
        max-width: calc(100vw - 2rem);
    }

    #downloadDropdown {
        position: relative;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 480px) {
    #home.hero.is-large .hero-body {
        padding: 0.5rem;
    }

    .title.is-1 {
        font-size: 1.5rem !important;
        margin-bottom: 4px !important;
    }

    .subtitle.is-4 {
        font-size: 1rem !important;
    }

    .phone-mockup {
        max-width: none;
    }

    .hero-swiper .phone-mockup img {
        max-height: calc(100vh - 280px);
        max-height: calc(100svh - 240px);
    }

    .container {
        padding: 0 0.5rem;
    }

    /* 超小屏幕按钮更小 */
    .mobile-inline-btn #downloadBtn.button.is-large {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    /* 超小屏幕描述文字更小 */
    .hero-description-row {
        gap: 0.5rem;
    }
}

/* 平板端优化 */
@media screen and (min-width: 769px) and (max-width: 1023px) {
    .phone-mockup {
        max-width: 280px;
    }
}
