/* Base body styles - without gradient for larger screens */
body { 
    font-family: Arial, sans-serif; 
    line-height: 1.6;
    background: url('../img/background.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
    padding: 0;
    margin: 0;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

/* Content container for larger screens */
.content-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* On larger screens, create a floating container */
@media (min-width: 851px) {
    body {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    .content-container {
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        padding-top: 15px;
        padding-right: 30px;
        padding-bottom: 30px;
        padding-left: 30px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    /* Footer is outside .content-container, but should align with it */
    .app-footer {
        width: 100%;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .report-container,
    .verification-box,
    .review-container {
        background: rgba(249, 249, 249, 0.95);
        padding: 20px;
        border-radius: 4px;
        white-space: normal;
        word-wrap: break-word;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        line-height: 1.4;
    }
}

/* Keep full width on mobile screens and add gradient overlay */
@media (max-width: 850px) {
    body {
        padding: 0;
        background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), 
                  url('../img/background.png');
        background-size: cover;
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .content-container {
        width: 100%;
        padding: 15px;
        margin: 0;
    }

    /* Ensure all containers match parent container */
    .report-container,
    .verification-box,
    .review-container {
        width: 100%;
        padding: 15px;
        margin: 15px 0;
        box-sizing: border-box;
    }
}

.notification {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    animation: fadeIn 0.5s;
}

.notification-success {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.email-verification-notice-text {
    margin: 0;
    font-size: 14px;
}
.email-verification-notice-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
}
.email-verification-notice-body {
    margin: 0;
    font-size: 13px;
}

body.modal-open { overflow: hidden; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#todate-container {
    display: none;
}

.add-date-button {
    background: none;
    border: 1px dashed #4CAF50;
    color: #4CAF50;
    padding: 8px 16px;
    margin-top: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-date-button:hover {
    background: rgba(76, 175, 80, 0.1);
}

/* Header and Progress Bar */
.page-header {
    text-align: center;
    margin-bottom: 25px;
    margin-top: 0;
    max-width: 800px;
    padding: 0;
    box-sizing: border-box;
}

h1 {
    margin-top: 5px;
    margin-bottom: 15px;
    color: #333;
}

h1 a {
    color: #333;
    text-decoration: none;
}

h1 a:hover {
    color: #4CAF50;
}

.progress-bar {
    width: 65%;
    max-width: 800px;
    height: auto;
    max-height: 90px;
    margin: 0 auto 20px auto;
    display: block;
    object-fit: contain; /* Maintains aspect ratio */
    object-position: center;
}

img.progress-bar {
    max-width: 100%;
    height: auto;
}

@media (max-width: 850px) {
    body {
        padding: 15px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .page-header {
        width: 100%;
        padding: 0;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .progress-bar {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    input[type="text"], 
    input[type="email"],
    input[type="number"],
    input[type="date"],
    select, 
    textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px; /* Larger touch targets */
    }

    button {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        margin: 10px 0;
    }

    .report-container,
    .verification-box,
    .review-container {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .notification {
        padding: 12px;
        font-size: 14px;
    }

    .form-group::after {
        display: none; /* Hide tooltips on mobile */
    }

    .report-container {
        font-size: 14px;
    }

    /* Adjust spacing for better mobile layout */
    .form-group + .form-group {
        margin-top: 15px;
    }

    /* Make checkboxes and radio buttons easier to tap */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    /* Improve select dropdown usability */
    select {
        padding-right: 40px;
        background-position: right 12px center;
    }
}

/* Landscape orientation optimization */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
    }

    .page-header {
        margin-bottom: 15px;
    }

    .progress-bar {
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .report-container,
    .verification-box,
    .review-container {
        padding: 10px;
        margin: 10px 0;
    }
}

/* High-DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-size: cover;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .form-group::after {
        display: none; /* Hide tooltips on touch devices */
    }

    button:active {
        background: #3d8b40; /* Darker shade for touch feedback */
    }
}

.error { 
    color: red; 
    padding: 10px;
    margin: 10px 0;
    border: 1px solid red;
    background: #fff0f0;
}

.success {
    color: green;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid green;
    background: #f0fff0;
}
.hidden { display: none !important; }
.inline { display: inline; }
.inline-form { display: inline-block; }
.is-visible { display: block !important; }
.flex-row { display: flex; }
.flex-end { justify-content: flex-end; }
.align-end { align-items: flex-end; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.full-width { width: 100%; }
.flex-1 { flex: 1; min-width: 200px; }
.position-relative { position: relative; }
.text-normal { font-weight: normal; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-0 { margin-bottom: 0; }
.m-0 { margin: 0; }
.text-center { text-align: center; }
.text-muted { color: #666; }
.text-danger { color: #d32f2f; }
.fs-14 { font-size: 14px; }
.bold { font-weight: bold; }
.text-primary { color: #2196F3; }
.fs-13 { font-size: 1.3em; }
.fw-600 { font-weight: 600; }

/* Help content */
.help-container { max-width: 820px; margin: 0 auto; padding: 20px; }
.panel-green { margin-bottom: 1.5rem; padding: 1rem; background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); border-radius: 14px; }
.video-frame { border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,0.08); background: #000; }
.video-frame video { display: block; width: 100%; height: auto; background: #000; }
.help-step-title { color: #1f2937; margin: 0 0 0.75rem 0; font-size: 1.1rem; display: flex; align-items: center; }
.help-step-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background-color: #10b981; color: white; font-size: 0.9rem; font-weight: bold; margin-right: 8px; flex-shrink: 0; }
.help-text { color: #4b5563; line-height: 1.7; margin-bottom: 1rem; }
.help-list { color: #4b5563; line-height: 1.6; margin: 0 0 1rem 1.25rem; }
.alert-red { margin-top: 1.5rem; padding: 1rem; background: rgba(239, 68, 68, 0.1); border-left: 4px solid #ef4444; border-radius: 10px; color: #991b1b; }
.alert-red h3 { color: #991b1b; margin-bottom: 0.5rem; font-size: 1.05rem; }
.alert-red ul { color: #991b1b; line-height: 1.6; margin: 0 0 0 1.25rem; }
.alert-green { margin-top: 1rem; padding: 1rem; background: rgba(16, 185, 129, 0.1); border-left: 4px solid #10b981; border-radius: 10px; color: #065f46; }
.alert-green h3 { color: #065f46; margin-bottom: 0.5rem; font-size: 1.05rem; }
.alert-green ul { color: #065f46; line-height: 1.6; margin: 0 0 0 1.25rem; }

.form-inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

.help-text { display: block; margin-top: 5px; color: #666; }
.details-inline { margin-left: 8px; }
.details-inline summary { cursor: pointer; }
.pre-small { margin: 4px 0; font-size: 12px; }

.info-box { margin-top: 20px; padding: 15px; border-radius: 4px; }
.info-box.blue { background: #e7f3ff; border-left: 4px solid #2196F3; }

.btn-gray { background: #6c757d; color: white; text-decoration: none; padding: 10px 20px; border-radius: 4px; display: inline-block; }
.btn-small { padding: 5px 10px; font-size: 12px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 8px; border-bottom: 1px solid #ddd; }

.modal.modal-wide .modal-content { max-width: 800px; }

.class-select { margin-bottom: 20px; }
.class-select label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; }
.class-select select { padding: 8px 12px; border: 2px solid #2196F3; border-radius: 4px; font-size: 16px; min-width: 150px; background: white; cursor: pointer; }

.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 320px)); gap: 18px; }
.day-box { border: 1px solid #d8dee6; border-radius: 10px; padding: 12px; background: #fbfcff; box-shadow: 0 2px 6px rgba(10, 31, 68, 0.06); max-width: 320px; }
.day-box h4 { margin-top: 0; margin-bottom: 10px; color: #1f2933; font-size: 1em; text-transform: uppercase; letter-spacing: 0.5px; }
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-unstyled li { padding: 6px 0; border-bottom: 1px dashed #e0e6ef; }
.stundenplan-subjects {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef5ff;
    color: #1f4d8f;
    font-size: 11px;
    border: 1px solid #d6e6ff;
}
.stundenplan-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 8px 10px;
    align-items: center;
}
.stundenplan-item__left {
    font-weight: 600;
    color: #1f2a37;
}
.stundenplan-item__form {
    display: grid;
    grid-template-columns: minmax(110px, 140px) auto;
    gap: 8px;
    align-items: center;
}
.subject-dropdown {
    position: relative;
    min-width: 110px;
    max-width: 140px;
    width: 100%;
}
.subject-dropdown__toggle {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    border: 1px solid #cdd6e1;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
}
.subject-dropdown--has-selection .subject-dropdown__toggle {
    background-color: #e8f5e9;
    border-color: #c8e6c9;
    color: #1f2a37;
}
.subject-dropdown__toggle::after {
    content: '';
    float: right;
    width: 10px;
    height: 10px;
    margin-top: 2px;
    background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23667788' stroke-width='2'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat center;
}
.subject-dropdown__menu {
    position: absolute;
    left: 0;
    width: 100%;
    min-width: 140px;
    max-width: 200px;
    top: calc(100% + 4px);
    z-index: 1000;
    background: #fff;
    border: 1px solid #cdd6e1;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.subject-dropdown.is-open .subject-dropdown__menu {
    display: block;
}
.subject-dropdown__menu.subject-dropdown__menu--fixed {
    position: fixed;
    z-index: 10000;
}
.subject-dropdown__menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    font-size: 12px;
    cursor: pointer;
}
.subject-dropdown__menu input[type="checkbox"] {
    accent-color: #2f70ff;
}
.stundenplan-item__delete {
    margin-left: auto;
}
.stundenplan-add-form {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    background: #f5f8ff;
    border: 1px solid #d7e3ff;
}
.stundenplan-add-form .stundenplan-teacher-select {
    flex: 1 1 100px;
    min-width: 0;
}
.stundenplan-add-form .subject-dropdown {
    flex: 1 1 100px;
    min-width: 0;
}
.stundenplan-add-form .btn {
    flex: 0 0 auto;
}
.stundenplan-teacher-select {
    min-width: 90px;
    max-width: 120px;
    padding: 6px 8px;
    border: 1px solid #cdd6e1;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
}
.stundenplan-teacher-select:valid {
    background-color: #e8f5e9;
    border-color: #c8e6c9;
    color: #1f2a37;
}
.btn-icon {
    width: 30px;
    height: 30px;
    border: 1px solid #d6dde8;
    border-radius: 8px;
    background-color: #eef2ff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.btn-icon:hover {
    background-color: #e2e8f0;
}
.btn-icon-save {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f70ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpath d='M17 21v-8H7v8'/%3E%3Cpath d='M7 3v5h8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}
.btn-icon-delete {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

@media (max-width: 900px) {
    .class-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 320px)); }
    .stundenplan-item {
        grid-template-columns: 48px 1fr;
    }
    .stundenplan-item__delete {
        margin-left: 0;
    }
    .stundenplan-item__form {
        grid-template-columns: minmax(110px, 1fr) auto;
    }
}

@media (max-width: 600px) {
    .day-box { padding: 10px; }
    .stundenplan-item {
        grid-template-columns: 1fr;
    }
    .stundenplan-item__left {
        font-size: 13px;
    }
    .stundenplan-add-form .stundenplan-teacher-select,
    .stundenplan-add-form .subject-dropdown {
        flex: 1 1 100%;
    }
    .subject-dropdown {
        min-width: 100%;
    }
}
.stundenplan-class-section { display: none; margin-bottom: 30px; }
.stundenplan-class-section.is-visible { display: block; }
/* Admin page */
body.admin-page .admin-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
body.admin-page .stats-section { background: #f8f9fa; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px; border-left: 4px solid #4CAF50; }
body.admin-page .stats-grid { display: flex; flex-wrap: wrap; gap: 24px; }
body.admin-page .stat-item { display: flex; flex-direction: column; gap: 2px; }
body.admin-page .stat-item .stat-label { font-size: 11px; text-transform: uppercase; color: #888; letter-spacing: 0.5px; }
body.admin-page .stat-item .stat-value { font-size: 20px; font-weight: bold; color: #333; }
body.admin-page .stat-item .stat-detail { font-size: 12px; color: #666; }
body.admin-page .stats-info { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e0e0e0; font-size: 13px; color: #666; }
body.admin-page .stats-info-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
body.admin-page .stats-info-row:last-child { margin-bottom: 0; }
body.admin-page .admin-section { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
body.admin-page .admin-section h2 { margin-top: 0; border-bottom: 2px solid #4CAF50; padding-bottom: 10px; }
body.admin-page .btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin-right: 10px; }
body.admin-page .btn-primary { background: #4CAF50; color: white; }
body.admin-page .btn-primary:hover { background: #45a049; }
body.admin-page .btn-danger { background: #f44336; color: white; }
body.admin-page .btn-danger:hover { background: #da190b; }
body.admin-page .btn-secondary { background: #2196F3; color: white; }
body.admin-page .btn-secondary:hover { background: #0b7dda; }

/* Admin modals */
body.admin-page .modal-content { background-color: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); position: relative; width: 90%; max-width: 1200px; max-height: 90vh; overflow-y: auto; }
body.admin-page .modal-header { padding: 20px; border-bottom: 2px solid #2196F3; display: flex; justify-content: space-between; align-items: center; background: #f5f5f5; border-radius: 8px 8px 0 0; position: sticky; top: 0; z-index: 10; }
body.admin-page .modal-header h2 { margin: 0; color: #2196F3; }
body.admin-page .modal-close { font-size: 28px; font-weight: bold; color: #999; cursor: pointer; line-height: 1; }
body.admin-page .modal-close:hover { color: #333; }
body.admin-page .modal-body { padding: 20px; }
body.admin-page .stundenplan-class-section:last-child { border-bottom: none; }
@media (max-width: 768px) {
    body.admin-page .modal-content { width: 95%; max-height: 95vh; }
    body.admin-page .stundenplan-day-box { margin-bottom: 15px; }
}

body.admin-page .table-responsive { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.admin-page .verification-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
body.admin-page .verification-table th,
body.admin-page .verification-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #ddd; vertical-align: top; word-break: break-word; overflow-wrap: anywhere; }
body.admin-page .verification-table th { background: #f8f9fa; font-weight: bold; }
body.admin-page .verification-table tr:hover { background: #f8f9fa; }
body.admin-page .status-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; white-space: nowrap; }
body.admin-page .status-verified { background: #4CAF50; color: white; }
body.admin-page .status-unverified { background: #ff9800; color: white; }
body.admin-page .status-expired { background: #f44336; color: white; }
body.admin-page .message { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
body.admin-page .message-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
body.admin-page .message-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
body.admin-page .test-result { margin-top: 15px; padding: 15px; background: #e7f3ff; border-left: 4px solid #2196F3; border-radius: 4px; }
body.admin-page .test-result strong { display: block; margin-bottom: 5px; }
body.admin-page .test-result code { font-family: monospace; font-size: 14px; word-break: break-all; }

#qrScannerContainer { position: relative; width: 100%; max-width: 400px; margin: 0 auto; }
#qrVideo { width: 100%; border: 2px solid #2196F3; border-radius: 4px; display: none; }
#qrCanvas { display: none; }
#qrScannerStatus { text-align: center; padding: 20px; background: #f0f0f0; border-radius: 4px; }

.qr-footer { display: flex; gap: 10px; justify-content: flex-end; }

.teacher-selection { display: none; }
#teacher-selection-hint { margin-top: 4px; margin-bottom: 8px; font-size: 14px; color: #666; }
.teacher-search-wrap { position: relative; margin-bottom: 8px; }
#teacher-search { width: 100%; padding: 6px 30px 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
#clear-search { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: transparent !important; border: none !important; box-shadow: none !important; color: #666; cursor: pointer; padding: 5px; display: none; }
#selected-teachers { font-size: 12px; color: #666; margin-bottom: 8px; }
#teacher-list { max-height: 200px; overflow-y: auto; border: 1px solid #ccc; padding: 0; margin-top: 8px; }
.teacher-item { padding: 6px 8px; cursor: pointer; border-bottom: 1px solid #eee; transition: all 0.2s; font-size: 14px; line-height: 1.2; }
.teacher-item.selected { background-color: #333; color: #fff; }
#teacher-list .teacher-item input[type="checkbox"] { display: none; }

.form-row { display: flex; gap: 20px; align-items: flex-end; }
.form-row > .flex-1 { flex: 1; }

.exam-upload { display: none; }
.exam-upload.is-visible { display: block; }
#examModal { display: none; }
#examModal h3 { margin: 0 0 15px 0; }
.exam-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 15px; }
#cancelModal { padding: 6px 12px; background-color: #f44336; color: white; border: none; border-radius: 4px; cursor: pointer; }
#confirmModal { padding: 6px 12px; border: none; border-radius: 4px; }
#confirmModal:disabled { background-color: #ccc; color: white; cursor: not-allowed; }
#confirmModal:enabled { background-color: #4CAF50; color: white; cursor: pointer; }
#dropZone { border: 2px dashed #ccc; border-radius: 4px; padding: 20px; text-align: center; margin: 20px 0; background-color: #f9f9f9; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 140px; justify-content: center; }
#dropZone.drop-active { border-color: #4CAF50; background-color: #f0f0f0; }
#dropZone p { margin: 0; color: #666; }
#dropZone p + p { margin-top: 4px; }
.upload-btn { display: inline-block; padding: 10px 20px; background-color: #4CAF50; color: white; border-radius: 4px; cursor: pointer; text-decoration: none; border: none; }
.upload-btn::after { content: "Datei auswählen"; }
.upload-btn:hover { background-color: #45a049; }
#uploadButtonLabel { display: inline-block; padding: 10px 20px; background-color: #4CAF50; color: white; border-radius: 4px; cursor: pointer; margin-bottom: 10px; }
#dropZone p { margin: 10px 0; color: #666; }
#dropZone p:last-child { margin: 0; }
#previewContainer { display: none; margin-top: 20px; }
#imagePreview { max-width: 100%; max-height: 300px; }
#uploadStatus { margin-top: 15px; font-weight: bold; display: none; }

.report-button-row { display: flex; gap: 10px; margin-top: 10px; }
.link-green { color: #4CAF50; text-decoration: none; }
.link-green:hover { text-decoration: underline; }

.saved-data-controls { display: none; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; }
.saved-data-notice { display: none; margin-top: 12px; }
.saved-data-text { margin: 0 0 12px 0; font-size: 14px; color: #333; }

#helpModal { display: none; }
.help-modal.show { display: flex !important; }
.email-validation-message { display: none; font-size: 13px; }
.email-invalid-message { color: #d32f2f; }

.form-group { 
    margin-bottom: 15px; 
    position: relative;
}

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: bold;
}

/* Base styles for all input elements */
input[type="text"], 
input[type="email"],
input[type="number"],
select, 
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Style for required empty fields */
input[required]:invalid,
select[required]:invalid,
textarea[required]:invalid {
    background-color: #ffebee;
    border-color: #ffcdd2;
}

/* Style for required fields with valid input */
input[required]:valid,
select[required]:valid,
textarea[required]:valid {
    background-color: #e8f5e9;
    border-color: #c8e6c9;
}

/* Style for optional empty fields */
input:not([required]):placeholder-shown,
textarea:not([required]):placeholder-shown {
    background-color: #f5f5f5;
}

/* Style for optional fields with input */
input:not([required]):not(:placeholder-shown),
textarea:not([required]):not(:placeholder-shown) {
    background-color: white;
}

/* Specific styling for select element to match other inputs */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Hover tooltips */
.form-group::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.form-group:hover::after {
    visibility: visible;
    opacity: 1;
}

/* Email validation styles */
.email-validation-message {
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.email-validation-message.email-invalid-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.email-validation-message.email-valid-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

.email-suggestion-link {
    color: #1976d2;
    font-weight: bold;
    margin-left: 5px;
}

.email-suggestion-link:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Email input validation states */
input[type="email"].email-valid {
    border-color: #4caf50;
    background-color: #f1f8f4;
}

input[type="email"].email-invalid {
    border-color: #f44336;
    background-color: #ffebee;
}

input[type="email"]:focus.email-valid {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

input[type="email"]:focus.email-invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background: #45a049;
}

/* Report & verification containers should match content container exactly */
.report-container,
.verification-box,
.review-container {
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0;
}

/* Focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Add at the end of the file */
.char-counter {
    font-size: 0.8em;
    color: #666;
    text-align: right;
    margin-top: -10px;
    margin-bottom: 15px;
}

.char-counter-low { color: #cc0000 !important; }

.char-counter-inline {
    font-size: 0.7em;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
}

/* Review page styles */
.review-container {
    background: rgba(249, 249, 249, 0.95);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}

.review-container h2 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4CAF50;
    font-size: 1.3em;
}

.review-section {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
}

.review-section h3 {
    color: #4CAF50;
    margin-bottom: 8px;
    font-size: 1em;
}

.review-item {
    margin-bottom: 5px;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 0.95em;
}

.review-item strong {
    color: #555;
    margin-right: 8px;
}

.review-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.review-actions button {
    margin: 0 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive adjustments for review page */
@media (max-width: 600px) {
    .review-container {
        padding: 15px;
        width: 100%;
        margin: 15px 0;
    }
    
    .review-section {
        padding: 10px;
    }
    
    .review-actions button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}

/* Checkbox container styles */
.checkbox-container {
    background-color: rgba(248, 248, 248, 0.95);
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
    margin: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 14px; /* Smaller font size for all text in the container */
}

.checkbox-container .checkbox-item {
    position: relative;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.checkbox-container .checkbox-item:last-child {
    border-bottom: none;
}

.checkbox-container label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-container input[type="checkbox"] {
    flex: 0 0 20px;
    margin-top: 2px; /* Reduced from 3px to better align with smaller text */
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-container .checkbox-text {
    flex: 1;
    font-weight: normal;
}

.checkbox-container small {
    display: block;
    margin-top: 5px;
    margin-left: 30px;
    color: #666;
    line-height: 1.4;
    font-size: 12px; /* Even smaller font size for explanatory text */
}

.checkbox-container .required-indicator {
    color: #e74c3c;
    margin-left: 4px;
}

/* Email verification page styles */
.verification-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.verification-success,
.verification-error {
    padding: 20px;
}

.success-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    line-height: 1;
}

.success-icon {
    color: #4CAF50;
}

.error-icon {
    color: #f44336;
}

.verification-success p,
.verification-error p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.verification-success p {
    color: #2e7d32;
}

.verification-error p {
    color: #c62828;
}

.btn-primary {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: #45a049;
}

/* Demo mode indicator - base styling */
.demo-mode-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: auto;
    z-index: 100;
    margin: 0;
    padding: 0;
}

/* Corner icon styling */
.corner-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px; /* Set a fixed width for large screens */
    height: auto;
    z-index: 100;
    margin: 0;
    padding: 0;
}

/* Bottom right corner icon styling */
.corner-right-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px; /* Set a fixed width for large screens */
    height: auto;
    z-index: 100;
    margin: 0;
    padding: 0;
}

/* Adjust indicator position on small screens */
@media (max-width: 850px) {
    .demo-mode-indicator {
        position: fixed; /* Change to fixed positioning on mobile */
        top: 0;
        right: 0;
    }
    
    .corner-icon {
        position: absolute; /* Change to absolute positioning on mobile */
        top: 0;
        left: -15px; /* Offset to compensate for container padding */
        width: 90px; /* Smaller size on mobile */
        height: auto;
    }
    
    .corner-right-icon {
        position: absolute; /* Change to absolute positioning on mobile */
        bottom: 0;
        right: -15px; /* Offset to compensate for container padding */
        width: 30px; /* Smaller size on mobile */
        height: auto;
    }
    
    /* Add padding to body to prevent content from being hidden under fixed elements */
    body {
        padding-top: 0; /* No additional padding needed with absolute positioning */
    }
}

/* Even smaller icon for very narrow screens */
@media (max-width: 480px) {
    .corner-icon {
        width: 60px; /* Even smaller on very narrow screens */
    }
    
    .corner-right-icon {
        width: 20px; /* Even smaller on very narrow screens */
    }
}

/* Ensure consistent spacing on all browsers */
@media (min-width: 851px) {
    .review-container {
        width: 100%;
    }
}

/* Microsoft Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .content-container,
    .report-container,
    .verification-box,
    .review-container {
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* Fix for Microsoft Edge and IE */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .content-container,
    .report-container,
    .verification-box,
    .review-container {
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* Specifically reset individual container styles to prevent override */
.report-container {
    background: rgba(249, 249, 249, 0.95);
    padding: 20px;
    border-radius: 4px;
    white-space: normal;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0;
}

.report-container .report-class-invert {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
}

.verification-box {
    background: rgba(249, 249, 249, 0.95);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

/* Chrome and Edge specific fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .content-container,
    .report-container,
    .verification-box,
    .review-container {
        width: 100% !important;
        max-width: 800px !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }
    
    .report-container,
    .verification-box,
    .review-container {
        margin: 20px 0 !important;
    }
    
    /* Fix for inconsistent nesting */
    .content-container > .report-container,
    .content-container > .verification-box,
    .content-container > .review-container {
        max-width: 100% !important;
    }
    
    @media (max-width: 850px) {
        .content-container,
        .report-container,
        .verification-box,
        .review-container {
            padding: 15px !important;
        }
        
        .report-container,
        .verification-box,
        .review-container {
            margin: 15px 0 !important;
        }
    }
}

/* Edge specific fixes with important to override any other styles */
@supports (-ms-ime-align:auto) {
    .content-container,
    .report-container,
    .verification-box,
    .review-container {
        width: 100% !important;
        max-width: 800px !important;
        box-sizing: border-box !important;
    }
    
    .content-container {
        margin: 0 auto !important;
    }
    
    .report-container,
    .verification-box,
    .review-container {
        margin: 20px 0 !important;
    }
}

/* Fix the vertical alignment with a dedicated rule */
@media (min-width: 851px) {
    body .review-container,
    body .report-container,
    body .verification-box {
        margin: 20px 0;
        padding: 20px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 850px) {
    body .review-container,
    body .report-container,
    body .verification-box {
        margin: 15px 0;
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Email verification waiting animation */
.waiting-animation {
    display: inline-block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer (Datenschutz) */
.app-footer {
    margin-top: 30px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 12px;
    color: #666;
}

.app-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 12px;
}

.app-footer .footer-divider {
    opacity: 0.5;
}

.app-footer .footer-links {
    width: 100%;
    margin-top: 6px;
    display: flex;
    justify-content: center;
}

.app-footer .footer-links a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.app-footer .footer-links a:hover {
    text-decoration: underline;
}

/* Upload modal (exam excuse) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"],
.modal.show {
    display: flex !important;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 6px;
    margin: 0;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
}

/* Teacher warning modal */
.teacher-warning-content {
    max-width: 640px;
    border-radius: 12px;
    border: 1px solid rgba(247, 197, 94, 0.6);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 65%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    padding: 16px;
}

.teacher-warning-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.teacher-warning-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #ffe9c2;
    color: #8a5a00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.teacher-warning-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #3b2f1f;
}

.teacher-warning-subtitle {
    margin: 0;
    color: #6b5b45;
    font-size: 12px;
}

.teacher-warning-close {
    margin-left: auto;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #8a6d3b;
}

.teacher-warning-text p {
    margin: 0 0 10px 0;
    color: #5d4b3b;
    font-size: 13px;
}

.teacher-warning-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.teacher-warning-badge {
    background: #fff1d6;
    color: #7a4f00;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(247, 197, 94, 0.6);
}

.teacher-warning-list-wrap h4 {
    margin: 10px 0 6px 0;
    font-size: 14px;
    color: #3b2f1f;
}

.teacher-warning-empty {
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f7f4ef;
    color: #6b5b45;
    font-size: 13px;
}

.teacher-warning-empty.is-visible {
    display: block;
}

.teacher-warning-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.teacher-warning-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}
.teacher-warning-item--problematic {
    border-color: rgba(239, 68, 68, 0.4);
    background: #fef2f2;
}

.teacher-warning-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.teacher-warning-name {
    font-weight: 600;
    color: #3b2f1f;
    font-size: 13px;
}

.teacher-warning-tag {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fde8bd;
    color: #7a4f00;
    border: 1px solid rgba(247, 197, 94, 0.7);
}
.teacher-warning-tag--problematic {
    background: #fecaca;
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.5);
}

.teacher-warning-remove {
    border: none;
    background: #f2f2f2;
    color: #333;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}

.teacher-warning-remove:hover {
    background: #e6e6e6;
}

.teacher-warning-hint {
    display: block;
    margin-top: 6px;
    color: #7a6a56;
    font-size: 11px;
}

.teacher-warning-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.teacher-warning-actions .btn-primary,
.teacher-warning-actions .btn-secondary {
    padding: 10px 20px;
    height: 42px;
    min-width: 100px;
    box-sizing: border-box;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.teacher-warning-actions .btn-primary:disabled {
    background: #b9b9b9;
    color: #f7f7f7;
    cursor: not-allowed;
}

.teacher-warning-text .is-hidden,
.teacher-warning-badges .is-hidden {
    display: none;
}

@media (max-width: 600px) {
    .teacher-warning-content {
        padding: 14px;
    }
    .teacher-warning-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .teacher-warning-actions {
        flex-direction: column;
    }
    .teacher-warning-actions .btn-primary,
    .teacher-warning-actions .btn-secondary {
        width: 100%;
    }
}

/* Privacy modal */
.privacy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 12000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Parent auth modal (access gate) */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 11000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-modal.show {
    display: flex !important;
}

.auth-modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 10px;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4CAF50;
    color: white;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: white;
}

.auth-modal-body {
    padding: 20px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.auth-modal-body .auth-intro {
    margin: 0 0 16px 0;
}

.auth-modal-body .form-group {
    margin-bottom: 16px;
}

.auth-modal-body .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
}

.auth-modal-body .auth-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-modal-body .auth-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.auth-modal-body .auth-remember-group {
    margin-bottom: 20px;
}

.auth-modal-body .auth-checkbox-label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.auth-modal-body .auth-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.auth-modal-body button[type="submit"] {
    width: 100%;
    padding: 12px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-modal-body button[type="submit"]:hover {
    background: #45a049;
}

.auth-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    text-align: center;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 13px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-error {
    padding: 10px 12px;
    border-radius: 4px;
    margin: 0 0 16px 0;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.privacy-modal[style*="display: flex"],
.privacy-modal[style*="display:flex"],
.privacy-modal.show {
    display: flex !important;
}

.privacy-modal-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.25);
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #4CAF50;
    color: white;
}

.privacy-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: white;
}

.privacy-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.privacy-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.privacy-modal-body {
    padding: 16px;
    overflow-y: auto;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.privacy-modal-body h3 {
    margin: 18px 0 8px 0;
    color: #4CAF50;
    font-size: 1.0rem;
}

.privacy-modal-body h3:first-child {
    margin-top: 0;
}

.privacy-modal-body a {
    color: #4CAF50;
}

.privacy-modal-body ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.privacy-modal-body li {
    margin: 0 0 6px 0;
}

.privacy-modal-body address {
    font-style: normal;
    line-height: 1.8;
}

.privacy-modal-body .privacy-section {
    margin-bottom: 20px;
}

.privacy-modal-body .privacy-section:last-child {
    margin-bottom: 0;
}

.privacy-modal-body .privacy-section h3:first-child {
    margin-top: 0;
}

/* Help button */
.help-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    min-width: 24px;
    min-height: 24px;
    background: none;
    border: none;
    color: #000000;
    font-size: 20px;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.2s ease;
    padding: 0;
    line-height: 1;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.help-button:hover {
    opacity: 0.7;
}

.help-button:active {
    opacity: 0.5;
}

.help-button:focus {
    outline: none;
}

/* Help modal */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 13000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    box-sizing: border-box;
}

.help-modal__content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 92%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: helpModalSlideIn 0.35s ease-out;
}

@keyframes helpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.help-modal__header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.help-modal__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.help-modal__close {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(17, 24, 39, 0.04);
    font-size: 22px;
    cursor: pointer;
    color: #6b7280;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
}

.help-modal__close:hover {
    background: rgba(17, 24, 39, 0.07);
    border-color: rgba(99, 102, 241, 0.25);
    color: #1f2937;
    transform: translateY(-1px);
}

.help-modal__close:active {
    transform: translateY(0);
}
