/* Simulator Section */
.simulator-section {
    padding: 6rem 0;
    overflow: hidden;
    background: #ffffff;
}

.simulator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Left Side: Steps */
.simulator-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sim-step {
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 24px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.sim-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 6px;
    background: var(--primary-blue);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sim-step.active {
    background: #ffffff;
    border-color: #f1f5f9;
    transform: translateX(20px);
    box-shadow: 0 20px 50px rgba(0, 71, 153, 0.12);
}

.sim-step.active::before {
    transform: scaleY(1);
}

.sim-step:not(.active):hover {
    background: #f1f5f9;
    transform: translateX(8px);
}

.sim-step:not(.active):hover .step-number {
    border-color: #cbd5e1;
    color: var(--primary-blue);
    transform: scale(1.05);
}

.sim-step .step-number {
    width: 64px;
    height: 64px;
    background: #ffffff;
    color: #cbd5e1;
    border: 4px solid #f1f5f9;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.sim-step.active .step-number {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 20px rgba(0, 95, 204, 0.3);
}

.sim-step h3 {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    color: var(--lottoland-navy);
    font-weight: 800;
}

.sim-step p {
    color: #475569;
    line-height: 1.8;
    margin: 0;
    font-size: 1.1rem;
}

/* Right Side: 3D Ticket */
.simulator-visual {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
}

.ticket-3d {
    width: 300px;
    height: 420px;
    background: #fff;
    border-radius: 10px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ticket-header {
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.ticket-logo {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.ticket-dot {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ticket-dot.marked {
    background: #CA7F26;
    box-shadow: 0 0 10px rgba(202, 127, 38, 0.5);
    transform: scale(1.1);
}

.ticket-stars {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    /* Move stars to the left */
    padding-left: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.ticket-star {
    width: 30px;
    height: 30px;
    background: #fef3c7;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: all 0.3s ease;
}

.ticket-star.marked {
    background: #fbbf24;
    transform: scale(1.2) rotate(360deg);
}

/* Animations based on state */
.simulator-visual.state-1 .ticket-3d {
    animation: float 4s ease-in-out infinite, glow 2s ease-in-out infinite;
    transform: rotateY(-15deg) rotateX(10deg);
}

.simulator-visual.state-2 .ticket-3d {
    transform: rotateY(0deg) rotateX(5deg) scale(1.05);
}

.simulator-visual.state-3 .ticket-3d {
    transform: translateY(-200px) rotateY(180deg) scale(0);
    opacity: 0;
}

@keyframes float {

    0%,
    100% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(0);
    }

    50% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(-20px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 95, 204, 0.3);
    }
}

/* Confirmed Badge */
.ticket-confirm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--lottoland-green);
    color: white;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 800;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(105, 165, 7, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.simulator-visual.state-3 .ticket-confirm {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .simulator-wrapper {
        grid-template-columns: 1fr;
    }

    .simulator-visual {
        height: 400px;
        order: -1;
    }
}