*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:'Segoe UI', sans-serif;
    background-image: url(coinbg.png);
    background-size: cover;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.coin-container{
    margin: 3rem 0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s ease-in-out;
    cursor: pointer;
}

.coin.flipping {
    animation: flip 2s ease-in-out;
}

@keyframes flip {
    0% {transform: rotateY(0deg) rotateX(0deg);}
    25% {transform: rotateY(450deg) rotateX(180deg);}
    50% {transform: rotateY(900deg) rotateX(360deg);}
    75% {transform: rotateY(1350deg) rotateX(540deg);}
    100% {transform: rotateY(1800deg) rotateX(720deg);}
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid #ffd700;
}

.heads {
    background: #c9aa71;
    color: #8b4513;
    transform: rotateY(0deg);
}

.tails {
    background: #b8860b;
    color: #4a4a4a;
    transform: rotateY(180deg);
}

.flip-button {
    background: #a1de3b;
    color: #0f0f23;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(162, 223, 58, 0.3);
    margin: 2rem 0;
}

.flip-button:hover {
    background: #86b730;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(162, 223, 58, 0.4);
}

.flip-button:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.clear-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.result {
    font-size: 1.5rem;
    margin: 1rem 0;
    min-height: 2rem;
    font-weight: bold;
}

.result-heads {
    color: #c9aa71;
    text-shadow: 0 0 10px rgba(201, 170, 113, 0.5);
}

.result-tails {
    color: #b8860b;
    text-shadow: 0 0 10px rgba(184, 134, 11, 0.5);
    margin-top: 0.5rem;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card h3 {
    color: #a1de3b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.history {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history h3 {
    color: #a1de3b;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-height: 100px;
    overflow-y: auto;
}

.history-item {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.history-item.heads {
    background-color: rgba(201, 170, 113, 0.2);
    color: #c9aa71;
    border: 1px solid #c9aa71;
}

.history-item.tails {
    background-color: rgba(183, 134, 11, 0.2);
    color: #b8860b;
    border: 1px solid #b8860b;
}

@media (max-width: 640px) {
    h1 {
        font-size: 1rem;
    }

    .coin {
        width: 120px;
        height: 120px;
    }
    .coin-face {
        font-size: 3rem;
    }
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}



