body {
    background: #1f2937;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #f3f4f6;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

/* Autocomplete Dropdown */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.375rem;
    margin-top: 2px;
    max-height: 250px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.autocomplete-header {
    padding: 0.75rem 1rem;
    background: #1f2937;
    border-bottom: 1px solid #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.autocomplete-header-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #d1d5db;
}

.autocomplete-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.autocomplete-close:hover {
    color: #f3f4f6;
}

.autocomplete-suggestions-list {
    overflow-y: auto;
    max-height: 200px;
}

/* Custom Scrollbar für Autocomplete */
.autocomplete-suggestions-list::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-suggestions-list::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 4px;
}

.autocomplete-suggestions-list::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.autocomplete-suggestions-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Firefox Scrollbar */
.autocomplete-suggestions-list {
    scrollbar-width: thin;
    scrollbar-color: #6b7280 #1f2937;
}

.autocomplete-suggestion {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #4b5563;
    transition: background-color 0.2s;
}

.autocomplete-suggestion-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.autocomplete-suggestion-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.autocomplete-suggestion-title {
    font-size: 0.9375rem;
}

.autocomplete-suggestion-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.bg-gray-600 {
    background: #4b5563;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

/* Loading Indicator */
.autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #4b5563;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Keine Treffer */
.autocomplete-no-results {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    font-style: italic;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #fbbf24;
}

.char-counter.error {
    color: #ef4444;
}

/* Button Spinner */
button .spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    display: inline-block;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Deaktiviertes Input-Feld Styling */
input:disabled {
    background-color: #374151 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

input:disabled::placeholder {
    color: #6b7280 !important;
}

/* Spinner bei Number-Input entfernen */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Custom Checkbox Styling */
.custom-checkbox {
    position: relative;
    display: inline-block;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #374151;
    border: 2px solid #6b7280;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover .checkmark {
    border-color: #9ca3af;
    background-color: #4b5563;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox input:focus ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #f3f4f6;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid #374151;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    color: #f3f4f6;
}

.toast-message {
    font-size: 0.875rem;
    color: #d1d5db;
    line-height: 1.5;
}

.toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #f3f4f6;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.toast-icon.animate {
    animation: checkmark 0.5s ease-out;
}
