/* ===== MODAL STYLE POLISH (wie Katalog) ===== */
.fungi-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}
.modal-content {
    position: relative;
    background: var(--panel-bg);
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--accent);
    animation: modalSlideIn 0.3s ease;
    box-sizing: border-box;
    transition: all 0.3s ease;
    z-index: 2;
    padding-top: 40px;
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: var(--panel-bg);
    border: 2px solid var(--accent-strong);
    border-radius: 50%;
    font-size: 2em;
    color: var(--accent-strong);
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s, background 0.2s, border 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.modal-close:hover {
    color: #fff;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}
.modal-body {
    padding: 30px;
    padding-top: 50px;
    transition: padding 0.3s ease;
}
.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 20px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}
.modal-icon {
    font-size: 3em;
    transition: font-size 0.3s ease;
}
.modal-titles {
    flex: 1;
    min-width: 200px;
    transition: all 0.3s ease;
}
.modal-titles h2 {
    margin: 0 0 5px 0;
    color: var(--accent-strong);
    font-size: 1.8em;
    transition: font-size 0.3s ease;
}
.modal-latin {
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1em;
    transition: all 0.3s ease;
}
.modal-english {
    color: var(--text);
    margin: 5px 0 0 0;
    font-size: 0.95em;
    transition: all 0.3s ease;
}
.modal-edibility {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1em;
    white-space: nowrap;
    align-self: flex-end;
    margin-top: 30px;
    transition: all 0.3s ease;
}
.edibility-toxic {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #c62828;
}
html.dark .edibility-toxic {
    background: #4a1a1a;
    color: #ff6b6b;
    border-color: #ff6b6b;
}
.edibility-edible {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 2px solid #6a1b9a;
}
html.dark .edibility-edible {
    background: #3a1a4a;
    color: #ce93d8;
    border-color: #ce93d8;
}
.edibility-safe {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}
html.dark .edibility-safe {
    background: #1a4a1a;
    color: #81c784;
    border-color: #81c784;
}
.edibility-unknown {
    background: #fff8e1;
    color: #f57c00;
    border: 2px solid #f57c00;
}
html.dark .edibility-unknown {
    background: #4a3a1a;
    color: #ffb74d;
    border-color: #ffb74d;
}
.warning-box {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #e65100;
    font-size: 1em;
}
html.dark .warning-box {
    background: #4a2a0a;
    border-color: #ffb74d;
    color: #ffcc80;
}
.modal-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.modal-section {
    background: rgba(160, 112, 77, 0.08);
    border-radius: 10px;
    padding: 20px;
}
html.dark .modal-section {
    background: rgba(160, 112, 77, 0.15);
}
.modal-section h3 {
    margin: 0 0 12px 0;
    color: var(--accent-strong);
    font-size: 1.1em;
}
.modal-section p {
    margin: 0;
    color: var(--text);
    line-height: 1.7;
}
.modal-sources ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.modal-sources li {
    margin: 8px 0;
}
.modal-sources a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.modal-sources a:hover {
    text-decoration: underline;
    color: var(--accent-strong);
}
/* ===== FUNGI MODAL (aus katalog.css übernommen) ===== */
.fungi-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}
.fungi-modal[style*="display: flex"] {
    display: flex !important;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
}
.modal-content {
    position: relative;
    background: var(--panel-bg);
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--accent);
    animation: modalSlideIn 0.3s ease;
    box-sizing: border-box;
    transition: all 0.3s ease;
    z-index: 2;
}
@keyframes modalSlideIn {
    0% { transform: translateY(40px) scale(0.98); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    font-size: 2em;
    color: var(--accent-strong);
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #d9534f;
}
.modal-body {
    padding: 30px 24px 24px 24px;
    color: var(--text);
}
.modal-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}
.modal-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}
.modal-titles h2 {
    margin: 0 0 2px 0;
    font-size: 1.5em;
    color: var(--accent);
}
.modal-latin {
    font-style: italic;
    color: var(--accent-strong);
    margin: 0;
}
.modal-english {
    color: var(--text-secondary);
    margin: 0;
}
.modal-edibility {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    margin-left: auto;
}
.edibility-edible { background: #e6ffe6; color: #2e7d32; }
.edibility-toxic { background: #ffe6e6; color: #d32f2f; }
.edibility-safe { background: #e6f7ff; color: #1976d2; }
.edibility-unknown { background: #fffbe6; color: #7a5a00; }
.warning-box {
    background: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffe066;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 1em;
}
.modal-sections {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.modal-section h3 {
    margin: 0 0 6px 0;
    font-size: 1.1em;
    color: var(--accent-strong);
}
.modal-section p {
    margin: 0;
    color: var(--text);
}
.modal-sources ul {
    margin: 0;
    padding-left: 18px;
}
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
}
.modal-loading .loading-spinner {
    border: 5px solid #eee;
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.modal-error {
    color: #d32f2f;
    text-align: center;
    padding: 30px 0;
}
/* Info-Button neben Google-Button */
/* Button group for results: perfectly centered, flush, and aligned */
.result-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    width: 100%;
}
/* Make both buttons in result-actions the same width */
.result-actions > * {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        min-width: 0;
        font-size: 1em;
        box-sizing: border-box;
        padding: 0;
        flex: 1 1 0;
        max-width: 270px;
}

@media (max-width: 600px) {
    .result-actions > * {
        max-width: 100%;
    }
}
/* Main Google button: visually matches info button, no extra margin, flush alignment */
.google-search-btn {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 1em;
    margin: 0;
    box-sizing: border-box;
    border: none;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.10);
}
.google-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.18);
    color: white;
    text-decoration: none;
}
/* Info button: visually matches Google button, flush alignment */
.info-btn {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    margin: 0;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffe066, #ffd43b);
    color: #7a5a00;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 224, 102, 0.10);
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.info-btn:hover {
    background: linear-gradient(135deg, #ffd43b, #ffe066);
    color: #5c4700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 224, 102, 0.18);
}
html.dark .info-btn {
    background: linear-gradient(135deg, #3a3200, #bfa900);
    color: #ffe066;
    border: 1.5px solid #bfa900;
}
.info-btn:active {
    filter: brightness(0.95);
}
/* Image Recognition Page Styles */

.bilderkennung-header {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: var(--panel-bg);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 40px;
}

.bilderkennung-header h1 {
    font-size: 2.5em;
    margin: 0 0 10px 0;
}

.bilderkennung-header p {
    font-size: 1.1em;
    margin: 0;
    opacity: 0.9;
}

/* Upload Section */
.upload-container {
    display: block;
    margin-bottom: 40px;
    max-width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.6s ease;
}

.upload-section, .preview-section {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--accent-strong);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease;
}

.preview-section {
    display: flex;
    flex-direction: column;
}

.preview-buttons {
    scroll-margin-top: 100px; /* Header-Höhe berücksichtigen beim Auto-Scroll */
}

.preview-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text);
}

.preview-content {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    margin-bottom: 15px;
    overflow: hidden;
}

.preview-buttons {
    flex: 0 0 auto;
    position: relative;
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--accent-strong);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg);
}

.upload-area:hover {
    background: var(--panel-bg);
    border-color: var(--accent);
}

.upload-area.dragover {
    background: var(--bg);
    border-color: var(--accent);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.upload-text {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 10px;
}

.upload-subtext {
    color: var(--accent-strong);
    font-size: 0.9em;
}

#fileInput {
    display: none;
}

/* Preview Section */
.preview-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.preview-placeholder {
    text-align: center;
    color: var(--accent-strong);
    font-size: 3em;
    opacity: 0.3;
    user-select: none;
}

.upload-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
}

.upload-button.inactive {
    background: var(--shadow);
    opacity: 0.6;
}

.upload-button:not(.inactive):hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.clear-button {
    background: #d9534f;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95em;
    width: 100%;
    transition: all 0.3s ease;
}

.clear-button.inactive {
    background: var(--shadow);
    opacity: 0.6;
}

.clear-button:not(.inactive):hover {
    background: #c9302c;
}

/* Info Message Animation */
.no-image-warning {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    background: var(--panel-bg);
    border: 2px solid var(--accent);
    color: var(--text);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    display: none;
    z-index: 10;
}

.no-image-warning.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===== TAB NAVIGATION ===== */
.input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-strong);
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-button:hover {
    color: var(--accent);
}

.tab-button.active {
    color: var(--accent-strong);
    border-bottom-color: var(--accent-strong);
}

/* ===== CAMERA SECTION ===== */
.camera-section {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: 8px;
    border: 2px solid var(--accent-strong);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease;
}

.camera-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text);
}

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.camera-video {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #000;
    border: 2px solid var(--accent-strong);
    object-fit: cover;
    display: block;
}

.camera-video.switching {
    opacity: 0.5;
    filter: blur(2px);
}

/* ===== RESPONSIVE VIDEO FÜR VERSCHIEDENE ORIENTIERUNGEN ===== */
@media (orientation: portrait) {
    .camera-video {
        aspect-ratio: 9 / 16;
        max-width: 100%;
        max-height: 500px;
    }
}

@media (orientation: landscape) and (max-width: 768px) {
    .camera-video {
        aspect-ratio: 16 / 9;
        max-width: 100%;
    }
}

.capture-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.capture-button:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.capture-button:disabled {
    background: var(--shadow);
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== CAMERA SELECT DROPDOWN ===== */
#cameraSelect {
    width: 100%;
    padding: 10px 12px;
    border-radius: 5px;
    border: 2px solid var(--accent-strong);
    background: var(--panel-bg);
    color: var(--text);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cameraSelect:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.2);
}

#cameraSelect:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(139, 90, 43, 0.3);
}

#cameraSelect option {
    background: var(--panel-bg);
    color: var(--text);
}

/* Results Section */
.results-section {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    scroll-margin-top: 100px; /* Header-Höhe berücksichtigen beim Auto-Scroll */
}

.results-section.show {
    display: block;
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.results-header h2 {
    color: var(--accent);
    margin: 0 0 10px 0;
}

/* "Wahrscheinlich kein Pilz" Styling */
.results-header.no-match {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
    border: 2px solid #ffc107;
}

.results-header.no-match h2 {
    color: #ff9800;
    font-size: 1.8em;
}

.no-match-info {
    color: var(--text);
    font-size: 1.1em;
    margin: 10px 0 0 0;
    opacity: 0.85;
}

.alternative-predictions.three-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Pilznamen als klickbare Links */
.mushroom-link {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    cursor: pointer;
}

.mushroom-link:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

.results-header .mushroom-link {
    color: var(--accent);
    font-size: inherit;
}

.results-header .mushroom-link:hover {
    color: var(--accent-strong);
}

/* Google-Suche Button (Hauptergebnis) */


/* Google-Suche Icon (Alternativen) */
.google-search-small {
    margin-left: 8px;
    text-decoration: none;
    font-size: 1em;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.google-search-small:hover {
    opacity: 1;
    transform: scale(1.2);
}

.alternative-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.confidence {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent);
}

.confidence-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.3s ease;
}

/* Mushroom Details */
.mushroom-details {
    background: var(--panel-bg);
    border: 2px solid var(--accent-strong);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.mushroom-details h3 {
    color: var(--accent);
    margin: 0 0 15px 0;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

.detail-item {
    margin: 12px 0;
    padding: 10px;
    background: var(--panel-bg);
    border-radius: 5px;
}

.detail-item strong {
    color: var(--accent);
}

/* Toxicity Warning */
.toxicity-warning {
    background: var(--panel-bg);
    border-left: 5px solid #d9534f;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.toxicity-warning h3 {
    color: #d9534f;
    margin-top: 0;
}

.toxicity-warning p {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--text);
}

/* Loading State */
/* Loading Popup */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.loading.show {
    display: flex;
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.loading-content {
    background: var(--panel-bg);
    padding: 40px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--accent);
    transform: scale(0.8);
    opacity: 0;
    animation: popIn 0.4s ease forwards;
    color: var(--text);
}

.loading.show .loading-content {
    animation: popIn 0.4s ease forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-content p {
    margin: 0;
    font-size: 1.2em;
    color: var(--text);
    font-weight: bold;
}

.spinner {
    border: 5px solid rgba(139, 90, 43, 0.2);
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Sammlung Button */
.collection-actions {
    margin: 20px 0;
    text-align: center;
}

.collection-actions .login-hint {
    display: block;
    text-align: center;
    margin: 0 auto;
    padding: 12px 16px;
    max-width: 420px;
    border-radius: 10px;
    font-weight: 500;
    background: #fffbe6;
    color: #7a5a00;
    border: 1.5px solid #ffe066;
    box-shadow: 0 2px 12px rgba(255, 224, 102, 0.10);
    transition: background 0.3s, color 0.3s, border 0.3s;
}

html.dark .collection-actions .login-hint {
    background: #3a3200;
    color: #ffe066;
    border: 1.5px solid #bfa900;
    box-shadow: 0 2px 12px rgba(191, 169, 0, 0.10);
}

.collection-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    display: block;
    margin: 0 auto;
}
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.3);
}

.collection-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.collection-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.collection-button.added {
    background: linear-gradient(135deg, #28a745, #218838);
    cursor: default;
}

.collection-button.in-collection {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    cursor: default;
    opacity: 1;
}

.collection-button.fade-out {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}
.collection-button.fade-in {
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}

.collection-button,
.collection-button.added,
.collection-button.in-collection {
    transition: background 0.4s cubic-bezier(0.4,0,0.2,1), color 0.4s, opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Toast Popup */
.toast-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--panel-bg);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.toast-popup.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast-icon {
    font-size: 1.5em;
}

.toast-message {
    font-size: 1em;
    font-weight: 500;
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .bilderkennung-header {
        padding: 30px 20px;
    }

    .bilderkennung-header h1 {
        font-size: 1.8em;
    }

    .upload-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .fungi-modal {
        padding-top: 60px;
    }
}
/* ===== MUSHROOM NOT FOUND MODAL ===== */
.mushroom-not-found-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.mushroom-not-found-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.mushroom-not-found-content {
    position: relative;
    background: var(--panel-bg);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--accent);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    padding: 40px 30px 30px;
    box-sizing: border-box;
}

.mushroom-not-found-content .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    font-size: 2em;
    color: var(--panel-bg);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mushroom-not-found-content .modal-close:hover {
    transform: rotate(90deg);
    background: var(--accent-strong);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.not-found-header {
    text-align: center;
    margin-bottom: 30px;
}

.not-found-emoji {
    font-size: 4em;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.not-found-header h2 {
    font-size: 2em;
    margin: 10px 0;
    color: var(--accent);
}

.not-found-header p {
    font-size: 1.1em;
    color: var(--text);
    opacity: 0.85;
}

.not-found-details {
    background: rgba(139, 90, 43, 0.05);
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.not-found-details p {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--text);
}

.not-found-details p:first-child {
    margin-top: 0;
}

.not-found-details strong {
    color: var(--accent);
    font-weight: 600;
}

.not-found-suggestions {
    margin-top: 20px;
    padding: 15px;
    background: rgba(139, 90, 43, 0.1);
    border-radius: 8px;
}

.not-found-suggestions p:first-child {
    font-weight: 600;
    color: var(--accent);
    margin-top: 0;
}

.not-found-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.not-found-suggestions li {
    padding: 8px 0;
    margin-left: 0;
    color: var(--text);
    opacity: 0.85;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.btn-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 90, 43, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .mushroom-not-found-content {
        padding: 30px 20px 20px;
        max-height: 85vh;
    }

    .not-found-emoji {
        font-size: 3em;
    }

    .not-found-header h2 {
        font-size: 1.6em;
    }

    .not-found-header p {
        font-size: 1em;
    }
}