body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #121212;
    color: #e0e0e0;
    font-size: 3vw;
    background-image: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%231a1a1a"/><circle cx="20" cy="20" r="3" fill="%232a2a2a" opacity="0.3"/><circle cx="80" cy="20" r="2" fill="%232a2a2a" opacity="0.3"/><circle cx="20" cy="80" r="2.5" fill="%232a2a2a" opacity="0.3"/><circle cx="80" cy="80" r="3.5" fill="%232a2a2a" opacity="0.3"/><circle cx="50" cy="50" r="4" fill="%232a2a2a" opacity="0.2"/></svg>');
    background-size: 100px 100px;
}

.hidden {
    display: none;
}

#hash-form {
    max-width: 500px;
    margin: 50px auto;
    background: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

#login-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

#logo {
    font-size: 200%;
    font-weight: bold;
    color: #1581da
;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

#hash-form h1 {
    text-align: center;
    font-size: 150%;
    color: #1581da
;
    margin: 0;
    font-weight: 600;
}

#hash-form p {
    text-align: center;
    font-size: 80%;
    color: #666;
    margin: 10px 0 0 0;
}

#hash-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#hash-form label {
    font-weight: bold;
    font-size: 100%;
}

#hash-form input {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 100%;
    background-color: #2a2a2a;
    color: #e0e0e0;
}

#hash-form button {
    padding: 12px 20px;
    background-color: #1581da;
    color: #121212;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 100%;
    font-weight: 600;
    transition: background-color 0.2s;
}

#hash-form button:hover {
    background-color: #81d4fa;
}

#header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

#header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#font-controls-main {
    display: flex;
    gap: 5px;
}

#project-header {
    text-align: center;
    margin-bottom: 10px;
}

#project-header h2 {
    font-size: 130%;
    margin: 0;
    color: #1581da;
    display: inline-block;
    vertical-align: middle;
}

#reload-indicator-container {
    display: block;
    width: 100px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    margin-left: 15px;
    vertical-align: middle;
    overflow: hidden;
}

#reload-indicator {
    height: 100%;
    width: 100%;
    background-color: #4dd0e1;
    transition: width 0.1s linear, background-color 0.3s;
}

#user-info {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

#user-gravatar {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

#user-gravatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#user-gravatar:hover {
    transform: scale(1.05);
}

#user-gravatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#username-display {
    font-size: 90%;
    margin-right: 5px;
}

#header-controls {
    position: relative;
}

#logout-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 100px;
    margin-top: 10px;
}



#logout-button {
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 90%;
    text-align: left;
    color: #e0e0e0;
    border-radius: 4px;
	 white-space: nowrap;
}

#logout-button:hover {
    background-color: #2a2a2a;
    color: #1581da
;
}

#stats {
    text-align: center;
    margin-bottom: 20px;
    font-size: 120%;
    color: #1581da
;
    font-weight: 500;
}

#controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#search-container {
    text-align: center;
    margin-bottom: 20px;
}

#font-controls {
    text-align: center;
    margin-bottom: 10px;
}

#font-controls button, #font-controls-main button {
    padding: 5px 10px;
    margin: 0 5px;
    font-size: 80%;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 3px;
    cursor: pointer;
    color: #e0e0e0;
}

#login-font-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

#login-font-controls button {
    padding: 8px 12px;
    background-color: #1581da
;
    color: #121212;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 90%;
    font-weight: 600;
}

#login-font-controls button:hover {
    background-color: #81d4fa;
}

#font-controls button:hover, #font-controls-main button:hover {
    background-color: #e0e0e0;
}

#attendance-filter {
    text-align: center;
    margin-bottom: 20px;
    font-size: 80%;
}

#attendance-filter label {
    margin: 0 10px;
    padding: 5px 10px;
    background-color: #2a2a2a;
    border-radius: 15px;
    cursor: pointer;
    color: #e0e0e0;
    border: 1px solid #444;
}

#attendance-filter input {
    margin-right: 5px;
}

#attendance-filter label:hover {
    background-color: #e0e0e0;
}

#attendance-filter input:checked + label {
    background-color: #1581da
;
    color: #121212;
    font-weight: 600;
}

#search-wrapper {
    position: relative;
    width: 25ex;
    max-width: 80%;
    margin: 0 auto;
}

#search {
    width: 100%;
    padding: 12px 40px 12px 12px; /* Extra padding on right for the button */
    font-size: 100%;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #2a2a2a;
    color: #e0e0e0;
	 box-sizing: border-box;
}

#clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#clear-search:hover {
    background: #555;
}

#search-results-count {
    margin-top: 10px;
    font-size: 80%;
    color: #666;
}

#cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25ex, 1fr));
    gap: 20px;
}

.card {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    border: 1px solid #333;
}

.card-content.nextnature {
	background-image: url(https://img.nextnature.net/img/100x/nnlight.png);
	background-position: top right;
	background-repeat: no-repeat;
}

.card:hover {
    transform: translateY(-2px);
    background-color: #2a2a2a;
}

.card.attending {
    background-color: #0f4d00;
    border-left: 4px solid #15da46
;
}

.card h3 {
    margin-top: 0;
    color: #333;
    font-size: 110%;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-field {
    display: flex;
    flex-direction: column;
}

.card-field-label {
    font-weight: bold;
    font-size: 60%;
    color: #666;
}

.card-field-value {
    font-size: 100%;
}

.highlight {
    background-color: #b3690d;
    padding: 0 2px;
}

/* Prevent zooming on touch devices */
html {
    touch-action: manipulation;
}

body {
    -webkit-touch-callout: none; /* Prevent callout on long press */
    -webkit-text-size-adjust: none; /* Prevent font scaling */
}

/* Prevent double-tap zooming */
img, embed, object, video {
    max-width: 100%;
    touch-action: manipulation;
}