/* Global Styles for Android WebView Compatibility */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 10px;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 1.5rem;
}

label {
    display: block;
    margin: 20px 0 10px;
    font-weight: bold;
    text-align: center;
    font-size: 1rem;
}

select {
    display: block;
    margin: 0 auto 20px;
    padding: 12px 15px;
    font-size: 16px;
    width: 90%;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
}

select:focus {
    outline: none;
    border-color: #007bff;
}

table {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 0.95rem;
}

th, td {
    padding: 12px 8px;
    border: 1px solid #ddd;
    text-align: center;
    word-wrap: break-word;
}

th {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

a {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

a:active {
    color: #0056b3;
}

td:first-child {
    text-align: left;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    h1 {
        font-size: 1.35rem;
    }
    
    table, th, td {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 10px 6px;
    }
    
    select {
        width: 95%;
        font-size: 16px;
        padding: 14px;
    }
    
    label {
        font-size: 0.95rem;
    }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    select {
        width: 80%;
    }
}

/* Horizontal scroll for table on small screens */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -10px;
    padding: 0 10px;
}

/* Touch-friendly buttons and links */
button, 
a,
select,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
    touch-action: manipulation;
}

/* Prevent text selection on UI elements */
.nav-menu,
button {
    -webkit-user-select: none;
    user-select: none;
}
