:root {
    --bg1: #fff8ed;
    --bg2: #ffe8c4;
    --red: #d71920;
    --deep-red: #8b0000;
    --orange: #ff7a1a;
    --gold: #ffc94d;
    --text: #351307;
    --muted: #8b6852;
    --card: rgba(255, 255, 255, .9);
    --line: rgba(140, 70, 20, .14);
    --shadow: 0 22px 65px rgba(150, 70, 10, .16);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 118, 30, .22), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(214, 25, 32, .14), transparent 32%),
        linear-gradient(135deg, var(--bg1), var(--bg2));
}

.page {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 50px;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(255, 255, 255, .24), transparent 26%),
        linear-gradient(135deg, #9f1111, #e43b1b 48%, #ffae28);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: -130px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
}

.hero-left,
.hero-controls {
    position: relative;
    z-index: 2;
}

.tag {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff9d8;
    font-size: 14px;
    font-weight: 900;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.25);
}

.hero h1 {
    margin: 16px 0 14px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: .94;
    letter-spacing: -3px;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255,255,255,.88);
    font-size: 16px;
    line-height: 1.9;
}

.hero-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.24);
    backdrop-filter: blur(10px);
}

.form-item label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255,255,255,.84);
    font-size: 13px;
    font-weight: 800;
}

.form-item input,
.form-item select {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    border-radius: 15px;
    padding: 0 14px;
    color: #5c1609;
    background: rgba(255,255,255,.94);
    font-size: 15px;
    font-weight: 900;
}

.btn {
    grid-column: span 2;
    height: 48px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    color: #561406;
    background: linear-gradient(135deg, #fff1a8, #ffcf45);
    box-shadow: 0 14px 32px rgba(80, 20, 0, .22);
    font-weight: 1000;
    font-size: 15px;
    transition: .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
}

.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.status {
    margin: 18px 2px;
    color: #75432a;
    font-weight: 900;
}

.loading,
.error {
    padding: 46px 20px;
    text-align: center;
    border-radius: 26px;
    background: var(--card);
    box-shadow: var(--shadow);
    font-size: 18px;
    font-weight: 900;
}

.error {
    color: #991b1b;
    background: #fee2e2;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 20px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: var(--shadow);
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 850;
}

.summary-card b {
    display: block;
    margin-top: 8px;
    color: #411405;
    font-size: 25px;
    line-height: 1.1;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 22px;
}

.left-col,
.right-col {
    display: grid;
    gap: 22px;
    align-content: start;
}

.card {
    border-radius: 28px;
    background: var(--card);
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.card-head {
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.card-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 1000;
}

.card-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.next-badge {
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 999px;
    color: #8a1609;
    background: #fff0b8;
    border: 1px solid #ffd36b;
    font-weight: 1000;
}

.main-predict {
    padding: 24px;
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 22px;
}

.special-box {
    min-height: 320px;
    padding: 24px;
    border-radius: 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #c91414, #ff7a1a 58%, #ffc94d);
    box-shadow: 0 22px 55px rgba(215, 25, 32, .22);
}

.special-box.blue {
    background: linear-gradient(145deg, #1359d8, #3b82f6 58%, #8ec5ff);
}

.special-box.green {
    background: linear-gradient(145deg, #087f5b, #10b981 58%, #9ef2c4);
}

.special-box::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    bottom: -75px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
}

.box-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    font-weight: 1000;
}

.box-label.dark {
    color: #9f1111;
    background: #fff2bd;
}

.big-ball {
    position: relative;
    z-index: 1;
    width: 155px;
    height: 155px;
    margin: 26px auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #a1120b;
    font-size: 62px;
    font-weight: 1000;
    letter-spacing: -3px;
    background:
        radial-gradient(circle at 32% 24%, #fff, #fff 24%, #f4f4f4 42%, #d8d8d8 73%, #fff 100%);
    box-shadow:
        inset -16px -22px 28px rgba(0,0,0,.14),
        inset 12px 12px 18px rgba(255,255,255,.95),
        0 22px 35px rgba(80,20,0,.25);
}

.meta-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.meta-grid span {
    padding: 10px;
    border-radius: 14px;
    text-align: center;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.2);
    font-weight: 900;
}

.zodiac-box {
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7d6, #fff);
    border: 1px solid rgba(255, 195, 65, .35);
}

.main-zodiac {
    margin: 16px 0 10px;
    color: #c01313;
    font-size: clamp(62px, 9vw, 96px);
    font-weight: 1000;
    line-height: .95;
}

.zodiac-box p {
    margin: 0;
    color: #81573c;
    line-height: 1.8;
    font-weight: 750;
}

.zodiac-list,
.number-list {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.zodiac-item {
    padding: 18px 10px;
    border-radius: 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(120,60,10,.08);
}

.rank {
    color: var(--muted);
    font-size: 12px;
    font-weight: 1000;
}

.zodiac-name {
    margin: 10px 0 8px;
    color: #b30f0f;
    font-size: 34px;
    font-weight: 1000;
}

.rate,
.hit {
    color: #7a5b48;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

.number-card {
    position: relative;
    padding: 16px 12px;
    border-radius: 23px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(120,60,10,.08);
    overflow: hidden;
}

.number-card::before {
    content: "";
    position: absolute;
    width: 92px;
    height: 92px;
    right: -38px;
    top: -38px;
    border-radius: 50%;
    opacity: .18;
    background: #ef4444;
}

.number-card.blue::before {
    background: #3b82f6;
}

.number-card.green::before {
    background: #10b981;
}

.num-ball {
    width: 70px;
    height: 70px;
    margin: 12px auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #8b1609;
    font-size: 29px;
    font-weight: 1000;
    background:
        radial-gradient(circle at 32% 24%, #fff, #fff 24%, #f0f0f0 47%, #d4d4d4 76%, #fff);
    box-shadow:
        inset -8px -12px 16px rgba(0,0,0,.12),
        0 10px 20px rgba(100,40,0,.14);
}

.num-info {
    display: grid;
    gap: 5px;
    text-align: center;
}

.num-info p {
    margin: 0;
    color: #76513c;
    font-size: 13px;
    font-weight: 800;
}

.num-info b {
    color: #351307;
}

.last-open {
    padding: 22px;
}

.small-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.mt {
    margin-top: 18px;
}

.last-time {
    margin-top: 8px;
    font-size: 19px;
    font-weight: 1000;
}

.last-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.last-ball {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(120,60,10,.1);
    font-weight: 1000;
}

.last-ball.special {
    color: #fff;
    background: linear-gradient(135deg, #c21807, #ff7a1a);
}

.last-special {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: #fff6dd;
    border: 1px solid #ffe0a2;
}

.last-special span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.last-special b {
    display: inline-block;
    margin-top: 6px;
    margin-right: 8px;
    color: #c01313;
    font-size: 32px;
}

.last-special em {
    color: #76513c;
    font-style: normal;
    font-weight: 800;
}

.trend-group {
    padding: 22px;
}

.trend-group h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.trend-group h3:not(:first-child) {
    margin-top: 24px;
}

.trend-row {
    margin-bottom: 14px;
}

.trend-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    font-weight: 900;
}

.bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #f0dfc9;
}

.bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d71920, #ffba2e);
}

.algo {
    padding: 22px;
}

.algo p {
    margin: 0 0 10px;
    color: #76513c;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 750;
}

.algo p:last-child {
    margin-bottom: 0;
}

.notice {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 22px;
    color: #76513c;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.72);
    line-height: 1.8;
    font-size: 14px;
    box-shadow: var(--shadow);
}

@media (max-width: 1050px) {
    .hero,
    .layout,
    .main-predict {
        grid-template-columns: 1fr;
    }

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

    .zodiac-list,
    .number-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 620px) {
    .page {
        width: calc(100% - 18px);
        padding-top: 10px;
    }

    .hero {
        padding: 24px;
        border-radius: 24px;
    }

    .hero-controls {
        grid-template-columns: 1fr;
    }

    .btn {
        grid-column: span 1;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .zodiac-list,
    .number-list {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }

    .main-predict {
        padding: 16px;
    }

    .special-box {
        min-height: auto;
    }

    .big-ball {
        width: 132px;
        height: 132px;
        font-size: 52px;
    }
}