* {
    box-sizing: border-box;
}

/* 1. Set base font size and handle layout */
html {
    font-size: 18px;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    margin: 0;
    padding: 20px 10px; /* Added padding so content doesn't hit screen edges */
    color: black;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    background-color: beige;
    /* Use a standard font size; 300% is too large for mobile viewports */
    font-size: 1.2rem; 
    overflow-x: hidden;
}

/* 2. Responsive Headings */
h1, h2, h3, h4, h5, h6 {
    width: 100%;
    font-size: clamp(1.8rem, 8vw, 3rem); /* Scalable text */
    overflow-wrap: break-word;
    margin-bottom: 20px;
}

/* 3. Input and Button Styling (Replaces transform: scale) */
#playerInput, #playerConfirm {
    font-size: 1rem;
    padding: 12px 15px; /* Makes them physically larger and tappable */
    margin: 10px 5px;
    border-radius: 8px; /* Slightly smoother look */
    border: 1px solid #ccc;
    vertical-align: middle;
    outline: none;
}

#playerInput {
    width: 60%; /* Responsive width */
    max-width: 250px;
}

#playerConfirm {
    cursor: pointer;
    background-color: white;
    transition: all 0.1s ease;
    border-style: outset;
    min-width: 80px;
}

/* 4. Active states */
#playerConfirm:active {
    background-color: rgb(224, 224, 224);
    transform: scale(0.95); /* Scale is okay for quick click animations */
}

/* 5. Section styling (Replaces scale(2)) */
#ce {
    margin-top: 30px;
    font-size: 1.5rem; /* Use font-size instead of scale to prevent zoom issues */
}

#status {
    transition: 0.2s ease;
    margin-top: 20px;
}

/* 6. Mobile adjustments */
@media (max-width: 480px) {
    #playerInput {
        width: 100%; /* Stack input and button on very small screens */
        display: block;
        margin: 10px auto;
    }
    
    #playerConfirm {
        width: 100%;
        max-width: 250px;
        display: block;
        margin: 10px auto;
    }
}
