/* Codex configuration guide page */

.doc-page {
    position: relative;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 87, 34, 0.08), transparent 30%),
        radial-gradient(circle at 8% 28%, rgba(24, 144, 255, 0.06), transparent 26%),
        #fcfbf9;
    overflow: hidden;
}

.doc-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 87, 34, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 87, 34, 0.026) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 72%);
}

.doc-page::after {
    content: "";
    position: absolute;
    top: 96px;
    right: max(22px, calc((100vw - var(--container-width)) / 2 + 30px));
    width: 112px;
    height: 112px;
    border: 1px solid rgba(255, 87, 34, 0.16);
    border-radius: 24px;
    transform: rotate(18deg);
    pointer-events: none;
    opacity: 0.45;
}

.doc-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 24px;
    align-items: center;
    min-height: auto;
    padding: 15px 0 18px;
}

.doc-hero::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 12px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.16), rgba(255, 255, 255, 0));
    transform: rotate(-12deg);
    pointer-events: none;
}

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

.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 87, 34, 0.18);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 243, 0.72));
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.07);
    backdrop-filter: blur(10px);
}

.doc-title {
    position: relative;
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 42px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.16px;
}

.doc-title span {
    position: relative;
    color: var(--primary);
}

.doc-title span::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 4px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 87, 34, 0.14);
    z-index: -1;
}

.doc-desc {
    max-width: 640px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.75;
}

.doc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.doc-primary-btn,
.doc-outline-btn {
    gap: 8px;
    min-width: 136px;
    border-radius: 8px;
}

.doc-primary-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ff823e 0%, var(--primary) 100%);
    box-shadow: 0 6px 14px rgba(255, 87, 34, 0.2);
}

.doc-primary-btn::after,
.doc-card-btn.btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.22) 42%, transparent 78%);
    transform: translateX(-110%);
    transition: transform 0.62s ease;
}

.doc-primary-btn:hover::after,
.doc-card-btn.btn-primary:hover::after {
    transform: translateX(110%);
}

.doc-outline-btn {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 87, 34, 0.22);
}

.doc-feature-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.doc-feature-pill {
    position: relative;
    padding: 6px 10px;
    border: 1px solid rgba(255, 87, 34, 0.13);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.66);
    color: #5f4b42;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.03);
}

.doc-feature-pill::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--primary);
    vertical-align: 1px;
}

.doc-preview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 87, 34, 0.16);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 244, 0.9)),
        #fff;
    box-shadow:
        0 12px 30px rgba(255, 87, 34, 0.08),
        0 6px 16px rgba(31, 31, 31, 0.045);
    transform: translateZ(0);
}

.doc-preview-card::before {
    content: "";
    position: absolute;
    top: -92px;
    right: -90px;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.18), rgba(255, 87, 34, 0));
    pointer-events: none;
}

.doc-preview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(255, 87, 34, 0.06);
    pointer-events: none;
}

.doc-preview-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 87, 34, 0.08);
    background: rgba(255, 255, 255, 0.58);
}

.doc-preview-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff6b5b;
}

.doc-preview-header span:nth-child(2) {
    background: #f5b84b;
}

.doc-preview-header span:nth-child(3) {
    background: #52c41a;
}

.doc-preview-header strong {
    margin-left: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.doc-preview-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
}

.doc-check-item {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.035);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.doc-check-item:hover {
    transform: translateX(2px);
    border-color: rgba(255, 87, 34, 0.2);
    box-shadow: 0 8px 18px rgba(255, 87, 34, 0.07);
}

.doc-check-item.active::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 40px;
    bottom: -12px;
    width: 1px;
    background: linear-gradient(to bottom, rgba(82, 196, 26, 0.38), transparent);
}

.doc-check-item strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text-main);
    font-size: 15px;
}

.doc-check-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.doc-check-icon,
.doc-step-num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.doc-check-icon {
    background: rgba(82, 196, 26, 0.12);
    color: var(--success);
}

.doc-step-num {
    background: var(--primary-light);
    color: var(--primary);
}

.doc-card-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.1fr 1.1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.doc-platform-card,
.doc-action-card {
    position: relative;
    overflow: hidden;
    min-height: 236px;
    padding: 20px;
    border-radius: 16px;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.doc-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 243, 0.92)),
        #fff;
}

.doc-platform-card::before {
    content: "";
    position: absolute;
    width: 138px;
    height: 138px;
    border: 1px solid rgba(255, 87, 34, 0.12);
    border-radius: 50%;
    transform: translateY(-4px);
}

.doc-platform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 87, 34, 0.1);
    border-color: rgba(255, 87, 34, 0.2);
}

.doc-platform-card p {
    max-width: 240px;
    margin: 8px auto 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.doc-windows-icon {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 8px;
    border-radius: 12px;
    background: #eef2f7;
    box-shadow: inset 0 -3px 7px rgba(0, 0, 0, 0.08), 0 10px 20px rgba(24, 144, 255, 0.12);
}

.doc-windows-icon span {
    border-radius: 3px;
    background: linear-gradient(135deg, #36c5f0, #1890ff);
}

.doc-platform-name {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 900;
}

.doc-action-card {
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
        var(--white);
}

.doc-action-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ffb06f);
    opacity: 0.88;
}

.doc-action-card::after {
    content: "";
    position: absolute;
    right: -58px;
    bottom: -66px;
    width: 150px;
    height: 150px;
    border-radius: 34px;
    background: rgba(255, 87, 34, 0.055);
    transform: rotate(18deg);
    pointer-events: none;
}

.doc-action-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 87, 34, 0.32);
    box-shadow: 0 12px 26px rgba(255, 87, 34, 0.12);
}

.doc-card-label {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.doc-card-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.14), rgba(255, 255, 255, 0.92));
    color: var(--primary);
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.08);
}

.doc-action-card h2 {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 900;
}

.doc-action-card p {
    flex: 1;
    margin: 0 0 15px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

.doc-card-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 42px;
    gap: 8px;
    border-radius: 8px;
}

.doc-video-card .doc-card-label {
    background: #7142d9;
}

.doc-video-card::before {
    background: linear-gradient(90deg, #7142d9, #b190ff);
}

.doc-video-card .doc-card-icon {
    background: rgba(113, 66, 217, 0.1);
    color: #7142d9;
}

.doc-video-btn {
    border-color: rgba(113, 66, 217, 0.26);
    color: #7142d9;
}

.doc-video-btn:hover {
    border-color: #7142d9;
    background: rgba(113, 66, 217, 0.08);
    color: #7142d9;
}

.doc-card-tip {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    opacity: 0.82;
}

.doc-steps {
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 244, 0.68)),
        var(--white);
    box-shadow: 0 6px 18px rgba(31, 31, 31, 0.035);
}

.doc-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.doc-section-head h2 {
    margin: 0 0 5px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 900;
}

.doc-section-head p {
    margin: 0;
    color: var(--text-secondary);
}

.doc-section-link {
    flex: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.doc-section-link:hover {
    color: var(--primary-hover);
}

.doc-step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.doc-step-card {
    position: relative;
    overflow: hidden;
    padding: 15px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: #fcfaf7;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.doc-step-card::after {
    content: "";
    position: absolute;
    top: -42px;
    right: -42px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255, 87, 34, 0.07);
}

.doc-step-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 87, 34, 0.2);
    background: #fff;
}

.doc-step-card span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

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

.doc-hero-content,
.doc-preview-card,
.doc-card-grid > *,
.doc-steps {
    animation: docFadeUp 0.58s ease both;
}

.doc-preview-card {
    animation-delay: 0.08s;
}

.doc-card-grid > *:nth-child(1) {
    animation-delay: 0.12s;
}

.doc-card-grid > *:nth-child(2) {
    animation-delay: 0.18s;
}

.doc-card-grid > *:nth-child(3) {
    animation-delay: 0.24s;
}

.doc-steps {
    animation-delay: 0.3s;
}

.doc-step-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 16px;
}

.doc-step-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .doc-hero,
    .doc-card-grid {
        grid-template-columns: 1fr;
    }

    .doc-preview-card {
        max-width: 680px;
    }
}

@media (max-width: 768px) {
    .doc-hero {
        padding-top: 8px;
        gap: 15px;
    }

    .doc-title {
        font-size: 32px;
    }

    .doc-desc {
        font-size: 15px;
    }

    .doc-hero-actions,
    .doc-primary-btn,
    .doc-outline-btn {
        width: 100%;
    }

    .doc-feature-row {
        gap: 8px;
    }

    .doc-platform-card,
    .doc-action-card,
    .doc-steps {
        padding: 15px;
        min-height: auto;
    }

    .doc-section-head {
        flex-direction: column;
    }

    .doc-step-grid {
        grid-template-columns: 1fr;
    }
}
