html, body {
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
    font-size: 16px;
    padding-bottom: 10px;
    width: 100%;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 0.4;
    z-index: -1;
}

td {
    vertical-align: top;
}

.container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    width: calc(100% - 20px);
    max-width: 600px;
    margin: 10px auto;
}

.container100 {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px auto;
}

.full-width-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    width: calc(100% - 30px);
    margin: 15px auto;
    overflow-x: auto;
    max-width: none;
}

.edit-users-table {
    overflow-x: auto;
    width: 100%;
}

.edit-users-table table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.edit-users-table th,
.edit-users-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
    vertical-align: top;
    display: table-cell !important;
}

.edit-users-table th {
    background-color: #f2f2f2;
    color: #333;
    cursor: pointer;
}

.ScoringEntry{
    max-width:100px;
    margin-bottom: 0;
}

.ScoringEntryNotes{
    max-width: 400px;
    max-height: 200px;
    width: calc(100% - 20px);
    height: 100px;
}

.noticediv {
    background-color: #f9ffab;
    padding: 2px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    width: calc(100% - 20px);
    max-width: 600px;
    margin: 2px auto;
    text-align:center;
    font-weight:700;
}

.icon{
    height: 40px;
}

.large-checkbox {
    min-height: 48px;
    width: 48px;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    outline: none;
}

.large-checkbox::after {
    content: 'X';
    font-size: 1.2em;
    color: #dc3545;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.large-checkbox:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.large-checkbox:checked::after {
    content: '✓';
    font-size: 1.2em;
    color: white;
    transform: translate(-50%, -50%);
}

.icon:hover {
    transform: scale(1.1);
}

.full-width-header-image {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    order: -1;
}

.container-fw {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 1);
    width: calc(100% - 30px);
    margin: 15px auto;
}

h2 {
    text-align: center;
    color: #333;
    border: 1px solid #aaa;
    border-radius: 4px;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 1.8em;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('title-bg.png');
    background-repeat: repeat;
    opacity: 0.5;
    z-index: -1;
}

span {
    display: block;
    margin-top: 0px;
    margin-bottom: 0px;
}

.title {
    text-align: center;
    color: #333;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 1.2em;
    font-weight: 700;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.smalltitle {
    text-align: center;
    color: #333;
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 0.8em;
    font-weight: 700;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.small {
    text-align: center;
    color: #333;
    font-size: 0.5em;
    font-weight: 500;
}

.smallbold {
    text-align: center;
    color: #333;
    font-size: 0.5em;
    font-weight: 700;
}

.containert {
    text-align: center;
    color: #333;
    border: 1px solid #aaa;
    border-radius: 4px;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 1.8em;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.containert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('title-bg.png');
    background-repeat: repeat;
    opacity: 0.5;
    z-index: -1;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
    font-size: 0.9em;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    min-height: 48px;
}

.password-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.password-input-group input {
    border: none;
    flex-grow: 1;
    margin: 0;
    padding: 10px;
    min-height: 48px;
}

.toggle-password {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 10px 15px;
    white-space: nowrap;
    font-size: 0.9em;
    min-height: 48px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    min-height: 48px;
}

button:hover {
    background-color: #0056b3;
}

.message {
    background-color: #e7f3fe;
    color: #007bff;
    border: 1px solid #cce5ff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9em;
}

.errors {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px 0;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 0.9em;
}

.errors li {
    padding: 8px 15px;
}

.errors li:not(:last-child) {
    border-bottom: 1px solid #f5c6cb;
}

p a {
    color: #007bff;
    text-decoration: none;
}

p a:hover {
    text-decoration: underline;
}

.g-recaptcha {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.county-table {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.county-table h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5em;
}

.county-table table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    margin-top: 10px;
}

.county-table th,
.county-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
}

.county-table th {
    background-color: #f2f2f2;
    color: #333;
}

.version-info {
    width: calc(100% - 20px);
    max-width: 600px;
    text-align: right;
    margin: 10px auto;
    color: #777;
    font-size: 0.8em;
    flex-shrink: 0;
    padding-bottom: 10px;
}

.version-info i {
    font-style: italic;
}

.current-photo-preview {
    margin-top: 10px;
    text-align: center;
}

.current-photo-preview img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    box-sizing: border-box;
}

.msg0, .msg1, .msg2, .msg3 {
    margin: 10px auto;
    max-width: calc(100% - 20px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.msg0 { border: 3px solid #333333; border-radius: 10px; overflow: hidden; }
.msgH0 { font-size: 1.1em; font-family: Helvetica, sans-serif; color: #ffffff; font-weight: 700; text-align: center; background-color: #333333; padding: 10px; }
.msgB0 { font-size: 0.9em; font-family: Helvetica, sans-serif; color: #000000; background: #ffffff; padding: 10px; }

.msg1 { border: 1px solid #ff0000; border-radius: 5px; }
.msgH1 { font-size: 1.1em; font-family: Helvetica, sans-serif; color: #ffff00; background-color: #ff0000; font-weight: 900; text-align: center; padding: 10px; }
.msgB1 { font-size: 1em; font-family: Helvetica, sans-serif; color: #ff0000; background-color: #ffff00; font-weight: 700; padding: 10px; }

.msg2 { border-style: solid; border-width: 1px; border-color: #333333; border-radius: 10px; }
.msgH2 { font-family: courier, monospace; font-size: 0.8em; color: #ffffff; background-color: #ff0000; font-weight: 700; text-align: center; padding: 10px; }
.msgB2 { font-family: courier, monospace; font-size: 0.8em; color: #000000; background-color: #ffffff; padding: 10px; }

.msg3 { border-style: solid; border-width: 3px; border-color: #990000; border-radius: 10px; }
.msgH3 { font-family: arial, sans-serif; font-size: 1.1em; color: #ffffff; background-color: #990000; font-weight: 700; text-align: left; padding: 10px; }
.msgB3 { font-family: courier, monospace; font-size: 0.9em; color: #000000; background-color: #ffffff; padding: 10px; }

.msgH4 { font-size: 1.5em; font-family: courier, monospace; color: red; font-weight: 800; text-align: center; background-color: #ffff00; background: linear-gradient(to bottom, #bbbb00, #ffff00); padding: 10px; }
.msgB4 { font-size: 1em; font-family: courier, monospace; color: black; background-color: #aaaa00; padding: 10px; }


.profile-photo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    border: none;
    object-fit: contain;
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.profile-photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-photo-modal img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 5px;
    transform: scale(0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.inviteqr-image {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.inviteqr-image:hover {
    transform: scale(1.1);
}

.inviteqr-expanded-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    cursor: pointer;
}

.inviteqr-expanded-image {
    max-width: 70%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.inviteqr-invite-text {
    color: white;
    text-align: center;
    font-size: 1.5rem;
    margin-top: 1rem;
    cursor: pointer;
}

.inviteqr-copy-message {
    position: absolute;
    bottom: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inviteqr-copy-message.show {
    opacity: 1;
}

.inviteqr-expanded-overlay.active {
    display: flex;
}

.inviteqr-expanded-overlay.active .inviteqr-expanded-image {
    transform: scale(1);
    opacity: 1;
}

.leave-club-button {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    min-height: auto;
}

.leave-club-button:hover {
    background-color: #c82333;
}

.custom-select-container {
    position: relative;
    width: 350px;
    font-family: Arial, sans-serif;
}

.selected-option {
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.selected-option::after {
    content: '▼';
    font-size: 12px;
    margin-left: auto;
}

.custom-options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    border-top: none;
    background-color: #fff;
    z-index: 10;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.custom-options.open {
    display: block;
}

.custom-option {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.custom-option:hover {
    background-color: #f1f1f1;
}

.option-image {
    height: 90px;
    width: 90px;
    object-fit: cover;
    border-radius: 20%;
    margin-right: 10px;
}

.option-image-small {
    height: 60px;
    width: 60px;
    object-fit: cover;
    border-radius: 20%;
    margin-right: 10px;
}

.CourseImage{
    width: calc(65% - 20px);
    object-fit: cover;
    object-position: center;
}

.CourseText{
    font-size: 0.8em;
}

@media (min-width: 768px) {
    body {
        padding: 0;
    }
    .container {
        padding: 30px;
        max-width: 700px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .container-fw {
        background-color: #fff;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 1);
        width: 1000px;
        margin: 15px auto;
    }
    
    .full-width-container {
        padding: 30px;
        width: calc(100% - 60px);
        margin: 30px auto;
    }
    
    .county-table th,
    .county-table td {
        display: table-cell !important;
    }

    h2 {
        font-size: 2em;
    }
    label {
        font-size: 1em;
    }
    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="file"],
    select {
        font-size: 1em;
        padding: 10px;
        min-height: auto;
    }
    .password-input-group input {
        min-height: auto;
    }
    .password-input-group .toggle-password {
        font-size: 1em;
        min-height: auto;
    }
    button {
        font-size: 1em;
        padding: 12px 20px;
        min-height: auto;
    }
    .small-text {
        font-size: 0.9em;
    }
    .message, .errors {
        font-size: 1em;
        padding: 10px;
    }
    .errors li {
        padding: 8px 15px;
    }
    .county-table table {
        min-width: auto;
    }
    .county-table th,
    .county-table td {
        font-size: 1em;
    }
    .county-table thead,
    .county-table tbody,
    .county-table th,
    .county-table td,
    .county-table tr {
        display: table-row;
    }
    .county-table th {
        display: table-cell;
    }
    .county-table td {
        border: 1px solid #ddd;
        padding-left: 8px;
        text-align: left;
    }
    .county-table td::before {
        content: none;
    }
    .version-info {
        max-width: 700px;
        margin-top: 20px;
        padding-bottom: 0;
    }

    .msg0, .msg1, .msg2, .msg3 {
        max-width: 700px;
    }
    .msgH0, .msgH1, .msgH2, .msgH3, .msgH4 {
        font-size: initial;
    }
    .msgB0, .msgB1, .msgB2, .msgB3, .msgB4 {
        font-size: initial;
    }
    
    .CourseImage{
        width: 100px;
        object-fit: cover;
        object-position: center;
    }

    .CourseText{
        font-size: 1em;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 800px;
    }
    .version-info {
        max-width: 800px;
    }
    .msg0, .msg1, .msg2, .msg3 {
        max-width: 800px;
    }
}