/* Simple Interactive Pills - Reliable for all devices */

.simple-pills-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 280px;
    margin: 0 0 3rem;
}

.simple-pill {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    color: #2D3748;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    animation: pillFloatIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Position each pill with scattered, overlapping layout */
.simple-pill:nth-child(1) {
    animation-delay: 0.1s;
    top: 8%;
    left: 5%;
    transform: rotate(-12deg);
    z-index: 3;
}
.simple-pill:nth-child(2) {
    animation-delay: 0.15s;
    top: 5%;
    left: 38%;
    transform: rotate(8deg);
    z-index: 2;
}
.simple-pill:nth-child(3) {
    animation-delay: 0.2s;
    top: 18%;
    right: 8%;
    transform: rotate(-6deg);
    z-index: 4;
}
.simple-pill:nth-child(4) {
    animation-delay: 0.25s;
    top: 38%;
    left: 12%;
    transform: rotate(15deg);
    z-index: 5;
}
.simple-pill:nth-child(5) {
    animation-delay: 0.3s;
    top: 42%;
    left: 42%;
    transform: rotate(-10deg);
    z-index: 6;
}
.simple-pill:nth-child(6) {
    animation-delay: 0.35s;
    top: 50%;
    right: 5%;
    transform: rotate(12deg);
    z-index: 1;
}
.simple-pill:nth-child(7) {
    animation-delay: 0.4s;
    bottom: 15%;
    left: 8%;
    transform: rotate(-8deg);
    z-index: 7;
}
.simple-pill:nth-child(8) {
    animation-delay: 0.45s;
    bottom: 8%;
    left: 45%;
    transform: rotate(6deg);
    z-index: 8;
}

.simple-pill-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.simple-pill-text {
    line-height: 1;
    white-space: nowrap;
}

/* Hover effects - maintain tilt but scale up */
.simple-pill:hover {
    transform: scale(1.15) rotate(var(--pill-rotate, 0deg)) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.simple-pill:active {
    transform: scale(1.05) rotate(var(--pill-rotate, 0deg)) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Set CSS variables for hover states */
.simple-pill:nth-child(1) { --pill-rotate: -12deg; }
.simple-pill:nth-child(2) { --pill-rotate: 8deg; }
.simple-pill:nth-child(3) { --pill-rotate: -6deg; }
.simple-pill:nth-child(4) { --pill-rotate: 15deg; }
.simple-pill:nth-child(5) { --pill-rotate: -10deg; }
.simple-pill:nth-child(6) { --pill-rotate: 12deg; }
.simple-pill:nth-child(7) { --pill-rotate: -8deg; }
.simple-pill:nth-child(8) { --pill-rotate: 6deg; }


/* Touch devices - gentle wobble on tap */
@media (hover: none) and (pointer: coarse) {
    .simple-pill:active {
        animation: pillWobble 0.4s ease;
    }
}

/* Animations */
@keyframes pillFloatIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pillFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes pillWobble {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-3deg) scale(1.1);
    }
    75% {
        transform: rotate(3deg) scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .simple-pills-container {
        height: 250px;
        max-width: 100%;
    }

    .simple-pill {
        padding: 0.7rem 1.3rem;
        font-size: 0.9rem;
    }

    .simple-pill-emoji {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .simple-pills-container {
        height: 240px;
    }

    .simple-pill {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .simple-pill-emoji {
        font-size: 1rem;
    }
}
