/* Glassmorphism & Modern UI Tweaks */
:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* More opaque for better contrast */
    --glass-border: rgba(255, 255, 255, 0.6);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    /* Indigo to Purple */
}

body {
    background-color: #0f172a;
    /* Slate 900 */
    background-image:
        radial-gradient(at 0% 0%, rgba(20, 184, 166, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(20, 184, 166, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    /* Slate 800 - darker standard text */
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-input {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.hover-trigger .hover-target {
    opacity: 0;
    transition: opacity 0.3s;
}

.hover-trigger:hover .hover-target {
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print Styles */
@media print {
    @page {
        margin: 1cm;
        size: auto;
    }

    body {
        background: white;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .glass-panel {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        /* slate-200 */
        background: white;
    }

    /* Ensure backgrounds print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Content container adjustments */
    #output-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        zoom: 0.85;
        /* Balanced: readable but compact */
    }

    .avoid-break,
    .keep-together {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* Screen view adjustments for output container */
#output-container:not(.print-only) {
    padding-top: 5rem;
    /* Space for fixed buttons */
}

.print-only {
    display: none;
}

/* Modal Transitions */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 300ms, transform 300ms;
}

.modal-exit {
    opacity: 1;
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 200ms, transform 200ms;
}