body{
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #74ebd5, #9face6);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}
  
.container{
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    animation: fadeIn 1s ease-in-out;
}
  
h1{
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}
  
.coin{
    width: 120px;
    height: 120px;
    margin: 20px auto;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1); /* bouncy easing */
}
  
.coin .side{
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: gold;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    backface-visibility: hidden;
    border: 4px solid #d4af37;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}
  
.coin .heads{
    transform: rotateY(0deg);
}
  
.coin .tails{
    transform: rotateY(180deg);
}
  
.buttons{
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}
  
.buttons button{
    background: #6c63ff;
    border: none;
    color: white;
    font-size: 1rem;
    padding: 12px;
    margin: 5px 0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, background 0.3s;
    width: 100%;
    max-width: 260px;
    position: relative;
    overflow: hidden;
}
  
.buttons button img{
    width: 30px;
    height: 30px;
}
  
.buttons button:hover{
    background: #5848c2;
    transform: scale(1.05);
}
  
.buttons button::after,
.reset-btn::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.4s ease, height 0.4s ease, opacity 0.6s ease;
}
  
.buttons button:active::after,
.reset-btn:active::after{
    width: 300%;
    height: 300%;
    opacity: 1;
    transition: 0s;
}
  
.result p{
    font-size: 1.2rem;
    margin: 15px 0;
    font-weight: bold;
}
  
.scoreboard{
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}
  
.scoreboard h2{
    margin: 0 0 0.5rem 0;
}
  
.reset-btn{
    background: #ff5f5f;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
    max-width: 260px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}
  
.reset-btn:hover{
    background: #d94d4d;
    transform: scale(1.05);
}
  
@keyframes fadeIn{
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
  
@media(max-width: 480px){
    h1{
        font-size: 1.5rem;
    }

    .coin{
        width: 80px;
        height: 80px;
    }

    .coin .side{
        font-size: 1rem;
        border: 3px solid #d4af37;
    }

    .buttons button{
        font-size: 0.9rem;
        padding: 10px;
    }

    .buttons button img{
        width: 24px;
        height: 24px;
    }

    .result p{
        font-size: 1rem;
    }

    .scoreboard p{
        font-size: 0.95rem;
    }
}
