* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Disables text selection highlighting */
    user-select: none; 
    -webkit-user-select: none; 
    
    /* The bulletproof tap highlight removal */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 
    
    /* Disables the default iOS long-press popup menu */
    -webkit-touch-callout: none; 
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f8f9fa;
    color: #202124;
    overflow: hidden; 
}

/* Main clickable background */
#click-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    
    /* Removes the dotted accessibility outline on tap */
    outline: none; 
    
    /* Disables double-tap-to-zoom, which causes tap delays and flashes */
    touch-action: manipulation; 
}

#card-content {
    text-align: center;
    padding: 32px;
}

#main-text {
    font-size: 36px;
    line-height: 44px;
    font-weight: bold;
    margin: 0;
}

#secondary-text {
    font-size: 24px;
    line-height: 32px;
    font-weight: normal;
    color: rgba(32, 33, 36, 0.7);
    margin: 16px 0 0 0;
}

#stats-text {
    position: absolute;
    bottom: 40px;
    text-align: center;
    font-size: 16px;
    line-height: 24px;
    color: rgba(32, 33, 36, 0.5);
}

/* Top Buttons */
.top-btn {
    position: absolute;
    top: 24px;
    height: 50px;
    width: 120px;
    font-size: 16px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
}
.top-btn:active { background: #f1f3f4; }
.top-btn.left { left: 16px; }
.top-btn.right { right: 16px; }

/* Modals (Pop-up windows) */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal.hidden { display: none; }

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.modal-content h3 { margin-top: 0; }

#log-list {
    overflow-y: auto;
    padding-left: 20px;
    flex-grow: 1;
}
#log-list li {
    margin-bottom: 8px;
    font-size: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}
.btn-primary { background: #0b57d0; color: white; }
.btn-secondary { background: transparent; color: #0b57d0; font-weight: bold; }