
/* Premium Games & Tools CSS - 3D and Animations */

/* --- 1. Coin Flipper --- */
.coin-stage {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: 50px auto;
}
.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.1);
    border: 10px solid #e2e8f0;
}
.coin-heads {
    background: #f1c40f; /* Gold */
    color: #fff;
    transform: rotateY(0deg);
}
.coin-tails {
    background: #bdc3c7; /* Silver */
    color: #555;
    transform: rotateY(180deg);
}

/* --- 2. Dice Roller (3D Cube) --- */
.dice-stage {
    perspective: 1000px;
    width: 150px;
    height: 150px;
    margin: 50px auto;
}
.dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.5s ease-out;
}
.dice-face {
    position: absolute;
    width: 150px;
    height: 150px;
    background: white;
    border: 2px solid #ccc;
    display: grid;
    grid-template: repeat(3, 1fr) / repeat(3, 1fr);
    padding: 10px;
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}
.dot {
    background: #333;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    transform: scale(0.6);
}

/* Face Transforms */
.df-1 { transform: rotateY(0deg) translateZ(75px); }
.df-2 { transform: rotateY(90deg) translateZ(75px); }
.df-3 { transform: rotateY(180deg) translateZ(75px); }
.df-4 { transform: rotateY(-90deg) translateZ(75px); }
.df-5 { transform: rotateX(90deg) translateZ(75px); }
.df-6 { transform: rotateX(-90deg) translateZ(75px); }

/* --- 3. Decision Wheel --- */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}
.wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #e74c3c;
    z-index: 10;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

/* --- 4. Love Calculator --- */
.love-heart {
    width: 100px;
    height: 100px;
    background: #ef4444;
    position: relative;
    transform: rotate(45deg);
    animation: heartBeat 1.2s infinite;
    margin: 20px auto;
    display:flex;
    align-items:center;
    justify-content:center;
}
.love-heart:before,
.love-heart:after {
    content: "";
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ef4444;
    position: absolute;
}
.love-heart:before { top: -50px; left: 0; }
.love-heart:after { top: 0; left: -50px; }
.love-score {
    position: absolute;
    transform: rotate(-45deg);
    z-index: 10;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}
@keyframes heartBeat {
    0% { transform: scale(1) rotate(45deg); }
    50% { transform: scale(1.1) rotate(45deg); }
    100% { transform: scale(1) rotate(45deg); }
}

/* --- 5. Truth or Dare Card --- */
.td-card-container {
    perspective: 1000px;
    width: 300px;
    height: 400px;
    margin: 20px auto;
    cursor: pointer;
}
.td-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.td-card.flipped { transform: rotateY(180deg); }
.td-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}
.td-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.td-back {
    background: white;
    transform: rotateY(180deg);
    border: 2px solid #e2e8f0;
}
