/* Bug-Report Modal Styles */
.bug-report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    /* Explizit verstecken wenn display: none gesetzt ist */
    visibility: visible;
}

.bug-report-modal[style*="display: none"] {
    display: none !important;
    visibility: hidden;
}

.bug-report-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.bug-report-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInScale 0.3s ease-out;
}

.bug-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
    border-radius: 16px 16px 0 0;
}

.bug-report-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.bug-report-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.bug-report-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

#bug-report-form {
    padding: 25px;
}

.bug-report-section {
    margin-bottom: 20px;
}

.bug-report-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.bug-report-section input,
.bug-report-section textarea,
.bug-report-section select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.bug-report-section input:focus,
.bug-report-section textarea:focus,
.bug-report-section select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.bug-report-section textarea {
    resize: vertical;
    min-height: 100px;
}

.system-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.system-info h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #6c757d;
}

.system-info-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.system-info-toggle:hover {
    color: #495057;
}

.toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #6c757d;
}

.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    font-size: 13px;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.system-info-grid div {
    display: flex;
    justify-content: space-between;
}

.system-info-grid strong {
    color: #495057;
}

.system-info-grid span {
    color: #6c757d;
    font-family: monospace;
}

.bug-report-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.bug-report-actions button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-navbar {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1), rgba(66, 165, 245, 0.15));
    border: 2px solid rgba(25, 118, 210, 0.2);
    border-radius: 12px;
    color: #1976d2;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-navbar:hover {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.15), rgba(66, 165, 245, 0.2));
    border-color: rgba(25, 118, 210, 0.3);
    transform: translateY(-1px);
    color: #1976d2;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c82333, #e96025);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.bug-report-success,
.bug-report-error {
    padding: 40px 25px;
    text-align: center;
    display: none;
}

.success-icon,
.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.bug-report-success h3,
.bug-report-error h3 {
    margin: 0 0 12px 0;
    color: #333;
}

.bug-report-success p,
.bug-report-error p {
    color: #6c757d;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

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

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .bug-report-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .bug-report-header {
        padding: 15px 20px;
    }
    
    #bug-report-form {
        padding: 20px;
    }
    
    .system-info-grid {
        grid-template-columns: 1fr;
    }
    
    .bug-report-actions {
        flex-direction: column;
    }
    
    .bug-report-actions button {
        width: 100%;
    }
}

/* Scroll-Styling für Modal-Inhalt */
.bug-report-content::-webkit-scrollbar {
    width: 6px;
}

.bug-report-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bug-report-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bug-report-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Screenshot Upload Styles */
.screenshot-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.screenshot-upload-area:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.screenshot-upload-area.dragover {
    border-color: #28a745;
    background-color: #e8f5e9;
    transform: scale(1.02);
}

.upload-placeholder {
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-placeholder:hover {
    background-color: #f8f9fa;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-main {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
}

.upload-sub {
    font-size: 0.875rem;
    color: #6c757d;
}

.screenshot-preview {
    position: relative;
    background: #f8f9fa;
}

.screenshot-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
}

.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
}

.remove-screenshot {
    align-self: flex-end;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-screenshot:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.screenshot-filename {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    align-self: flex-start;
}

.upload-info {
    margin-top: 8px;
}

.upload-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Upload progress */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    transition: width 0.3s ease;
    width: 0%;
}

/* Error states */
.upload-error {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
}

.upload-error-message {
    color: #721c24;
    font-size: 0.875rem;
    margin-top: 5px;
    padding: 8px 12px;
    background: #f5c6cb;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}