/* Loader Animation */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #780000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    width: 80%;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Paste Area Drag Effects */
#pasteArea.drag-over {
    border-color: #780000;
    background-color: rgba(120, 0, 0, 0.1);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Image Preview Area */
#imagePreviewArea:not(:empty) {
    display: flex;
}

/* Disabled Select */
select:disabled {
    background-color: #e0e0e0;
    color: #8a8a8a;
    cursor: not-allowed;
}

/* Button Group Custom Styles */
.button-group {
    display: flex;
    gap: 0;
    border-radius: 0.375rem;
    overflow: hidden;
}

.download-button {
    flex: 1;
    background-color: #780000;
    color: white;
    text-align: center;
    padding: 0.75rem;
    text-decoration: none;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-button:hover {
    background-color: #600000;
}

.copy-button {
    flex: 1;
    background-color: #525252;
    color: white;
    text-align: center;
    padding: 0.75rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-button:hover {
    background-color: #3d3d3d;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(20, 20, 20, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #780000;
}

.toast.show {
    opacity: 1;
}

/* Warning and Error States */
.input-warning {
    border-color: #f59e0b !important;
    animation: shake 0.5s ease-in-out;
}

.warning-text {
    color: #f59e0b;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.warning-text.show {
    opacity: 1;
    transform: translateY(0);
}

.upload-warning {
    border-color: #f59e0b !important;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

@keyframes pulse {
    0%, 100% { border-color: #f59e0b; }
    50% { border-color: transparent; }
}

.inline-warning {
    background-color: rgba(120, 0, 0, 0.1);
    border-left: 4px solid #780000;
    color: #ff9999;
    padding: 8px 12px;
    margin-top: 4px;
    font-size: 14px;
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.inline-warning.show {
    opacity: 1;
    transform: translateY(0);
}

/* Preview Items */
.preview-item {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(227, 227, 227, 0.5);
    border-radius: 0.5rem;
    overflow: hidden;
}

.preview-image {
    border-bottom: 1px solid rgba(227, 227, 227, 0.5);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f3f3;
}

::-webkit-scrollbar-thumb {
    background: #8a8a8a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b6b6b;
}
