/* Dashboard Theme */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.smaller { font-size: 0.75rem; }
.uppercase { text-transform: uppercase; letter-spacing: 0.5px; }
/* Cyber-Vibrant Highlight Gradient */
.dashboard-header {
    background: #2563eb !important; /* Fallback Blue */
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%) !important;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3) !important;
}

/* Logo Text - Crystal White */
.brand-text-main {
    font-size: 1.9rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
    line-height: 1;
}

/* Accent '2' - Neon Yellow for maximum contrast against Purple */
.text-accent {
    color: #facc15 !important; 
    font-style: italic;
    margin: 0 3px;
    filter: drop-shadow(0 0 5px rgba(250, 204, 21, 0.5));
}

.brand-tagline {
    font-size: 9px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8) !important;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* Avatar with Glow */
.user-avatar-neon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.text-yellow {
    color: #facc15 !important;
}
/* Sidebar Controls */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #fbfbfb;
    cursor: pointer;
    transition: 0.2s ease;
}
.upload-area:hover { border-color: #0d6efd; background: #f0f7ff; }

/* Update the grid to allow wider items if necessary */
.workspace-canvas {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center; /* Centers the large previews */
    padding: 20px;
    background-color: #e5e7eb; /* Slightly darker to make white pages pop */
}

.preview-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
    /* This allows the card to be as wide as the image up to a point */
    max-width: 100%; 
}

.preview-item img {
    /* REMOVE fixed height: 180px; */
    display: block;
    width: 100%; 
    height: auto; /* This maintains the aspect ratio */
    max-height: 70vh; /* Prevents a single image from being too tall for the screen */
    object-fit: contain;
}

/* Control the width of the preview card based on user input */
.preview-card-container {
    transition: width 0.3s ease;
    margin: auto;
}

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 100px 20px;
}


.preview-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.preview-item img { width: 100%; height: 180px; object-fit: contain; background: #f8f9fa; }

/* Mobile Optimizations */
@media (max-width: 991px) {
    aside { border-right: none !important; border-bottom: 1px solid #dee2e6; }
    .workspace-canvas { min-height: 400px; grid-template-columns: repeat(2, 1fr); padding: 15px; }
}

@media (max-width: 576px) {
    .workspace-canvas { grid-template-columns: 1fr; }
}

.animate-pop { animation: pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes pop { from { scale: 0.9; opacity: 0; } to { scale: 1; opacity: 1; } }

.animate-slide-up { animation: slideUp 0.4s ease-out; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* High-Visibility Quality Slider */
#qRange {
    -webkit-appearance: none;
    width: 100%;
    height: 8px; /* Thicker Line */
    border-radius: 5px;
    background: #e2e8f0; /* Light Grey Track */
    outline: none;
    margin: 15px 0;
    transition: all 0.2s;
}

/* 1. Styling the Line (Track) */
#qRange::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6); /* Blue to Purple Line */
    border-radius: 5px;
}

/* 2. Styling the "Dot" (Thumb) - Chrome/Safari/Edge */
#qRange::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 22px; /* Bigger Dot */
    width: 22px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: -7px; /* Centers the dot on the 8px line */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), 0 4px 6px rgba(0, 0, 0, 0.2);
    border: 3px solid #3b82f6; /* Matching Blue Border */
    transition: transform 0.1s ease-in-out;
}

/* Hover Effect for the Dot */
#qRange::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #f8fafc;
}

/* Firefox Support */
#qRange::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #3b82f6;
    border-radius: 5px;
}
#qRange::-moz-range-thumb {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #3b82f6;
}