@charset "utf-8";

.randombox-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.randombox-shell,
.randombox-log-card {
    background: #fff;
    border: 1px solid #ece7fb;
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(91, 56, 167, 0.08);
}
.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, #a66eff, #8b5cf6);
    color: #fff;
    box-shadow: 0 12px 24px rgba(139, 92, 246, 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: #faf5ff;
    color: #6d28d9;
    border: 1px solid #e9d5ff;
    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 #e8ddff;
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 0%, rgba(250, 204, 21, 0.18), transparent 28%),
        radial-gradient(circle at 92% 12%, rgba(236, 72, 153, 0.18), transparent 30%),
        linear-gradient(180deg, #ffffff, #faf7ff 62%, #fff);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    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(168, 85, 247, 0.14), transparent, rgba(245, 158, 11, 0.16), transparent);
    opacity: 0;
    transform: rotate(0deg);
    transition: opacity 0.2s ease;
}
.randombox-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 18px 42px rgba(91, 56, 167, 0.14);
    transform: translateY(-2px);
}
.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(245, 243, 255, 0.72) 55%, rgba(17, 24, 39, 0.05)),
        linear-gradient(135deg, rgba(17, 24, 39, 0.06), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(196, 181, 253, 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 18px 16px rgba(17, 24, 39, 0.16));
}
.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.82), 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, #3b0764);
    color: #fef3c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}
.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, #4338ca, #a855f7);
    color: #f5f3ff;
}
.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, #7e22ce 48%, #f59e0b);
    color: #fef3c7;
    box-shadow: 0 10px 24px rgba(126, 34, 206, 0.28);
}
.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: #f3e8ff;
    color: #7c3aed;
    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 #eee7ff;
    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: #6d28d9;
    font-size: 17px;
    line-height: 1.25;
}
.randombox-reward-details {
    border: 1px solid #eee7ff;
    border-radius: 12px;
    background: rgba(250, 247, 255, 0.82);
    color: #4b5563;
    font-size: 13px;
}
.randombox-reward-details summary {
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    color: #6d28d9;
}
.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 #ede9fe;
    color: #374151;
    line-height: 1.2;
}
.randombox-reveal {
    min-height: 70px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e9d5ff;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(250, 245, 255, 0.9)),
        radial-gradient(circle at 12% 40%, rgba(250, 204, 21, 0.22), 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, #6d28d9, #8b5cf6 52%, #ec4899);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.24);
    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.32) 42%, transparent 72%);
    opacity: 0;
    transform: translateX(-120%);
    pointer-events: none;
}
.randombox-buy-button--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.randombox-buy-button:hover:not(:disabled) {
    filter: brightness(1.04);
    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: #a855f7;
    box-shadow: 0 22px 52px rgba(124, 58, 237, 0.2);
}
.randombox-card.is-opening .randombox-card__image {
    animation: randombox-open-shake 0.82s ease-in-out infinite;
    filter: saturate(1.16);
}
.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.28), transparent 40%);
}
.randombox-card.is-jackpot .randombox-reveal {
    border-color: #facc15;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.18), 0 18px 36px rgba(217, 119, 6, 0.18);
}
.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 14px 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: #faf7ff;
}
.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 34px rgba(250, 204, 21, 0.7), 0 0 28px rgba(250, 204, 21, 0.36);
    }
}
@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 (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;
    }
    .randombox-table th:nth-child(3),
    .randombox-table td:nth-child(3) {
        display: none;
    }
}
@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;
    }
}
