:root{
    --primary-start: #7c3aed;
    --primary-end: #6d28d9;
    --card-bg: #ffffff;
}

/* Layout helpers */
.edu-hero { background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%); }
.rounded-2xl { border-radius: 1rem; }

/* Buttons */
.btn { display: inline-block; padding: .5rem 1rem; border-radius: .5rem; font-weight:600 }
.btn-primary { background: linear-gradient(90deg,var(--primary-start),var(--primary-end)); color: #fff; }
.btn-outline { border: 1px solid #e5e7eb; color: #374151; background: transparent }
.btn-light { background-color: rgba(255,255,255,0.15); color: #fff; }

/* Inputs */
.input { padding: .5rem .75rem; border: 1px solid #e5e7eb; border-radius: .5rem; }

/* Cards */
.rounded-xl { border-radius: .75rem; }
.shadow { box-shadow: 0 6px 20px rgba(15,23,42,0.06); }

/* Utility for gradient progress */
.progress-bar { background: linear-gradient(90deg,var(--primary-start),var(--primary-end)); height:100%; }

/* Small responsive tweaks for the home page */
@media (min-width: 768px){
    .max-w-4xl { max-width: 64rem; }
}

/* ============================================================================
   EduShare Home - Complete CSS (matching 100% mockup)
   ============================================================================ */

:root {
    /* Colors */
    --color-primary-600: #7c3aed;
    --color-primary-700: #6d28d9;
    --color-primary-50: #f3e8ff;
    --color-primary-100: #ede9fe;
    --color-dark-main: #2b0b66;
    --color-dark-light: #4c1d95;
    --color-gray-700: #374151;
    --color-gray-600: #4b5563;
    --color-gray-500: #6b7280;
    --color-gray-400: #9ca3af;
    --color-gray-300: #d1d5db;
    --color-gray-200: #e5e7eb;
    --color-gray-100: #f3f4f6;
    --color-white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 10px 30px rgba(99, 102, 241, 0.06);
    --shadow-hover: 0 20px 40px rgba(99, 102, 241, 0.1);
}

/* Root & Container */
.edushare-root {
    background: #f8f8fc;
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.edushare-container {
    display: grid;
}

/* Cards */
.es-card {
    background: var(--color-white);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: all 0.3s ease;
}

.es-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(124, 58, 237, 0.15);
}

/* Typography */
.edushare-container h1 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 2.25rem;
    color: var(--color-dark-main);
    letter-spacing: -0.5px;
}

.edushare-container h3, .edushare-container h4 {
    font-weight: 600;
    color: var(--color-dark-light);
}

.edushare-container p {
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: var(--color-gray-600);
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .edushare-container {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .edushare-root {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Sidebar specific styles matching mockup */
.sidebar-root .card {
    padding: 1rem;
    background: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-100);
}
.card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary-700);
    letter-spacing: 0.6px;
}
.category-list { list-style: none; margin: 0; padding: 0; margin-top: 0.75rem; }
.category-item { padding: 0.45rem 0; }
.category-link { display:flex; align-items:center; gap:0.9rem; text-decoration:none; padding:0.5rem; border-radius:0.6rem; transition: background .15s ease; }
.category-link:hover { background: linear-gradient(90deg, rgba(124,58,237,0.03), rgba(109,40,217,0.02)); }
.category-icon { width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; border-radius:12px; font-size:18px; }
.category-text { flex:1; color:var(--color-gray-700); font-size:0.95rem; }
.category-chevron { color:var(--color-gray-300); font-size:20px; }

/* Share card */
.share-card { background: var(--color-white); border-radius: 0.75rem; padding:1.25rem; text-align:center; box-shadow: var(--shadow-sm); }
.share-illustration { width:64px; height:64px; margin:0 auto; border-radius:12px; background: linear-gradient(135deg,var(--color-primary-50),#f5f3ff); display:flex; align-items:center; justify-content:center; font-size:28px; }
.share-title { margin-top:0.75rem; font-weight:700; color:var(--color-gray-700); }
.share-desc { margin-top:0.5rem; color:var(--color-gray-500); font-size:0.9rem; }
.share-btn { display:inline-block; margin-top:0.9rem; width:100%; padding:0.6rem 0; border-radius:0.6rem; background: linear-gradient(90deg,var(--primary-start),var(--primary-end)); color:#fff; text-decoration:none; font-weight:600; }

.upload-trigger-btn,
.upload-submit-btn {
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
}

.upload-trigger-btn:hover,
.upload-submit-btn:hover {
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.25);
}

.upload-file-input::file-selector-button {
    margin-right: 1rem;
    border: 0;
    border-radius: 0.75rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    color: #fff;
    font-weight: 600;
}

.upload-file-input::-webkit-file-upload-button {
    margin-right: 1rem;
    border: 0;
    border-radius: 0.75rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    color: #fff;
    font-weight: 600;
}

/* File list scroll area when many files selected */
#uploadFileList {
    max-height: 280px; /* adjust as needed */
    overflow-y: auto;
    padding-right: 8px; /* space for scrollbar */
}

/* Custom scrollbar (WebKit) */
#uploadFileList::-webkit-scrollbar {
    width: 10px;
}
#uploadFileList::-webkit-scrollbar-track {
    background: transparent;
}
#uploadFileList::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(124,58,237,0.25), rgba(109,40,217,0.4));
    border-radius: 10px;
}
#uploadFileList::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(124,58,237,0.35), rgba(109,40,217,0.55));
}

/* Firefox scrollbar styling */
#uploadFileList {
    scrollbar-width: thin;
    scrollbar-color: rgba(109,40,217,0.4) transparent;
}

/* Modal dialog: make body scrollable and footer sticky */
.upload-modal-dialog {
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upload-modal-dialog form {
    overflow-y: auto;
    padding: 1.5rem;
}

.upload-modal-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    position: sticky;
    bottom: 0;
}

/* Ensure buttons inside footer align */
.upload-modal-footer .upload-submit-btn {
    min-width: 140px;
}

/* Upload modal selection state */
[data-upload-category-card][data-selected="true"] {
    border-color: rgba(124, 58, 237, 0.95);
    background: rgba(243, 232, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.65);
}

[data-upload-category-card][data-selected="true"] .upload-card-check {
    display: block;
}

[data-upload-category-card][data-selected="true"] [data-upload-category-icon] {
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.2);
}

/* Small utilities */
.text-muted { color:var(--color-gray-500); }

/* Sticky sidebar with custom scrollbar */
.sticky-sidebar {
    position: sticky;
    top: 80px; /* will be updated by JS to match header height */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px; /* spacing for scrollbar */
}

/* WebKit scrollbar */
.sticky-sidebar::-webkit-scrollbar {
    width: 10px;
}
.sticky-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sticky-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(124,58,237,0.18), rgba(109,40,217,0.32));
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.0);
}
.sticky-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(124,58,237,0.28), rgba(109,40,217,0.5));
}

/* Firefox scrollbar */
.sticky-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(109,40,217,0.32) transparent;
}

/* Ensure inner cards don't overflow the scroll area */
.sticky-sidebar .card,
.sticky-sidebar .share-card {
    margin-bottom: 0.75rem;
}

