/*
    Author: SparkBayes
    Email: dizflyme@qq.com
    Date: 2026-04-28
    LastEditors: SparkBayes
    LastEditTime: 2026-04-28
    Description: 登录页广告区样式 - 三栏布局展示 ASIN 流程、AI 引擎、洞察卡片
*/

/* ============================================================
   1. Layout Container
   ============================================================ */

.login-ad {
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 50%, #f0f4ff 100%);
    border: 1px solid rgba(26, 66, 207, 0.15);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(26, 66, 207, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    width: 100%;
    height: 100%;  /* 继承父容器高度，让 flex: 1 生效 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-height: 0;  /* 防止 flex 子元素溢出 */
}

/* Subtle decorative gradient overlay */
.login-ad::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(26, 66, 207, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   2. Grid Layout - Middle column wider
   ============================================================ */

.login-ad__grid {
    display: grid;
    grid-template-columns: 25% 45% 30%;
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    z-index: 1;
}

/* ============================================================
   3. Dividers - With Arrow
   ============================================================ */

.login-ad__arrow-section {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.login-ad__divider--left {
    left: calc(25% - 16px);
}

.login-ad__divider--right {
    left: calc(70% - 16px);
}

.login-ad__divider {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.login-ad__divider:hover {
    background: rgba(26, 66, 207, 0.06);
}

.login-ad__divider::before {
    content: '→';
    font-size: 18px;
    font-weight: 700;
    color: #1a42cf;
    opacity: 0.7;
    text-shadow: 0 1px 4px rgba(26, 66, 207, 0.15);
}

/* 分割线 - 保留但放在箭头后方 */
.login-ad__grid::before,
.login-ad__grid::after {
    content: '';
    position: absolute;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(26, 66, 207, 0.15) 20%,
        rgba(26, 66, 207, 0.15) 80%,
        transparent
    );
    z-index: 1;
}

.login-ad__grid::before {
    left: 25%;
}

.login-ad__grid::after {
    left: 70%;
}

/* ============================================================
   4. Section Common Styles
   ============================================================ */

.login-ad__section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;  /* 竖直居中 */
    height: 100%;  /* 占满 Grid 单元格高度 */
    padding: 20px 12px;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.login-ad__section:nth-child(3) {
    animation-delay: 0s;
}

.login-ad__section:nth-child(4) {
    animation-delay: 0.15s;
}

.login-ad__section:nth-child(5) {
    animation-delay: 0.3s;
}

.login-ad__section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
    align-self: stretch;
    letter-spacing: 0.3px;
    position: relative;
}

.login-ad__section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1a42cf, transparent);
    border-radius: 1px;
}

.login-ad__section-footer {
    text-align: center;
    padding: 6px 10px;
    background: #1a42cf;
    color: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   5. Left Section - ASIN Flow
   ============================================================ */

.login-ad__asin-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.login-ad__asin-icon {
    width: 56px;
    height: 56px;
    color: #1a42cf;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.login-ad__asin-icon:hover {
    transform: scale(1.08);
}

.login-ad__asin-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

/* Monitor icon with ASIN text overlay */
.login-ad__monitor-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #1a42cf;
    transition: transform 0.2s ease;
}

.login-ad__monitor-wrapper:hover {
    transform: scale(1.08);
}

.login-ad__monitor-wrapper svg {
    width: 120px;
    height: 97px;
}

.login-ad__monitor-asin {
    font-size: 10px;
    font-weight: 700;
    color: #1a42cf;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1;
}

.login-ad__asin-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.login-ad__asin-img:hover {
    transform: scale(1.08);
}

/* Down arrow - matching AI engine arrow style */
.login-ad__asin-arrow {
    color: rgba(26, 66, 207, 0.65);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.login-ad__asin-reviews {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.login-ad__asin-review-icon {
    width: 36px;
    height: 36px;
    color: #1a42cf;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 66, 207, 0.04);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.login-ad__asin-review-icon:hover {
    background: rgba(26, 66, 207, 0.08);
    transform: translateY(-2px);
}

.login-ad__asin-review-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

/* ============================================================
   5.1 Left Section - Site Badges & Coverage Badge
   ============================================================ */

.login-ad__site-badges {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.login-ad__site-badge {
    font-size: 16px;
    padding: 2px 5px;
    background: rgba(26, 66, 207, 0.06);
    border-radius: 4px;
    border: 1px solid rgba(26, 66, 207, 0.15);
    opacity: 0.85;
    line-height: 1;
}

.login-ad__site-badge--more {
    font-size: 10px;
    color: #1a42cf;
    font-weight: 600;
    background: rgba(26, 66, 207, 0.08);
}

.login-ad__flow-arrow-down {
    color: #1a42cf;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.login-ad__flow-arrow-down svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.login-ad__coverage-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #1a42cf 0%, #3b82f6 100%);
    border-radius: 20px;
    color: white;
}

.login-ad__coverage-icon {
    font-size: 11px;
    font-weight: 700;
}

.login-ad__coverage-label {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
}

.login-ad__asin-reviews-horizontal {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.login-ad__asin-review-icon {
    width: 40px;
    height: 32px;
    color: #1a42cf;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px solid rgba(26, 66, 207, 0.25);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.login-ad__asin-review-icon:hover {
    border-color: #1a42cf;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(26, 66, 207, 0.1);
}

.login-ad__asin-review-icon svg {
    width: 32px;
    height: 26px;
    stroke-width: 1.5;
}

/* ============================================================
   6. Middle Section - AI Engine (8 Capabilities)
   ============================================================ */

.login-ad__ai-core-wrapper--expanded {
    position: relative;
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.login-ad__ai-core--main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.login-ad__ai-core-img {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 3s ease-in-out infinite;
    color: #1a42cf;
}

.login-ad__ai-core-img svg {
    width: 100%;
    height: 100%;
}

.login-ad__capabilities-surround {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 12px;
    column-gap: 6px;
    width: 100%;
    max-width: 320px;
    margin-top: 10px;
}

.login-ad__capability-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 10;
}

.login-ad__capability-icon-circle {
    width: 44px;
    height: 44px;
    border: 2px solid #1a42cf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1a42cf;
    transition: all 0.25s ease;
}

.login-ad__capability-icon-circle:hover {
    background: linear-gradient(135deg, #F0F4FF, #E8EDFF);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 66, 207, 0.2);
}

.login-ad__capability-icon-circle svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.75;
    display: block;
    margin: auto;
}

.login-ad__capability-text {
    font-size: 11px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    margin-top: 4px;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

/* ============================================================
   6. Middle Section - AI Engine
   ============================================================ */

.login-ad__ai-core-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
    flex: 1;  /* 占满 section 剩余空间 */
    min-height: 220px;
    position: relative;
}

/* Subtle radial glow behind the core */
.login-ad__ai-core-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(26, 66, 207, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: core-glow 4s ease-in-out infinite;
}

/* Capability items */
.login-ad__capability {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 4px;
}

.login-ad__capability--top-left {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: end;
}

.login-ad__capability--top-right {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    justify-self: start;
}

.login-ad__capability--bottom-left {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    justify-self: end;
}

.login-ad__capability--bottom-right {
    grid-column: 3;
    grid-row: 3;
    align-self: start;
    justify-self: start;
}

.login-ad__capability-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f0f4ff);
    border: 1.5px solid rgba(26, 66, 207, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a42cf;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(26, 66, 207, 0.06);
}

.login-ad__capability-circle:hover {
    border-color: #1a42cf;
    background: linear-gradient(135deg, #F0F4FF, #E8EDFF);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(26, 66, 207, 0.15);
}

.login-ad__capability-circle svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
}

.login-ad__capability-label {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Arrows - absolute positioned at center-to-corner boundary, pointing inward */
.login-ad__arrow {
    position: absolute;
    z-index: 6;
    color: rgba(26, 66, 207, 0.65);
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
}

/* Top-left boundary: arrow → down-right toward center */
.login-ad__arrow--tl {
    top: 38%;
    left: 38%;
    transform: translate(-50%, -50%) rotate(-135deg);
}

/* Top-right boundary: arrow → down-left toward center */
.login-ad__arrow--tr {
    top: 38%;
    left: 62%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Bottom-left boundary: arrow → up-right toward center */
.login-ad__arrow--bl {
    top: 62%;
    left: 38%;
    transform: translate(-50%, -50%) rotate(135deg);
}

/* Bottom-right boundary: arrow → up-left toward center */
.login-ad__arrow--br {
    top: 62%;
    left: 62%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* AI Core center - the hero element */
.login-ad__ai-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    grid-column: 2;
    grid-row: 2;
}

.login-ad__ai-core-icon {
    width: 76px;
    height: 76px;
    color: #1a42cf;
    animation: pulse-glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(26, 66, 207, 0.25));
}

.login-ad__ai-core-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.login-ad__ai-core-label {
    font-size: 18px;
    font-weight: 700;
    color: #1a42cf;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* ============================================================
   7. Right Section - Insight Cards
   ============================================================ */

.login-ad__insight-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.login-ad__insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.login-ad__insight-card {
    background: linear-gradient(135deg, #ffffff, #fafbff);
    border: 1px solid rgba(26, 66, 207, 0.12);
    border-radius: 10px;
    padding: 8px 6px;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 70px;
}

.login-ad__insight-card:hover {
    border-color: rgba(26, 66, 207, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 66, 207, 0.1);
}

.login-ad__insight-card-icon {
    width: 38px;
    height: 38px;
    color: #1a42cf;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-ad__insight-card-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.75;
}

.login-ad__insight-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

/* ============================================================
   8. Animations
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(26, 66, 207, 0.2));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 18px rgba(26, 66, 207, 0.4));
        transform: scale(1.05);
    }
}

@keyframes core-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

/* ============================================================
   9. Responsive
   ============================================================ */

@media (max-width: 767px) {
    .login-ad {
        min-height: auto;
        border-radius: 12px;
    }

    .login-ad__grid {
        grid-template-columns: 1fr;
        min-height: auto;
        position: relative;
    }

    /* 隐藏箭头和分割线 */
    .login-ad__arrow-section {
        display: none;
    }

    .login-ad__grid::before,
    .login-ad__grid::after {
        display: none;
    }

    .login-ad__section {
        border-bottom: 1px solid rgba(26, 66, 207, 0.08);
        padding: 16px 12px;
        min-height: auto;
    }

    .login-ad__section:last-child {
        border-bottom: none;
    }

    .login-ad__section-title {
        font-size: 15px;
    }

    /* 左侧 - 电脑显示器适配 */
    .login-ad__monitor-wrapper svg {
        width: 100px;
        height: 81px;
    }

    /* 中间 - AI引擎适配 */
    .login-ad__ai-core-img {
        width: 90px;
        height: 90px;
    }

    .login-ad__capabilities-surround {
        grid-template-columns: repeat(4, 1fr);
        row-gap: 8px;
    }

    .login-ad__capability-icon-circle {
        width: 36px;
        height: 36px;
    }

    .login-ad__capability-icon-circle svg {
        width: 20px;
        height: 20px;
    }

    .login-ad__capability-text {
        font-size: 9px;
    }

    /* 右侧 - 洞察卡片适配 */
    .login-ad__insight-grid {
        max-width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    .login-ad__insight-card {
        min-height: 60px;
        padding: 8px 6px;
    }

    .login-ad__insight-card-icon {
        width: 28px;
        height: 28px;
    }

    .login-ad__insight-card-title {
        font-size: 10px;
    }

    .login-ad__section-footer {
        font-size: 11px;
    }

    /* 左侧 - 其他元素适配 */
    .login-ad__site-badges {
        gap: 2px;
    }

    .login-ad__site-badge {
        font-size: 14px;
        padding: 2px 4px;
    }

    .login-ad__site-badge--more {
        font-size: 9px;
    }

    .login-ad__asin-reviews-horizontal {
        gap: 4px;
    }

    .login-ad__asin-review-icon {
        width: 34px;
        height: 28px;
    }

    .login-ad__asin-review-icon svg {
        width: 28px;
        height: 22px;
    }

    .login-ad__coverage-badge {
        padding: 2px 8px;
    }

    .login-ad__coverage-icon {
        font-size: 10px;
    }

    .login-ad__coverage-label {
        font-size: 9px;
    }

    .login-ad__asin-icon {
        width: 44px;
        height: 44px;
    }

    .login-ad__asin-icon svg {
        width: 32px;
        height: 32px;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .login-ad__capability-circle {
        width: 38px;
        height: 38px;
    }

    .login-ad__capability-circle svg {
        width: 18px;
        height: 18px;
    }

    .login-ad__ai-core-icon {
        width: 52px;
        height: 52px;
    }

    .login-ad__capability-label {
        font-size: 11px;
    }
}

/* ============================================================
   10. Login Page Layout Responsive
   ============================================================ */

@media (max-width: 767px) {
    /* 外层 row 改为 column 实现上下布局 */
    .login-page-layout {
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
    }

    /* 左侧宣传区移动端全宽 */
    .login-page-layout .login-page-ad {
        width: 100% !important;
        height: auto !important;
        min-height: 300px;
    }

    /* 右侧登录表单移动端全宽 */
    .login-page-layout .login-page-form {
        width: 100% !important;
        max-height: none !important;
    }
}
