.cark-step-1 {
    background: linear-gradient(135deg, rgba(227, 146, 20, 0.1) 0%, rgba(227, 146, 20, 0.05) 100%);
    border-radius: 0.5rem;
    opacity: 0.5;
}

.cark-wrapper {
    overflow: hidden;
}

.cark-content {
    margin: 0 auto 3rem;
    width: 100%;
    max-width: 77.5rem;
    padding: 0 1rem;
}

.cark-grid-layout {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    width: 100%;
}

.cark-header-section {
    grid-column: 1 / -1;
}

.cark-header-nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.cark-header-link {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: max-content;
    color: var(--section-title-color, rgba(255, 255, 255, 0.8));
    text-decoration: none;
}

.cark-header-link svg {
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--card-default, rgb(17, 17, 17));
}

.cark-header-title {
    display: none;
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--nirvana-normal-text-color, rgba(255, 255, 255, 0.9));
}

.cark-main-section {
    width: 100%;
    grid-column: 1 / -1;
}

.cark-main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: start;
}

.cark-control-panel {
    z-index: 10;
    order: 2;
    grid-column: span 3;
    user-select: none;
    width: 100%;
    display: flex;
    justify-content: center;
}

.cark-control-box {
    width: 100%;
    max-width: 21.5rem;
    position: relative;
    height: max-content;
    flex-shrink: 0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.cark-control-box .cark-step-1 {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.cark-control-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cark-info-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.2s ease;
}

.cark-info-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.cark-game-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.cark-game-icon {
    position: relative;
    height: 3rem;
    width: 3rem;
    flex-shrink: 0;
}

.cark-game-icon img {
    position: absolute;
    height: 100%;
    width: 100%;
    inset: 0;
    z-index: 10;
    object-fit: contain;
    filter: grayscale(100%);
}

.cark-game-icon-glow {
    position: absolute;
    height: 1rem;
    width: 1rem;
    border-radius: 0.5rem;
    filter: blur(12px);
}

.cark-game-icon-glow.top {
    top: 0;
    background-color: rgb(33, 33, 33);
}

.cark-game-icon-glow.bottom-left {
    bottom: 0;
    left: 0;
    background-color: rgba(0, 255, 134, 0.6);
}

.cark-game-icon-glow.bottom-right {
    bottom: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 1);
}

.cark-game-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cark-game-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.cark-game-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.cark-daily-limit-box {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cark-daily-limit-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0.75rem 0;
}

.cark-daily-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.cark-daily-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #00ff86;
    line-height: 1;
}

.cark-daily-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cark-daily-stat-divider {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
}

.cark-daily-remaining {
    margin: 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.cark-daily-remaining strong {
    color: #fff;
}

.cark-input-wrapper {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cark-field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.cark-input-field {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.25rem;
    min-height: 3rem;
    border-radius: 0.5rem;
    background-color: rgb(17, 17, 17);
    padding-left: 0.75rem;
    padding-right: 7.5rem;
    transition: outline 0.2s ease;
}

.cark-input-field:focus-within {
    outline: 2px solid rgba(var(--primary-rgb, 227, 146, 20), 0.6);
    outline-offset: 2px;
}

.cark-input-icon {
    position: relative;
    height: 2rem;
    width: 2rem;
    flex-shrink: 0;
}

.cark-input-icon img {
    position: absolute;
    height: 100%;
    width: 100%;
    inset: 0;
    object-fit: contain;
    transform: scale(0.75);
}

.cark-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border-radius: 0.5rem;
    background-color: transparent;
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    outline: none;
}

.cark-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.cark-input-buttons {
    position: absolute;
    top: 0;
    right: 0.25rem;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cark-input-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100% - 0.5rem);
    user-select: none;
    border-radius: 0.5rem;
    background-color: rgb(33, 33, 33);
    padding: 0 0.85rem;
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.3s ease;
}

.cark-input-button:hover:not(:disabled) {
    background-color: rgb(43, 43, 43);
}

.cark-input-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cark-play-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
}

.cark-play-button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.9375rem;
}

.cark-play-button.is-disabled,
.cark-play-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cark-play-button.is-disabled:not(:disabled) {
    cursor: pointer;
}

.cark-game-area-wrapper {
    position: relative;
    order: 1;
    grid-column: span 3;
    width: 100%;
    min-width: 256px;
    min-height: 24rem;
    user-select: none;
    overflow: visible;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.cark-volume-control {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 10;
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cark-volume-control:hover {
    color: rgb(239, 68, 68);
}

.cark-game-area-content {
    position: relative;
    border-radius: 0.5rem;
    min-height: 24rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
    width: 100%;
    flex: 1;
}

.cark-game-area-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: blur(4px) grayscale(100%);
    border-radius: 0.5rem;
    pointer-events: none;
}

.cark-game-area-overlay-bg {
    position: absolute;
    inset: 0;
    background-color: rgba(33, 33, 33, 0.5);
    border-radius: 0.5rem;
    pointer-events: none;
}

.cark-game-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    min-height: 22rem;
}

.cark-wheel-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 500px);
    aspect-ratio: 1;
    min-height: 250px;
    max-height: min(500px, 75vw);
    margin: 1.5rem auto 0;
    flex-shrink: 0;
}

.cark-wheel-pointer {
    position: relative;
    z-index: 20;
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: -0.35rem;
    flex-shrink: 0;
    fill: #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.cark-wheel-body {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.cark-wheel-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 15;
    width: 3.5rem;
    height: 3.5rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 4px solid #fff;
    background: linear-gradient(135deg, var(--overlay-dark-90-card, rgba(17, 17, 17, 0.9)), var(--nirvana-card-background-color, rgba(33, 33, 33, 0.9)));
    box-shadow: 0 0 2px 4px #fff, 0 0 20px 10px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.cark-wheel-svg-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    box-sizing: border-box;
}

.cark-wheel-svg {
    width: 100%;
    height: 100%;
    display: block;
    transform-origin: center center;
    transform: rotate(0deg);
    will-change: transform;
}

.cark-wheel-svg.is-spinning {
    transition: transform 5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cark-rim-light {
    animation: cark-light-up 1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .cark-rim-light {
        animation: none;
        opacity: 0.7;
    }

    .cark-wheel-svg.is-spinning {
        transition-duration: 0.01ms;
    }
}

@keyframes cark-light-up {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.cark-prize-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.cark-prize-chip {
    display: flex;
    min-width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgb(17, 17, 17);
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.5;
}

.cark-history-section {
    grid-column: 1 / -1;
}

.cark-history-box {
    border-radius: 0.5rem;
    padding: 1rem;
    padding-top: 1rem;
}

.cark-history-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 0 0.75rem;
}

.cark-history-tab {
    border: none;
    border-radius: 0.5rem;
    background: rgba(33, 33, 33, 0.4);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cark-history-tab:hover {
    color: #fff;
}

.cark-history-tab.is-active {
    background: rgb(33, 33, 33);
    color: #fff;
}

.cark-history-table {
    overflow: hidden;
    border-radius: 0.5rem;
}

.cark-history-head,
.cark-history-row {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.cark-history-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    background: rgb(33, 33, 33);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.cark-history-head span,
.cark-history-row > span,
.cark-history-col-user {
    padding: 0.75rem;
}

.cark-history-col-user {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 0.25rem;
}

.cark-history-col-spacer {
    display: none;
    padding: 0.75rem;
}

.cark-history-col-reward {
    width: 38%;
    text-align: right;
    color: #00ff86;
    font-weight: 700;
}

.cark-history-body {
    max-height: 20rem;
    overflow-y: auto;
}

.cark-history-row {
    color: #fff;
    transition: background-color 0.3s ease;
}

.cark-history-row.is-alt {
    background: rgba(33, 33, 33, 0.7);
}

.cark-history-badge--vip {
    color: #facc15;
    flex-shrink: 0;
}

.cark-history-badge--win {
    color: #4ade80;
    flex-shrink: 0;
}

.cark-history-badge--loss {
    color: #f87171;
    flex-shrink: 0;
}

.cark-history-col-reward.is-loss {
    color: #f87171;
    font-weight: 600;
}

.cark-history-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cark-history-col-win {
    color: #4ade80;
    font-weight: 600;
}

@media (min-width: 480px) {
    .cark-wheel-area {
        min-height: 320px;
        max-height: min(400px, 80vw);
    }
}

@media (min-width: 640px) {
    .cark-prize-chip {
        min-width: 5rem;
        font-size: 0.875rem;
        padding: 0.65rem 0.5rem;
    }
}

@media (min-width: 768px) {
    .cark-header-nav {
        display: flex;
    }

    .cark-header-title {
        display: block;
    }

}

@media (min-width: 1024px) {
    .cark-main-grid {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 1rem;
    }

    .cark-control-panel {
        order: 1;
        flex: 0 0 20rem;
        width: 20rem;
        max-width: 20rem;
        justify-content: flex-start;
    }

    .cark-control-box {
        width: 100%;
        max-width: 20rem;
    }

    .cark-game-area-wrapper {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
        min-height: 32rem;
        overflow: hidden;
    }

    .cark-game-area-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 32rem;
        height: 100%;
        overflow: hidden;
    }

    .cark-game-content {
        flex: 1;
        justify-content: center;
        min-height: 0;
        padding: 2rem 1rem 1.5rem;
    }

    .cark-wheel-area {
        width: 400px;
        height: 420px;
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        margin: 0 auto;
    }

    .cark-wheel-pointer {
        width: 3rem;
        height: 3rem;
        margin-bottom: -0.5rem;
    }

    .cark-wheel-hub {
        width: 4rem;
        height: 4rem;
    }

    .cark-prize-row {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .cark-prize-chip {
        min-width: 3.5rem;
        padding: 0.5rem 0.35rem;
        font-size: 0.6875rem;
    }
}
