@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0ea5e9 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-hover: rgba(255, 255, 255, 0.95);
    --text-main: #1e293b;
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --accent-color: #06b6d4;
    --danger-color: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-gradient);
    min-height: 100vh;
    margin: 0;
    padding-bottom: 2rem;
}

/* Navbar */
.navbar {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background: rgba(15, 23, 42, 0.9) !important;
}

.navbar-brand {
    color: #fff !important;
    font-weight: 700;
}

.navbar-brand i {
    color: var(--primary-color);
}

/* Glassmorphism Components */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.tool-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2rem 1.25rem;
    text-align: center;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    color: inherit;
}

.tool-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

/* Drag and drop zone */
.drop-zone {
    border: 2px dashed var(--primary-color);
    border-radius: 1rem;
    padding: 2.5rem 1rem;
    text-align: center;
    background: rgba(14, 165, 233, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone.dragover {
    background: rgba(14, 165, 233, 0.12);
    border-color: var(--accent-color);
    transform: scale(1.02);
}

/* Overlay for drops */
.drop-zone.dragover::after {
    content: "Release to drop files!";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255,255,255,0.95);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    pointer-events: none;
    z-index: 10;
}

/* File List & Items */
.file-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}
.file-list::-webkit-scrollbar {
    width: 6px;
}
.file-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

/* Add UI Animations */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

.file-item {
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    animation: slideInUp 0.25s ease forwards;
    cursor: grab;
}

.file-item:active {
    cursor: grabbing;
}

.file-item.removing {
    animation: slideOutRight 0.25s ease forwards;
    pointer-events: none;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-all;
}

.file-size {
    font-size: 0.8rem;
    color: #64748b;
}

.btn-icon {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.15s, transform 0.1s;
    padding: 0.2rem 0.4rem;
}

.btn-icon:hover {
    color: var(--primary-color);
}
.btn-icon.danger:hover {
    color: var(--danger-color);
}

.index-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Drag to Reorder styling */
.file-item.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary-color) !important;
    transform: scale(0.98);
}

.file-item.drag-over-top {
    border-top: 3px solid var(--primary-color) !important;
}

.file-item.drag-over-bottom {
    border-bottom: 3px solid var(--primary-color) !important;
}

/* Buttons Micro-interactions */
.btn-primary-custom, .btn-outline-danger, .btn-outline-primary {
    transition: all 0.2s ease !important;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}
.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4) !important;
}

.btn-primary-custom:active, 
.btn-icon:active,
.btn-outline-danger:active,
.btn-outline-primary:active {
    transform: scale(0.96) !important;
}

/* Loaders */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    display: none;
}

.spinner-border {
    color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

