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

html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background: #f5f7fa;
    font-family: 'Arial', sans-serif;
}

/* Main section takes up full viewport height */
.main-section {
    min-height: 100vh;
    height: 100vh; /* Force full height */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

/* About section is positioned separately */
.about-section {
    min-height: 100vh;
    width: 100%;
    background-color: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.coin {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease-in;
}

.heads, .tails {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.heads {
    background-image: url('images/Head.png');
    transform: rotateY(0deg);
}

.tails {
    background-image: url('images/Tail.png');
    transform: rotateY(180deg);
}

.coin[data-outcome="Head"] {
    animation: flip-to-head 1.5s ease-in-out forwards;
}

.coin[data-outcome="Tail"] {
    animation: flip-to-tail 1.5s ease-in-out forwards;
}

@keyframes flip-to-head {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(720deg); /* 2 full rotations, lands on heads */
    }
}

@keyframes flip-to-tail {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(900deg); /* 2.5 rotations, lands on tails */
    }
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    margin-top: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

button:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-text {
    min-height: 50px;
    margin-top: 1.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Larger text styles */
.about-section p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.emoji-row {
    font-size: 2.5rem;
    letter-spacing: 0.5rem;
    margin: 1.5rem 0;
}

.large-text {
    font-size: 1.5rem;
    font-weight: 500;
}

/* For smaller screens - keep the same layout pattern */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .coin {
        width: 160px;
        height: 160px;
    }
    
    button {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
    }
    
    .result-text {
        font-size: 1.5rem;
    }
    
    .emoji-row {
        font-size: 2rem;
    }
}

/* For extra small screens */
@media (max-width: 380px) {
    h1 {
        font-size: 2rem;
    }
    
    .coin {
        width: 140px;
        height: 140px;
    }
}
