.stock-page {
    position: relative;
    min-height: 100vh;
    padding-bottom: 90px;
    overflow-x: hidden;
}

.stock-page .container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
    width: 100%;
}

.stock-hero {
    position: relative;
    padding: 72px 0 40px;
    overflow: hidden;
}

.stock-hero-glow {
    position: absolute;
    top: -260px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 520px;
    background: radial-gradient(
        ellipse at center,
        rgba(var(--pink-rgb), 0.18),
        transparent 65%
    );
    pointer-events: none;
    z-index: 0;
}

.stock-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    animation: stockFadeUp 0.8s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.stock-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--pink);
    font-weight: 800;
    font-size: 0.88rem;
    margin: 0;
}

.stock-kicker::before,
.stock-kicker::after {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--pink);
    opacity: 0.85;
}

.stock-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    color: var(--text);
}

.stock-hero-desc {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.9;
    margin: 0;
    max-width: 62ch;
}

.stock-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 6px;
}

.stock-updated svg {
    color: var(--pink);
    flex-shrink: 0;
}

.stock-main {
    padding-top: 10px;
}

.stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.stock-card {
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    animation: stockFadeUp 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both;
    position: relative;
}

.stock-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 100% 0,
        rgba(var(--pink-rgb), 0.08),
        transparent 55%
    );
    pointer-events: none;
}

.stock-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.stock-card-info {
    min-width: 0;
    flex: 1;
}

.stock-card-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
    line-height: 1.4;
}

.stock-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(var(--pink-rgb), 0.1);
    color: var(--pink);
    border: 1px solid rgba(var(--pink-rgb), 0.28);
}

.stock-icon-mirage {
    background: rgba(76, 201, 240, 0.1);
    color: var(--sky);
    border-color: rgba(76, 201, 240, 0.28);
}

.stock-card-desc {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.7;
}

.stock-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    padding: 10px 16px;
    background: rgba(var(--pink-rgb), 0.08);
    border: 1px solid rgba(var(--pink-rgb), 0.24);
    border-radius: 14px;
    min-width: 140px;
}

.stock-timer-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stock-timer-value {
    font-family: var(--font-en);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pink);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    direction: ltr;
}

.stock-timer-value.is-updating {
    font-family: var(--font-fa);
    font-size: 0.82rem;
    letter-spacing: 0;
    text-align: center;
}

[dir="ltr"] .stock-timer-value.is-updating {
    font-family: var(--font-en);
}

.stock-timer-sub {
    font-size: 0.7rem;
    color: var(--faint);
    font-weight: 600;
    direction: ltr;
}

.stock-items {
    position: relative;
    z-index: 1;
    padding: 20px 22px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.stock-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--faint);
    font-size: 0.9rem;
    padding: 24px 0;
    margin: 0;
}

.stock-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.3s,
        box-shadow 0.3s;
    animation: stockFadeUp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.stock-item:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--pink-rgb), 0.5);
    box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.7);
}

.stock-item-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.stock-item-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stock-item:hover .stock-item-media img {
    transform: scale(1.08);
}

.stock-item-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.stock-item-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-item-price {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stock-item-beli {
    font-family: var(--font-en);
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--pink);
    font-variant-numeric: tabular-nums;
}

.stock-item-currency {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
}

.stock-history {
    margin-top: 48px;
}

.stock-history-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 20px;
    line-height: 1.4;
}

.stock-history-title svg {
    color: var(--pink);
    flex-shrink: 0;
}

.stock-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stock-history-entry {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
    animation: stockFadeUp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.stock-history-entry:hover {
    border-color: rgba(var(--pink-rgb), 0.4);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.7);
}

.stock-history-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--faint);
    font-weight: 600;
    flex-wrap: wrap;
}

.stock-history-time svg {
    flex-shrink: 0;
}

.stock-history-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(var(--pink-rgb), 0.12);
    border: 1px solid rgba(var(--pink-rgb), 0.3);
    color: var(--pink);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stock-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stock-history-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 999px;
    flex-shrink: 0;
    min-width: 72px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
}

.stock-history-label.is-normal {
    color: var(--pink);
    border-color: rgba(var(--pink-rgb), 0.3);
    background: rgba(var(--pink-rgb), 0.08);
}

.stock-history-label.is-mirage {
    color: var(--sky);
    border-color: rgba(76, 201, 240, 0.3);
    background: rgba(76, 201, 240, 0.08);
}

.stock-history-fruits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.stock-history-fruits em {
    display: inline-flex;
    align-items: center;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: 3px 10px;
    border-radius: 8px;
}

.stock-history-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--faint);
    font-size: 0.9rem;
    background: var(--panel);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

@keyframes stockFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.stock-item:nth-child(1) {
    animation-delay: 0.04s;
}
.stock-item:nth-child(2) {
    animation-delay: 0.08s;
}
.stock-item:nth-child(3) {
    animation-delay: 0.12s;
}
.stock-item:nth-child(4) {
    animation-delay: 0.16s;
}
.stock-item:nth-child(5) {
    animation-delay: 0.2s;
}
.stock-item:nth-child(6) {
    animation-delay: 0.24s;
}
.stock-item:nth-child(7) {
    animation-delay: 0.28s;
}
.stock-item:nth-child(8) {
    animation-delay: 0.32s;
}

@media (max-width: 1024px) {
    .stock-page .container {
        padding-inline: 20px;
    }
    .stock-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .stock-items {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .stock-history {
        margin-top: 36px;
    }
}

@media (max-width: 768px) {
    .stock-page {
        padding-bottom: 70px;
    }
    .stock-page .container {
        padding-inline: 18px;
    }
    .stock-hero {
        padding: 46px 0 24px;
    }
    .stock-hero-title {
        font-size: 1.65rem;
    }
    .stock-hero-desc {
        font-size: 0.9rem;
        line-height: 1.85;
    }
    .stock-kicker {
        font-size: 0.82rem;
    }
    .stock-kicker::before,
    .stock-kicker::after {
        width: 20px;
    }
    .stock-card-head {
        padding: 18px 18px;
        gap: 12px;
    }
    .stock-card-title {
        font-size: 1.02rem;
        gap: 10px;
    }
    .stock-card-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }
    .stock-card-icon svg {
        width: 18px;
        height: 18px;
    }
    .stock-card-desc {
        font-size: 0.8rem;
    }
    .stock-timer {
        min-width: 120px;
        padding: 8px 12px;
        border-radius: 12px;
    }
    .stock-timer-value {
        font-size: 1.15rem;
    }
    .stock-timer-value.is-updating {
        font-size: 0.76rem;
    }
    .stock-timer-sub {
        font-size: 0.66rem;
    }
    .stock-items {
        padding: 16px 16px 18px;
        gap: 10px;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .stock-item-name {
        font-size: 0.85rem;
    }
    .stock-item-beli {
        font-size: 0.9rem;
    }

    .stock-history {
        margin-top: 30px;
    }
    .stock-history-title {
        font-size: 1.02rem;
        margin-bottom: 16px;
    }
    .stock-history-entry {
        padding: 14px 16px;
        gap: 8px;
    }
    .stock-history-row {
        gap: 10px;
    }
    .stock-history-label {
        font-size: 0.65rem;
        padding: 3px 10px;
        min-width: 64px;
    }
    .stock-history-fruits em {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
}

@media (max-width: 480px) {
    .stock-page .container {
        padding-inline: 14px;
    }
    .stock-hero {
        padding: 34px 0 20px;
    }
    .stock-hero-title {
        font-size: 1.36rem;
        line-height: 1.3;
    }
    .stock-hero-desc {
        font-size: 0.83rem;
        line-height: 1.8;
    }
    .stock-kicker {
        font-size: 0.75rem;
        gap: 0.45rem;
    }
    .stock-kicker::before,
    .stock-kicker::after {
        width: 16px;
    }
    .stock-updated {
        font-size: 0.72rem;
        padding: 6px 12px;
    }

    .stock-card-head {
        padding: 16px 16px;
        flex-direction: column;
        align-items: stretch;
    }
    .stock-card-title {
        font-size: 0.98rem;
    }
    .stock-timer {
        align-items: center;
        text-align: center;
        flex-direction: row;
        justify-content: space-between;
        min-width: 0;
        padding: 10px 14px;
    }
    .stock-timer-label {
        font-size: 0.68rem;
    }
    .stock-timer-value {
        font-size: 1.1rem;
    }
    .stock-timer-value.is-updating {
        font-size: 0.72rem;
    }
    .stock-timer-sub {
        display: none;
    }

    .stock-items {
        padding: 14px 14px 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .stock-item-media {
        padding: 8px;
    }
    .stock-item-body {
        padding: 8px 10px 10px;
        gap: 4px;
    }
    .stock-item-name {
        font-size: 0.82rem;
    }
    .stock-item-beli {
        font-size: 0.86rem;
    }
    .stock-item-currency {
        font-size: 0.66rem;
    }

    .stock-history {
        margin-top: 26px;
    }
    .stock-history-title {
        font-size: 0.94rem;
        gap: 8px;
    }
    .stock-history-title svg {
        width: 16px;
        height: 16px;
    }
    .stock-history-entry {
        padding: 12px 14px;
        gap: 8px;
        border-radius: 12px;
    }
    .stock-history-time {
        font-size: 0.72rem;
        gap: 6px;
    }
    .stock-history-badge {
        font-size: 0.6rem;
        padding: 2px 7px;
    }
    .stock-history-row {
        gap: 8px;
    }
    .stock-history-label {
        font-size: 0.6rem;
        padding: 3px 8px;
        min-width: 56px;
    }
    .stock-history-fruits {
        gap: 5px;
    }
    .stock-history-fruits em {
        font-size: 0.66rem;
        padding: 2px 7px;
        border-radius: 7px;
    }
    .stock-history-empty {
        padding: 26px 16px;
        font-size: 0.82rem;
    }
}