#toastContainer {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.21, 1.02, 0.73, 1);
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background-color: #16a34a; } 
.toast.error { background-color: #dc2626; } 

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-custom {
    animation: spin 1s linear infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Inter', sans-serif;
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5rem; 
    color: #e2e8f0; 
}

@keyframes pulse-shadow-royal {
    0% { box-shadow: 0 0 15px rgba(30, 58, 138, 0.4); } /* Darker Blue */
    50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.7); } /* Brighter Gold */
    100% { box-shadow: 0 0 15px rgba(30, 58, 138, 0.4); }
}

.card-with-animated-shadow, .image-container-with-animated-shadow {
    animation: pulse-shadow-royal 3s infinite alternate;
}

#fixedHeader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px); 
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); 
    border-bottom: 1px solid rgba(59, 130, 246, 0.4);
}

#fixedHeader .text-white {
    text-shadow: 0 2px 5px rgba(0,0,0,0.3); 
}

#navMenu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 250px; 
    background-color: rgba(15, 23, 42, 0.99); 
    backdrop-filter: blur(20px);
    border-radius: 0 1.5rem 1.5rem 0;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.8); 
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.4s ease-out; 
    transform-origin: top left;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none; 
    z-index: 999;
    border-right: 2px solid rgba(59, 130, 246, 0.6);
}

#navMenu.show-menu {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto; 
}

#navMenu button {
    padding: 1.2rem 1.8rem; 
    text-align: left;
    font-size: 1.35rem;
    font-weight: 700;
    color: #e2e8f0;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

#navMenu button:hover {
    background-color: #1e3a8a;
    color: #ffffff;
    transform: translateX(10px); 
}

#navMenu button.active {
    background-color: #3b82f6;
    color: #ffffff;
    box-shadow: inset 5px 0 0 0 #d4af37; 
}

#navMenu button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: all 0.5s ease;
}

#navMenu button:hover::before {
    left: 100%;
}

.aspect-ratio-btn-group button {
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.aspect-ratio-btn-group button.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.btn-gradient {
    background-image: linear-gradient(to right top, #1e3a8a, #3b82f6, #1e3a8a);
    box-shadow: 0 12px 25px rgba(30, 58, 138, 0.5); 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    border: 1px solid rgba(59, 130, 246, 0.5); 
}

.btn-gradient:hover {
    background-image: linear-gradient(to right top, #3b82f6, #1e3a8a, #1e3a8a);
    box-shadow: 0 18px 35px rgba(30, 58, 138, 0.8); 
    transform: translateY(-5px); 
}

.btn-gradient:active {
    background-image: linear-gradient(to right top, #1e3a8a, #1e3a8a, #3b82f6, #3b82f6);
    transform: translateY(0);
    box-shadow: 0 8px 15px rgba(30, 58, 138, 0.4);
}

.download-btn-gradient {
    background-image: linear-gradient(to right, #d1d5db, #e5e7eb, #d1d5db);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-out;
    color: #333; 
    border: 1px solid #c0c0c0;
}

.download-btn-gradient:hover {
    background-image: linear-gradient(to right, #e5e7eb, #d1d5db, #e5e7eb);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.download-btn-gradient:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary-editor {
    background-image: linear-gradient(to right, #1e3a8a, #3b82f6, #1e3a8a);
    background-size: 200% 100%;
    animation: gradient-move 4s linear infinite;
    transition: all 0.3s ease-out;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.btn-primary-editor:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.btn-primary-editor:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.btn-primary-editor.disabled {
    background-image: none;
    background-color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

.btn-secondary-editor {
    background-image: linear-gradient(to right, #d4af37, #b8860b, #d4af37);
    background-size: 200% 100%;
    animation: gradient-move 4s linear infinite;
    transition: all 0.3s ease-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #333; /* Darker text for contrast */
    border: 1px solid rgba(212, 175, 55, 0.6);
}

.btn-secondary-editor:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary-editor:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-glow:focus {
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.6);
    border-color: #3b82f6;
}

.input-field-transition {
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.container-transition {
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.error-container-transition {
    transition: opacity 0.3s ease-in-out;
}

.custom-file-upload {
    padding: 0.85rem 1.8rem; 
    border-radius: 0.85rem; 
    font-weight: 700; 
    background-image: linear-gradient(to right, #1e3a8a, #3b82f6, #1e3a8a);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-out;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.custom-file-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.custom-file-upload-text {
    color: #94a3b8; 
    font-size: 0.95rem;
    font-weight: 500;
}
