:root {
    --superland-magenta: #ff1b8d;
    --superland-orange: #ff671b;
    --superland-yellow: #fee619;
    --superland-green: #8cd915;
    --superland-cyan: #1bdde7;
    --superland-purple: #3a0088;
    --superland-red: #e71b3b;
    --superland-coral: #ff6b6b;
    
    --primary-color: var(--superland-purple);
    --secondary-color: var(--superland-magenta);
    --background-color: #f5f5f5;
    --form-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --success-color: #4caf50;
    --error-color: var(--superland-red);
    --button-hover: #6619b3;
    --input-bg: #ffffff;
    --input-text: #333333;
    --remove-btn-bg: var(--superland-red);
    --remove-btn-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: var(--superland-magenta);
        --secondary-color: var(--superland-cyan);
        --background-color: #121212;
        --form-bg: #1e1e1e;
        --text-color: #ffffff;
        --border-color: #444444;
        --success-color: #4caf50;
        --error-color: var(--superland-red);
        --button-hover: var(--superland-purple);
        --input-bg: #2c2c2c;
        --input-text: #ffffff;
        --remove-btn-bg: var(--superland-red);
        --remove-btn-text: #ffffff;
    }
}

/* Dark mode toggle support */
body.dark-mode {
    --primary-color: var(--superland-magenta);
    --secondary-color: var(--superland-cyan);
    --background-color: #121212;
    --form-bg: #1e1e1e;
    --text-color: #ffffff;
    --border-color: #444444;
    --success-color: #4caf50;
    --error-color: var(--superland-red);
    --button-hover: var(--superland-purple);
    --input-bg: #2c2c2c;
    --input-text: #ffffff;
    --remove-btn-bg: var(--superland-red);
    --remove-btn-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}

/* Header Styles */
header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.theme-toggle {
    position: absolute;
    right: 10px;
    top: 0;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    color: var(--text-color);
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.logo {
    height: 80px;
    margin-right: 20px;
}

h1 {
    color: var(--primary-color);
    font-size: 28px;
}

h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

/* Form Styles */
form {
    background: var(--form-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

body.dark-mode form {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: var(--input-bg);
    color: var(--input-text);
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(58, 0, 136, 0.2);
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="tel"],
body.dark-mode input[type="date"] {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: #555;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input {
    margin-top: 5px;
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-group label {
    flex: 1;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    color: white;
}

table input {
    width: 100%;
}

/* Button Styles */
button {
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    transform: translateY(-2px);
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    margin-right: 10px;
}

.action-btn:hover {
    background-color: var(--button-hover);
}

.remove-btn {
    background-color: var(--remove-btn-bg);
    color: var(--remove-btn-text);
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 4px;
    font-weight: bold;
    border: none;
}

.remove-btn:hover:not(:disabled) {
    background-color: #c41930;
    transform: translateY(-1px);
}

.remove-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    opacity: 0.6;
}

.reset-btn {
    background-color: #ff9800;
    color: white;
    margin-bottom: 20px;
}

.submit-btn {
    background-color: var(--success-color);
    color: white;
    padding: 12px 24px;
    font-size: 18px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Signature Pad */
.signature-pad-container {
    margin-bottom: 20px;
}

#signature-pad {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 100%;
    height: 200px;
    background-color: #fff;
}

/* Info Text */
.info-text {
    background-color: rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    color: var(--text-color);
}

body.dark-mode .info-text {
    background-color: rgba(255,255,255,0.05);
}

.info-text p {
    margin-bottom: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: var(--form-bg);
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    text-align: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.reference-container {
    margin-top: 10px;
    padding: 25px;
    background-color: var(--form-bg);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.dark-mode .reference-container {
    background-color: var(--input-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.reference-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 25px 0;
    padding: 15px;
    background-color: rgba(0,0,0,0.03);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    display: inline-block;
    min-width: 200px;
}

body.dark-mode .reference-number {
    background-color: rgba(255,255,255,0.05);
}

.reference-note {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 25px;
}

.timer-container {
    margin: 20px 0;
    padding: 12px;
    background-color: rgba(0,0,0,0.03);
    border-radius: 6px;
    text-align: center;
}

body.dark-mode .timer-container {
    background-color: rgba(255,255,255,0.05);
}

.timer-container p {
    margin-bottom: 10px;
}

.validity-notice {
    color: var(--superland-red);
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
    padding: 10px;
    background-color: rgba(231, 27, 59, 0.1);
    border-radius: 5px;
}

body.dark-mode .validity-notice {
    background-color: rgba(231, 27, 59, 0.2);
}

/* Styles for the daily number display */
.daily-number {
    font-size: 42px;
    font-weight: bold;
    color: var(--superland-red);
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(0,0,0,0.03);
    border: 2px solid var(--superland-red);
    border-radius: 8px;
    display: inline-block;
    min-width: 200px;
}

body.dark-mode .daily-number {
    background-color: rgba(255,255,255,0.05);
}

/* Update reference number styles */
.reference-number {
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 5px;
    margin-bottom: 25px;
}

#countdown {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--primary-color);
}

#extend-timer {
    margin-top: 5px;
    padding: 6px 12px;
    font-size: 14px;
    background-color: var(--secondary-color);
}

#noted-btn {
    margin-top: 10px;
    min-width: 150px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
	
	.daily-number {
        font-size: 32px;
        padding: 10px;
        min-width: 150px;
    }
    
    .reference-number {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .validity-notice {
        font-size: 0.9em;
        padding: 8px;
        margin-bottom: 15px;
    }
    
    button {
        width: 100%;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 90%;
    }
}

/* Add styles for date input fields */
input[type="text"].error {
    border-color: var(--error-color) !important;
    background-color: rgba(255, 0, 0, 0.05);
}

/* Style for placeholder text */
input[type="text"]::placeholder {
    color: #aaa;
}

/* Make placeholder text slightly dimmer */
input[type="text"][value="tt.mm.jjjj"] {
    color: #999;
}

/* When input is focused, make text normal color */
input[type="text"]:focus {
    color: var(--input-text);
}

.mobile-geburts-datum {
    display: none;
}

/* Styles for the tagesnummer display */
.tagesnummer {
    font-size: 42px;
    font-weight: bold;
    color: #e71b3b; /* Superland red */
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(0,0,0,0.1); /* Slightly more visible background */
    border: 3px solid #e71b3b; /* Thicker border */
    border-radius: 8px;
    display: inline-block;
    min-width: 200px;
    min-height: 80px; /* Ensure height even when empty */
}

body.dark-mode .tagesnummer {
    background-color: rgba(255,255,255,0.1); /* More visible in dark mode */
    color: #ff5b73; /* Brighter red for dark mode */
}

/* Add this empty state style */
.tagesnummer:empty::before {
    content: "Wird geladen...";
    font-size: 24px;
    opacity: 0.7;
}

.reference-note {
    margin: 10px 0;
    font-size: 16px;
}

.reference-note strong {
    color: #e71b3b; /* Superland red */
}

/* Ensure the modal displays correctly */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #1e1e1e; /* Dark background for dark mode */
    color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    text-align: center;
}

body:not(.dark-mode) .modal-content {
    background-color: #ffffff;
    color: #333333;
}

.reference-container {
    margin-top: 10px;
}

/* Timer styles */
.timer-container {
    margin: 20px 0;
    padding: 12px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 6px;
}

#countdown {
    font-weight: bold;
    font-size: 1.2em;
    color: #ff1b8d; /* Superland magenta */
}

#extend-timer {
    margin-top: 5px;
    padding: 6px 12px;
    font-size: 14px;
    background-color: #1bdde7; /* Superland cyan */
}

#noted-btn {
    margin-top: 10px;
    min-width: 150px;
}


.trash-column {
    display: none;
}

.mobile-trash-icon {
    display: none;
}

/* Add yellow highlighting for specific terms */
.highlight-yellow {
    color: var(--superland-yellow);
    font-weight: bold;
}

/* Make sure the yellow text is visible in both light and dark mode */
body.dark-mode .highlight-yellow {
    text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
}

/* Footer Links Styles */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        font-size: 13px;
    }
}


/* Mobile specific styles */
@media (max-width: 768px) {
    /* Hide theme toggle on mobile */
    .theme-toggle {
        display: none;
    }
	.desktop-geburts-datum {
        display: none;
    }
	
	.mobile-geburts-datum {
        display: inline-block;
        line-height: 1.2;
    }
    
    /* General text size adjustments */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    .info-text {
        font-size: 13px;
    }
    
    label {
        font-size: 14px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"] {
        font-size: 14px;
        padding: 10px;
    }
    
    button {
        font-size: 14px;
    }
    
    .submit-btn {
        font-size: 16px;
    }
    
    /* On mobile, make the header display as a column */
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    header .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Mobile-specific table adjustments */
    /* Hide the Nr. column on mobile */
    #participants-table th:first-child, 
    #participants-table td:first-child {
        display: none;
    }
    
    /* Hide the Action column header on mobile */
    #participants-table th:nth-child(4), 
    #participants-table td:nth-child(4) {
        display: none;
    }
    
    #participants-table th:nth-child(2), 
    #participants-table td:nth-child(2) {
        width: 60%; /* Name column width */
    }
    
    #participants-table th:nth-child(3), 
    #participants-table td:nth-child(3) {
        width: 38%; /* Birth date column width */
		padding: 6px 2px; /* Reduziertes horizontales Padding für mehr Platz */
    }
    
    /* Trash icon column */
    .trash-column {
        display: table-cell;
        width: 4%;
		padding: 0; /* Kein Padding für maximalen Platz */
        text-align: center;
    }
    
    /* Only show Geburts-datum on mobile */
    .mobile-geburts-datum {
        display: none;
    }
    
    /* Show the mobile trash icon button */
    .mobile-trash-icon {
        display: inline-block;
        color: var(--remove-btn-bg);
        font-size: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }
	
}

