@charset "utf-8";

.randombox-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.randombox-shell,
.randombox-log-card {
    background: #fff;
    border: 1px solid #d9ece8;
    border-radius: 20px;
    box-shadow: none;
}
.randombox-shell {
    padding: 18px;
}
.randombox-topbar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}
.randombox-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-width: 220px;
    max-width: 280px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f8c7c, #13a89a);
    color: #fff;
    box-shadow: 0 12px 24px rgba(19, 168, 154, 0.18);
}
.randombox-stat__label {
    font-size: 12px;
    opacity: 0.92;
    white-space: nowrap;
}
.randombox-stat__value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.randombox-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-bottom: 18px;
}
.randombox-title__main {
    min-width: 0;
}
.randombox-title h2,
.randombox-log-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
}
.randombox-title p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}
.randombox-alert {
    padding: 14px 16px;
    border-radius: 14px;
    background: #effaf8;
    color: #0a7367;
    border: 1px solid #cce7e1;
    font-size: 13px;
    line-height: 1.6;
}
.randombox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.randombox-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid #d9ece8;
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.09), transparent 28%),
        radial-gradient(circle at 92% 12%, rgba(15, 140, 124, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff, #f7fbf9 62%, #fff);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.randombox-card::before {
    content: "";
    position: absolute;
    inset: -40% -60%;
    z-index: -1;
    background: conic-gradient(from 180deg, transparent, rgba(15, 140, 124, 0.08), transparent, rgba(246, 183, 60, 0.09), transparent);
    opacity: 0;
    transform: rotate(0deg);
    transition: opacity 0.2s ease;
}
.randombox-card:hover {
    border-color: #65d7c9;
    box-shadow: none;
    transform: translateY(-3px);
}
.randombox-card:hover::before,
.randombox-card.is-rolling::before,
.randombox-card.is-opening::before,
.randombox-card.is-blasting::before,
.randombox-card.is-hit::before,
.randombox-card.is-jackpot::before {
    opacity: 1;
}
.randombox-card__stage {
    position: relative;
    min-height: 218px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.96), rgba(239, 250, 248, 0.78) 55%, rgba(17, 24, 39, 0.05)),
        linear-gradient(135deg, rgba(17, 24, 39, 0.06), rgba(15, 140, 124, 0.12));
    border: 1px solid rgba(101, 215, 201, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.randombox-card__image {
    position: relative;
    z-index: 2;
    width: min(260px, 88%);
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
    transition: transform 0.25s ease, filter 0.25s ease;
}
.randombox-card__image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    filter: drop-shadow(0 8px 8px rgba(17, 24, 39, 0.12));
}
.randombox-card__shine {
    position: absolute;
    inset: -30% auto auto -70%;
    z-index: 3;
    width: 60%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.36), transparent);
    transform: rotate(18deg);
    opacity: 0;
    pointer-events: none;
}
.randombox-card__jackpot {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 4;
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827, #083f3a);
    color: #fef3c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: none;
}
.randombox-card--starter .randombox-card__jackpot {
    background: linear-gradient(135deg, #475569, #94a3b8);
    color: #ffffff;
}
.randombox-card--lucky .randombox-card__jackpot {
    background: linear-gradient(135deg, #0f766e, #22c55e);
    color: #ecfdf5;
}
.randombox-card--gold .randombox-card__jackpot {
    background: linear-gradient(135deg, #92400e, #f59e0b);
    color: #fff7ed;
}
.randombox-card--platinum .randombox-card__jackpot {
    background: linear-gradient(135deg, #0f766e, #38bdf8);
    color: #ecfeff;
}
.randombox-card--diamond .randombox-card__jackpot {
    background: linear-gradient(135deg, #0369a1, #22d3ee);
    color: #ecfeff;
}
.randombox-card--royal .randombox-card__jackpot {
    background: linear-gradient(135deg, #111827, #0f8c7c 48%, #f59e0b);
    color: #fef3c7;
    box-shadow: none;
}
.randombox-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.randombox-card__name {
    font-size: 20px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.35;
}
.randombox-card__cost {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff4d8;
    color: #0a7367;
    font-size: 14px;
    font-weight: 700;
}
.randombox-reward-teaser {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.randombox-reward-teaser > div {
    padding: 10px 12px;
    border: 1px solid #d9ece8;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}
.randombox-reward-teaser span,
.randombox-reveal__eyebrow {
    display: block;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}
.randombox-reward-teaser strong {
    display: block;
    margin-top: 4px;
    color: #0f8c7c;
    font-size: 17px;
    line-height: 1.25;
}
.randombox-reward-details {
    border: 1px solid #d9ece8;
    border-radius: 12px;
    background: rgba(247, 251, 249, 0.86);
    color: #4b5563;
    font-size: 13px;
}
.randombox-reward-details summary {
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    color: #0f8c7c;
}
.randombox-reward-details ul {
    list-style: none;
    margin: 0;
    padding: 0 12px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.randombox-reward-details li {
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d9ece8;
    color: #374151;
    line-height: 1.2;
}
.randombox-reveal {
    min-height: 70px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #d9ece8;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(239, 250, 248, 0.9)),
        radial-gradient(circle at 12% 40%, rgba(250, 204, 21, 0.12), transparent 36%);
    color: #374151;
}
.randombox-reveal strong {
    display: block;
    margin: 2px 0;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
}
.randombox-reveal span:last-child {
    color: #6b7280;
    font-size: 13px;
}
.randombox-buy-button {
    position: relative;
    overflow: hidden;
    min-height: 44px;
    margin-top: auto;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f766e, #13a89a 52%, #10b981);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(15, 140, 124, 0.1);
    transition: filter 0.15s ease, transform 0.15s ease;
}
.randombox-buy-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.2) 42%, transparent 72%);
    opacity: 0;
    transform: translateX(-120%);
    pointer-events: none;
}
.randombox-buy-button--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
}
.randombox-buy-button--link:hover,
.randombox-buy-button--link:focus {
    color: #fff !important;
    text-decoration: none;
}
.randombox-buy-button:hover:not(:disabled) {
    color: #fff !important;
    filter: brightness(1.02);
    transform: translateY(-1px);
}
.randombox-buy-button:hover:not(:disabled)::after {
    opacity: 1;
    transform: translateX(120%);
    transition: transform 0.62s ease, opacity 0.2s ease;
}
.randombox-buy-button:disabled {
    cursor: not-allowed;
    background: #d1d5db;
    color: #6b7280;
}
.randombox-inline-note {
    min-height: 36px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}
.randombox-inline-note.is-error {
    color: #b91c1c;
}
.randombox-inline-note.is-success {
    color: #047857;
}
.randombox-card.is-opening {
    border-color: #0f8c7c;
    box-shadow: none;
}
.randombox-card.is-opening .randombox-card__image {
    animation: randombox-open-shake 0.82s ease-in-out infinite;
    filter: saturate(1.06);
}
.randombox-card.is-opening .randombox-card__shine {
    animation: randombox-stage-shine 0.92s ease-in-out infinite;
    opacity: 1;
}
.randombox-card.is-hit .randombox-reveal {
    border-color: #bbf7d0;
    background:
        linear-gradient(90deg, rgba(240, 253, 244, 0.95), rgba(255, 255, 255, 0.95)),
        radial-gradient(circle at 10% 40%, rgba(250, 204, 21, 0.14), transparent 40%);
}
.randombox-card.is-jackpot .randombox-reveal {
    border-color: #facc15;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.14);
}
.randombox-card.is-jackpot .randombox-card__stage {
    animation: randombox-jackpot-glow 1s ease-in-out 2;
}
.randombox-card.is-low .randombox-reveal {
    border-color: #fecaca;
    background:
        linear-gradient(90deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.95)),
        radial-gradient(circle at 10% 40%, rgba(251, 113, 133, 0.18), transparent 40%);
}
.randombox-prize-burst {
    position: absolute;
    left: 50%;
    top: 38%;
    z-index: 8;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    background: var(--burst-color, #facc15);
    box-shadow: 0 0 6px var(--burst-color, #facc15);
    animation: randombox-prize-burst 0.9s ease-out forwards;
}
.randombox-log-card {
    padding: 20px;
}
.randombox-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.randombox-log-head p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}
.randombox-table-wrap {
    overflow-x: auto;
}
.randombox-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}
.randombox-table th,
.randombox-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #ece7fb;
    text-align: left;
    vertical-align: middle;
}
.randombox-user,
.randombox-table .member-visual {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    vertical-align: middle;
    line-height: inherit;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    position: relative;
    top: -1px;
}
.randombox-user .member-visual__icons,
.randombox-table .member-visual__icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 0 0 auto;
    line-height: 1;
}
.randombox-user .member-visual__icons .xp-icon,
.randombox-user .member-visual__icons .member-visual__icon,
.randombox-table .member-visual__icons .xp-icon,
.randombox-table .member-visual__icons .member-visual__icon {
    margin: 0;
    flex: 0 0 auto;
}
.randombox-user .member-visual__icon,
.randombox-table .member-visual__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
}
.randombox-user .member-visual__icon img,
.randombox-table .member-visual__icon img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.randombox-user__name,
.randombox-table .member-visual__name {
    flex: 0 0 auto;
    line-height: inherit;
    min-width: 0;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}
.randombox-table thead th {
    background: #111827;
    color: #fff;
    font-weight: 700;
}
.randombox-table tbody tr:nth-child(even) {
    background: #f7fbf9;
}
.randombox-table tbody td:nth-child(2),
.randombox-table tbody td:nth-child(3) {
    white-space: nowrap;
}
.randombox-empty {
    padding: 28px 14px;
    text-align: center;
    color: #6b7280;
}
.randombox-pagination {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.randombox-pagination .pg_page,
.randombox-pagination .pg_current {
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 10px;
}
@keyframes randombox-open-shake {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    18% {
        transform: translate3d(-5px, -2px, 0) rotate(-2deg) scale(1.02);
    }
    36% {
        transform: translate3d(5px, 1px, 0) rotate(2deg) scale(1.03);
    }
    54% {
        transform: translate3d(-3px, 2px, 0) rotate(-1.5deg) scale(1.01);
    }
    72% {
        transform: translate3d(4px, -1px, 0) rotate(1.5deg) scale(1.03);
    }
}
@keyframes randombox-stage-shine {
    0% {
        left: -70%;
        opacity: 0;
    }
    20%,
    70% {
        opacity: 1;
    }
    100% {
        left: 115%;
        opacity: 0;
    }
}
@keyframes randombox-jackpot-glow {
    0%,
    100% {
        box-shadow: inset 0 0 0 rgba(250, 204, 21, 0);
    }
    50% {
        box-shadow: inset 0 0 16px rgba(250, 204, 21, 0.32), 0 0 12px rgba(250, 204, 21, 0.16);
    }
}
@keyframes randombox-prize-burst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--burst-rotate, 0deg)) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--burst-rotate, 0deg)) translateX(var(--burst-distance, 88px)) scale(0.2);
    }
}
@media (prefers-reduced-motion: reduce) {
    .randombox-card,
    .randombox-card__image,
    .randombox-buy-button,
    .randombox-card__shine,
    .randombox-prize-burst {
        animation: none !important;
        transition: none !important;
    }
}
@media (max-width: 1100px) {
    .randombox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .randombox-title {
        grid-template-columns: 1fr;
    }
    .randombox-topbar {
        justify-content: stretch;
    }
    .randombox-stat {
        max-width: none;
        min-width: 0;
    }
    .randombox-grid {
        grid-template-columns: 1fr;
    }
    .randombox-shell,
    .randombox-log-card {
        padding: 16px;
        border-radius: 16px;
    }
    .randombox-title h2,
    .randombox-log-card h3 {
        font-size: 20px;
    }
    .randombox-card__image {
        min-height: 0;
    }
    .randombox-card__stage {
        min-height: 190px;
    }
    .randombox-table th,
    .randombox-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    .randombox-table {
        min-width: 460px;
    }
}
@media (max-width: 575px) {
    .randombox-table {
        min-width: 0;
        table-layout: fixed;
    }
    .randombox-table th,
    .randombox-table td {
        padding: 10px 7px;
        font-size: 11px;
    }
    .randombox-table th:nth-child(1),
    .randombox-table td:nth-child(1) {
        width: 42%;
    }
    .randombox-table th:nth-child(2),
    .randombox-table td:nth-child(2) {
        width: 24%;
    }
    .randombox-table th:nth-child(3),
    .randombox-table td:nth-child(3) {
        width: 34%;
    }
    .randombox-user,
    .randombox-table .member-visual {
        width: 100%;
        overflow: hidden;
    }
    .randombox-user__name,
    .randombox-table .member-visual__name {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media (max-width: 359px) {
    .randombox-title,
    .randombox-log-head {
        gap: 8px;
    }
    .randombox-title p,
    .randombox-log-head p {
        font-size: 13px;
    }
    .randombox-card {
        padding: 16px;
        gap: 12px;
    }
    .randombox-card__image {
        min-height: 0;
    }
    .randombox-card__stage {
        min-height: 172px;
    }
    .randombox-reward-teaser {
        grid-template-columns: 1fr;
    }
}
