/* Skeuomorphic Card Style - Inspired by Teenage Engineering EP-133 K.O. II */
/* File terpisah untuk style card dengan efek 3D realistis */

/* Card Container */
.skeuomorphic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 20rem;
    height: auto;
    /* Tinggi menyesuaikan konten */
    min-height: 16rem;
    /* Tinggi minimum */
    background-color: rgb(94, 194, 105);
    /* Hijau terang sesuai permintaan */
    border-radius: 15px;
    border: none;
    outline: none;
    box-shadow:
        rgba(0, 0, 0, 0.377) 12px 12px 10px,
        /* Bayangan luar untuk kedalaman */
        rgba(255, 255, 255, 0.4) 2px 2px 3px 0px inset,
        /* Highlight putih di atas */
        rgba(0, 0, 0, 0.2) -4px -4px 10px 0px inset;
    /* Bayangan dalam di bawah */
    cursor: pointer;
    font-family: 'BubbleBaz', 'Montserrat', sans-serif;
    transition: all 0.1s ease-in-out;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    /* Membuat kartu tidak bisa diklik */
}

/* Noise Effect */
.skeuomorphic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 3px 3px, 2px 2px, 4px 4px;
    background-position: 0 0, 1px 1px, 2px 2px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

/* Card Content */
.skeuomorphic-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Card Image - Ratio 1:1 */
.skeuomorphic-card-image {
    width: 100%;
    /* Memenuhi lebar card */
    height: 0;
    /* Reset height */
    padding-bottom: 100%;
    /* Membuat ratio 1:1 (100% dari width) */
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow:
        rgba(0, 0, 0, 0.2) 0px 2px 4px,
        rgba(255, 255, 255, 0.1) 0px 1px 0px inset;
    overflow: hidden;
}

/* Image inside the container */
.skeuomorphic-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mengisi area dengan memotong jika perlu */
}

/* Card Button */
.skeuomorphic-card-button {
    width: 100%;
    /* Memenuhi lebar card */
    height: 3.5rem;
    /* Tinggi yang lebih proporsional */
    border-radius: 6px;
    /* Rounded lebih sedikit */
    border: none;
    outline: none;
    transition: all 0.1s ease-in-out;
    font-family: 'BubbleBaz', 'Montserrat', sans-serif;
    color: #ffffff;
    /* Mengembalikan warna teks ke putih */
    font-size: 2.2em;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #F84D63;
    /* Warna merah-pink dari gambar */
    box-shadow:
        /* Efek lubang */
        rgba(0, 0, 0, 0.4) 3px 3px 5px,
        rgba(0, 0, 0, 0.2) 8px 8px 12px,
        /* Highlight dalam */
        rgba(255, 255, 255, 0.3) -2px -2px 4px 0px inset,
        /* Bayangan dalam */
        rgba(0, 0, 0, 0.2) 2px 2px 4px 0px inset;
}

.button-container {
    position: relative;
    width: 100%;
    pointer-events: auto;
    /* Mengaktifkan kembali interaksi untuk kontainer tombol */
}

/* Keyframes untuk animasi "terbang dan memantul" */
@keyframes fly-in-bounce {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.5);
    }

    60% {
        opacity: 1;
        transform: translateY(-15px) scale(1.2);
        /* 1. Terbang melebihi tempatnya */
    }

    80% {
        transform: translateY(5px) scale(0.95);
        /* 2. Memantul kembali */
    }

    100% {
        transform: translateY(0) scale(1);
        /* 3. Posisi akhir */
    }
}

/* Keyframes untuk animasi "terbang keluar" yang simetris */
@keyframes fly-out-bounce {
    0% {
        transform: translateY(0) scale(1);
    }

    20% {
        transform: translateY(5px) scale(0.95);
    }

    40% {
        transform: translateY(-15px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(40px) scale(0.5);
    }
}

/* Tooltip Container & Icons Style */
.tooltip-container {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    pointer-events: none;
    z-index: 9999;
}

.tooltip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f80254;
    color: white;
    font-size: 18px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow:
        1px 2px 3px rgba(0, 0, 0, 0.62),
        inset 0px -2px 3px rgba(0, 0, 0, 0.48),
        inset 1px 1px 4px #ffffff,
        rgba(50, 50, 93, 0.25) 0px 6px 13px -3px,
        rgba(0, 0, 0, 0.3) 0px 4px 8px -4px;

    /* State awal diatur oleh ketiadaan kelas .visible */
    opacity: 0;
    transform: translateY(40px) scale(0.5);
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.2s, opacity 0.2s;
    /* Transisi fallback */
    overflow: hidden;
    /* Pastikan gambar tidak keluar dari lingkaran */
}

.tooltip-icon img {
    width: 65%;
    /* Lebih kecil dari kontainer untuk efek padding */
    height: 65%;
    object-fit: contain;
    /* Jaga rasio aspek & pastikan seluruh gambar terlihat */
}

/* Memicu animasi dengan kelas .visible (dikontrol oleh JS) */
.tooltip-icon.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: fly-in-bounce 0.5s ease-out;
    pointer-events: auto;
}

/* Memicu animasi keluar dengan kelas .hiding */
.tooltip-icon.hiding {
    animation: fly-out-bounce 0.5s ease-out forwards;
}

/* Staggered delay untuk efek satu per satu */
.tooltip-icon.visible:nth-child(1) {
    animation-delay: 0.0s;
}

.tooltip-icon.visible:nth-child(2) {
    animation-delay: 0.07s;
}

.tooltip-icon.visible:nth-child(3) {
    animation-delay: 0.14s;
}

.tooltip-icon.visible:nth-child(4) {
    animation-delay: 0.21s;
}

/* Delay terbalik untuk animasi keluar */
.tooltip-icon.hiding:nth-child(1) {
    animation-delay: 0.21s;
}

.tooltip-icon.hiding:nth-child(2) {
    animation-delay: 0.14s;
}

.tooltip-icon.hiding:nth-child(3) {
    animation-delay: 0.07s;
}

.tooltip-icon.hiding:nth-child(4) {
    animation-delay: 0.0s;
}


.tooltip-icon:hover {
    transform: scale(1.05) !important;
    /* Perbesar saat hover, !important untuk override animasi */
}

.tooltip-icon:active {
    transform: scale(0.95);
    box-shadow:
        inset 1px 2px 3px rgba(0, 0, 0, 0.62),
        inset 0px -1px 2px rgba(0, 0, 0, 0.48);
}

/* Hover Effects - Disabled */
/* .skeuomorphic-card:hover {
    transform: translateY(-2px);
    box-shadow:
        rgba(0, 0, 0, 0.4) 14px 14px 12px,
        rgba(255, 255, 255, 0.4) 2px 2px 3px 0px inset,
        rgba(0, 0, 0, 0.2) -4px -4px 10px 0px inset;
} */

.skeuomorphic-card-button:hover {
    transform: translate(1px, 1px);
    box-shadow:
        rgba(0, 0, 0, 0.4) 3px 3px 5px,
        rgba(0, 0, 0, 0.2) 8px 8px 12px,
        rgba(255, 255, 255, 0.3) -2px -2px 4px 0px inset,
        rgba(0, 0, 0, 0.2) 2px 2px 4px 0px inset;
}

/* Active/Pressed Effects */
.skeuomorphic-card:active {
    transform: translateY(1px);
    box-shadow:
        rgba(0, 0, 0, 0.377) 0px 0px 0px,
        inset 1px 1px 6px #000000,
        rgba(0, 0, 0, 0.2) -4px -4px 10px 0px inset;
}

.skeuomorphic-card-button:active {
    transform: translateY(1px);
    box-shadow:
        rgba(0, 0, 0, 0.5) 12px 12px 10px,
        /* Bayangan luar saat ditekan */
        inset 1px 1px 6px #000000,
        /* Bayangan dalam lebih dalam saat ditekan */
        #00ff41 -2px -2px 6px 0px inset;
    /* Bayangan dalam hijau */
}

/* Card Text */
.skeuomorphic-card-text {
    color: #2a2a2a;
    font-size: 0.9rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.3);
}

/* Card Title */
.skeuomorphic-card-title {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .skeuomorphic-card {
        max-width: 18rem;
        min-height: auto;
        /* Tinggi menyesuaikan dengan gambar 1:1 */
    }

    .skeuomorphic-card-button {
        font-size: 2rem;
        /* Font size 2x untuk mobile (1rem * 2 = 2rem) */
        height: 3rem;
    }

    /* Image ratio 1:1 sudah otomatis responsive */
}

@media (max-width: 480px) {
    .skeuomorphic-card {
        max-width: 16rem;
        min-height: auto;
        /* Tinggi menyesuaikan dengan gambar 1:1 */
    }

    .skeuomorphic-card-button {
        font-size: 1.8rem;
        /* Font size 2x untuk mobile kecil (0.9rem * 2 = 1.8rem) */
        height: 2.5rem;
    }

    /* Image ratio 1:1 sudah otomatis responsive */
}

/* Alternative Color Schemes */
.skeuomorphic-card.green {
    background-color: #22c55e;
    box-shadow:
        rgba(0, 0, 0, 0.377) 12px 12px 10px,
        #4ade80 2px 2px 3px 0px inset,
        #16a34a -4px -4px 10px 0px inset;
}

.skeuomorphic-card.blue {
    background-color: #3b82f6;
    box-shadow:
        rgba(0, 0, 0, 0.377) 12px 12px 10px,
        #60a5fa 2px 2px 3px 0px inset,
        #1d4ed8 -4px -4px 10px 0px inset;
}

.skeuomorphic-card.purple {
    background-color: #8b5cf6;
    box-shadow:
        rgba(0, 0, 0, 0.377) 12px 12px 10px,
        #a78bfa 2px 2px 3px 0px inset,
        #7c3aed -4px -4px 10px 0px inset;
}

/* Hover effect untuk tooltip saat diklik */
.tooltip:active {
    transform: translateX(-50%) scale(0.95);
}

/* CA Box Style */
.skeuomorphic-ca-box {
    position: relative;
    width: 100%;
    max-width: 20rem;
    /* Sama dengan lebar kartu */
    padding: 0.75rem 1.5rem;
    background-color: rgb(94 194 105);
    border-radius: 12px;
    box-shadow:
        rgba(0, 0, 0, 0.377) 12px 12px 10px,
        rgba(255, 255, 255, 0.4) 2px 2px 3px 0px inset,
        rgba(0, 0, 0, 0.2) -4px -4px 10px 0px inset;
    font-family: 'BubbleBaz', 'Montserrat', sans-serif;
    text-align: center;
}

.skeuomorphic-ca-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 3px 3px, 2px 2px, 4px 4px;
    background-position: 0 0, 1px 1px, 2px 2px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    border-radius: 12px;
    /* Cocokkan dengan border-radius box */
}

.ca-text {
    color: black;
    /* Mengubah warna teks CA menjadi hitam */
    font-size: 1.25rem;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3);
    /* Menyesuaikan bayangan untuk teks gelap */
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
}

/* CA Box Tooltip */
.ca-box-container {
    position: relative;
    /* display: inline-block; <-- This was causing the width issue */
    width: 100%;
    max-width: 20rem;
    /* Match the card's max-width */
    margin-left: auto;
    margin-right: auto;
}

.ca-tooltip {
    position: absolute;
    bottom: 115%;
    /* Position slightly above the box */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    /* Start slightly smaller */
    background-color: #1a1a1a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    /* Use a more common font for the tooltip */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 20;
    pointer-events: none;
    /* Ensure the tooltip doesn't interfere with clicks */
}

.ca-box-container:hover .ca-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    /* Grow to normal size */
}

/* Hover Effects - Disabled */
/* .skeuomorphic-card:hover {
    transform: translateY(-2px);
    box-shadow:
        rgba(0, 0, 0, 0.4) 14px 14px 12px,
        rgba(255, 255, 255, 0.4) 2px 2px 3px 0px inset,
        rgba(0, 0, 0, 0.2) -4px -4px 10px 0px inset;
} */