@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Pacifico&display=swap');

.comp-page {
    background: #f3f4f6;
    min-height: 100vh;
}

.comp-hero {
    background: #9b43ad;
    color: #fff;
    padding: 2.1rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.comp-hero-deco-star {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 7.5rem;
    opacity: 0.12;
    line-height: 1;
    pointer-events: none;
}

.comp-hero .container {
    position: relative;
    z-index: 1;
}

.comp-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
}

.comp-hero-label {
    display: block;
    margin-top: 0.4rem;
    letter-spacing: 0.42em;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.comp-hero-aside {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    opacity: 0.95;
}

.comp-hero-tickets {
    position: relative;
    width: 52px;
    height: 40px;
    opacity: 0.35;
}

.comp-hero-tickets i {
    position: absolute;
    font-size: 1.85rem;
}

.comp-hero-tickets i:first-child {
    left: 0;
    top: 8px;
    transform: rotate(-18deg);
}

.comp-hero-tickets i:last-child {
    left: 14px;
    top: 0;
    transform: rotate(12deg);
}

.comp-hero-script {
    font-family: 'Pacifico', 'Caveat', cursive;
    font-size: 1.7rem;
    white-space: nowrap;
}

.comp-main {
    padding: 1.5rem 0 2.5rem;
}

.comp-back {
    margin-bottom: 1rem;
}

.comp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #4b5563;
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.comp-back-link:hover {
    color: #9b43ad;
    border-color: #9b43ad;
}

.comp-card {
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
    padding: 1.45rem 1.5rem 1.5rem;
    margin-bottom: 1.25rem;
}

.comp-card-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.comp-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #9b43ad;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.comp-card-copy {
    color: #5b6170;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.15rem;
}

.comp-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.comp-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(360px, 50vw);
    object-fit: contain;
    border-radius: 12px;
}

.comp-status-badge {
    background: #22c55e;
    color: #fff;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    margin-left: auto;
}

.comp-instant-badge {
    margin-left: auto;
    background: #f3e8f8;
    color: #9b43ad;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.comp-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 0.25rem;
}

.comp-meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.comp-meta-item i {
    color: #9b43ad;
    margin-bottom: 0.2rem;
}

.comp-meta-item .label {
    color: #6b7280;
    font-size: 0.82rem;
}

.comp-meta-item .value {
    font-weight: 700;
    color: #111827;
}

.comp-win-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.7rem;
}

.comp-win-ticket {
    position: relative;
    text-align: center;
    overflow: hidden;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.02));
}

.comp-win-ticket .body {
    padding: 0.85rem 0.3rem 0.7rem;
    clip-path: polygon(
        0 8px, 8% 0, 16% 8px, 24% 0, 32% 8px, 40% 0, 48% 8px, 56% 0, 64% 8px, 72% 0, 80% 8px, 88% 0, 96% 8px, 100% 0,
        100% 100%, 0 100%
    );
}

.comp-win-ticket .amount {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
}

.comp-win-ticket .kind {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0.2rem 0 0.45rem;
}

.comp-win-ticket .icon {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.comp-win-ticket .claimed {
    display: block;
    font-size: 0.7rem;
    color: #4b5563;
    font-weight: 600;
}

.comp-win-ticket .footer {
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.5rem 0.2rem 0.55rem;
    clip-path: polygon(
        0 0, 100% 0,
        100% calc(100% - 8px), 96% 100%, 88% calc(100% - 8px), 80% 100%, 72% calc(100% - 8px), 64% 100%,
        56% calc(100% - 8px), 48% 100%, 40% calc(100% - 8px), 32% 100%, 24% calc(100% - 8px), 16% 100%, 8% calc(100% - 8px), 0 100%
    );
}

.comp-win-ticket.p1 .body { background: #efe0f7; color: #7a2f8f; }
.comp-win-ticket.p1 .footer { background: #6d2a80; }
.comp-win-ticket.p2 .body { background: #d7e8fb; color: #245aa0; }
.comp-win-ticket.p2 .footer { background: #2a5c96; }
.comp-win-ticket.p5 .body { background: #f7efc2; color: #8a6d14; }
.comp-win-ticket.p5 .footer { background: #b58912; }
.comp-win-ticket.p10 .body { background: #f6d4d7; color: #a12d36; }
.comp-win-ticket.p10 .footer { background: #b32630; }
.comp-win-ticket.p20 .body { background: #d4efd8; color: #2b7a38; }
.comp-win-ticket.p20 .footer { background: #2e7d32; }

.comp-ticket-card {
    padding: 1.5rem 1.45rem 1.35rem;
}

.comp-ticket-subtitle {
    color: #6b7280;
    margin-bottom: 1.15rem;
    font-size: 0.92rem;
}

.comp-page .comp-bundle.ticket-box,
.comp-bundle {
    border: 2px solid #d9dde3;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
    position: relative;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    transform: none;
}

.comp-page .comp-bundle.ticket-box:hover,
.comp-bundle:hover {
    border-color: #9b43ad;
    transform: none;
    box-shadow: none;
}

.comp-bundle.selected {
    border-color: #9b43ad;
    box-shadow: 0 0 0 1px #9b43ad;
}

.comp-bundle-check {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #9b43ad;
    color: #fff;
    display: none;
    font-size: 0.7rem;
    align-items: center;
    justify-content: center;
}

.comp-bundle.selected .comp-bundle-check {
    display: inline-flex;
}

.comp-bundle-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 1.35rem 0.4rem 0.75rem;
}

.comp-bundle-price {
    padding: 0.55rem;
    font-weight: 700;
    color: #9b43ad;
    background: #f4e6f8;
}

.comp-bundle.selected .comp-bundle-price {
    background: #9b43ad;
    color: #fff;
}

.comp-or {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #9ca3af;
    margin: 1.25rem 0 1.1rem;
}

.comp-or::before,
.comp-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.comp-or span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #c5cad3;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
}

.comp-custom-label {
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.comp-slider-price-row {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.comp-slider-col {
    flex: 1;
    min-width: 0;
}

.comp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(to right, #9b43ad var(--slider-progress, 1%), #e4d4ea var(--slider-progress, 1%));
    outline: none;
    margin: 0.35rem 0 0.55rem;
}

.comp-slider::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: 999px;
    background: transparent;
}

.comp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -6px;
    border-radius: 50%;
    background: #9b43ad;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #9b43ad;
    cursor: pointer;
}

.comp-slider::-moz-range-track {
    height: 12px;
    border-radius: 999px;
    background: #e4d4ea;
}

.comp-slider::-moz-range-progress {
    height: 12px;
    border-radius: 999px;
    background: #9b43ad;
}

.comp-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #9b43ad;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #9b43ad;
    cursor: pointer;
}

.comp-qty-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.comp-qty-input {
    width: 86px;
    text-align: center;
    font-weight: 700;
}

.comp-total-box {
    flex-shrink: 0;
    background: #eef1f4;
    border-radius: 12px;
    padding: 0.7rem 1.15rem;
    min-width: 132px;
    text-align: right;
}

.comp-total-box .label {
    font-weight: 700;
    font-size: 0.85rem;
}

.comp-total-box .amount {
    color: #9b43ad;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.comp-total-box .each {
    color: #6b7280;
    font-size: 0.78rem;
}

.comp-add-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 0.95rem 1rem;
    font-weight: 700;
    font-size: 1.05rem;
    background: #9b43ad;
    color: #fff;
    margin-top: 1.15rem;
}

.comp-add-btn:hover:enabled {
    background: #86389a;
    color: #fff;
}

.comp-add-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.comp-auth-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #2f3542;
    color: #fff;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-top: 0.9rem;
}

.comp-auth-banner .lock {
    color: #fff;
    font-size: 1.15rem;
}

.comp-auth-banner .copy {
    flex: 1;
    font-size: 0.86rem;
    line-height: 1.35;
}

.comp-auth-banner .copy strong {
    display: block;
    font-size: 0.92rem;
}

.comp-auth-actions {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
}

.comp-auth-actions .btn-login {
    background: #9b43ad;
    border-color: #9b43ad;
    color: #fff;
}

.comp-auth-actions .btn-register {
    background: #fff;
    border-color: #fff;
    color: #9b43ad;
}

.comp-trust {
    background: #fff;
    border-top: 1px solid #e7eaee;
    padding: 1.35rem 0 1.6rem;
}

.comp-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.comp-trust-item i {
    color: #9b43ad;
    margin-top: 0.15rem;
}

.comp-trust-item strong {
    display: block;
}

.comp-trust-item span {
    color: #6b7280;
    font-size: 0.88rem;
}

.comp-trust-col {
    position: relative;
}

.comp-trust-col + .comp-trust-col::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15rem;
    bottom: 0.15rem;
    width: 1px;
    background: #e5e7eb;
}

.comp-trust-script {
    font-family: 'Pacifico', 'Caveat', cursive;
    color: #9b43ad;
    font-size: 1.45rem;
    text-align: right;
    transform: rotate(-6deg);
    transform-origin: right center;
}

@media (max-width: 991px) {
    .comp-win-grid,
    .comp-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .comp-hero-deco-star,
    .comp-hero-aside {
        display: none;
    }

    .comp-trust-script,
    .comp-total-box {
        text-align: left;
        margin-left: 0;
        transform: none;
    }

    .comp-slider-price-row {
        flex-direction: column;
        align-items: stretch;
    }

    .comp-trust-col + .comp-trust-col::before {
        display: none;
    }

    .comp-auth-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .comp-instant-badge {
        white-space: normal;
    }
}
