/* Preserve existing styles, just adding new ones */
.eduhub-manager-wrapper { 
    font-family: 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif; 
    max-width: 1200px; 
    margin: 0 auto; 
    background: #fff; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); 
}

/* --- FLASH CARDS --- */
.eduhub-context-header { margin-bottom: 30px; border-bottom: 2px solid #f0f0f0; padding-bottom: 20px; }
.eduhub-context-header h3 { margin-top:0; margin-bottom:15px; color:#444; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; }
.eduhub-cards-container { display: flex; gap: 15px; flex-wrap: wrap; justify-content: space-between; }
.eduhub-flash-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 20px 15px;
    flex: 1; min-width: 160px; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.02); position: relative; overflow: hidden;
}
.eduhub-flash-card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px rgba(0,0,0,0.1); border-color: #b0d4f1; }
.eduhub-flash-card.active-card { background: linear-gradient(135deg, #0073aa 0%, #00608d 100%); color: white; border-color: #005177; box-shadow: 0 8px 15px rgba(0,115,170,0.25); }
.eduhub-flash-card.active-card .card-sub { color: #dceefb; }
.card-icon { font-size: 32px; margin-bottom: 12px; }
.eduhub-flash-card.active-card .card-icon i { color: #ffffff !important; }
.card-title { font-weight: 700; font-size: 15px; margin-bottom: 5px; line-height: 1.2; }
.card-sub { font-size: 13px; color: #777; font-weight: 500; }

/* Tabs */
.eduhub-tabs { overflow-x: auto; white-space: nowrap; border-bottom: 2px solid #f0f0f0; margin-bottom: 25px; -webkit-overflow-scrolling: touch; }
.eduhub-tab-link { background-color: transparent; display: inline-block; border: none; outline: none; cursor: pointer; padding: 14px 24px; transition: 0.3s; font-size: 15px; font-weight: 600; color: #666; }
.eduhub-tab-link:hover { color: #0073aa; background-color: #f9f9f9; }
.eduhub-tab-link.active { border-bottom: 3px solid #0073aa; color: #0073aa; background: transparent; }
.eduhub-tab-content { display: none; animation: fadeEffect 0.4s; }
@keyframes fadeEffect { from {opacity: 0; transform: translateY(5px);} to {opacity: 1; transform: translateY(0);} }

/* Settings Grid */
.eduhub-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.eduhub-card.settings-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; }
.settings-header { background: #f8f9fa; padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 10px; border-radius: 10px 10px 0 0; }
.settings-header i { font-size: 18px; color: #0073aa; opacity: 0.8; }
.settings-header h3 { margin: 0; font-size: 16px; color: #333; font-weight: 600; }
.settings-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }

/* Inputs */
.input-group { display: flex; gap: 8px; margin-bottom: 20px; }
.input-group input { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.eduhub-select, .eduhub-input, .eduhub-textarea { width: 100%; padding: 8px 12px; margin-bottom: 18px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; font-size: 14px; background: #fff; }
.eduhub-textarea { font-family: inherit; line-height: 1.5; resize: vertical; }
.eduhub-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* Resource Cards */
.eduhub-resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; margin-top: 20px; }
.eduhub-resource-card { background: #fff; border: 1px solid #f0f0f0; border-radius: 16px; display: flex; flex-direction: column; box-shadow: 0 4px 12px rgba(0,0,0,0.03); transition: all 0.3s; overflow: hidden; position: relative; padding-bottom: 4px; }
.eduhub-resource-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.eduhub-resource-card::before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #0073aa, #00b0ff); z-index: 2; }

.eduhub-manager-wrapper .card-header { padding: 15px 15px 5px 15px; background: #fff; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eduhub-manager-wrapper .card-body { padding: 5px 15px 15px 15px; flex-grow: 1; display: flex; flex-direction: column; }
.eduhub-manager-wrapper .card-chapter-title { margin: 5px 0 0 0; font-size: 16px; color: #222; font-weight: 700; }
.eduhub-manager-wrapper .card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #999; margin-top: 8px; }

/* Badges */
.eduhub-manager-wrapper .badge { padding: 4px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.eduhub-manager-wrapper .badge-class { background: #e3f2fd; color: #0277bd; border: 1px solid rgba(2, 119, 189, 0.1); }
.eduhub-manager-wrapper .badge-subject { background: #e8f5e9; color: #2e7d32; border: 1px solid rgba(46, 125, 50, 0.1); }

/* Footer & Buttons */
.eduhub-manager-wrapper .card-footer { padding: 10px 15px; background: #fbfbfb; border-top: 1px solid #f5f5f5; }
.eduhub-manager-wrapper .card-actions-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.eduhub-manager-wrapper .card-btn { padding: 6px 12px; border: none; border-radius: 6px; font-size: 11px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

.eduhub-manager-wrapper .btn-link { background: #f0f7ff; color: #0073aa; } 
.eduhub-manager-wrapper .btn-link:hover { background: #0073aa; color: #fff; }
.eduhub-manager-wrapper .btn-embed { background: #f0fdf4; color: #15803d; } 
.eduhub-manager-wrapper .btn-embed:hover { background: #15803d; color: #fff; }
.eduhub-manager-wrapper .btn-edit { background: #fffbeb; color: #b45309; } 
.eduhub-manager-wrapper .btn-delete { background: #fef2f2; color: #b91c1c; } 
.eduhub-manager-wrapper .btn-primary { background: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; }

/* Modal */
.eduhub-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.eduhub-modal-content { background-color: #fefefe; margin: 5% auto; padding: 25px; border: none; width: 90%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; animation: slideDown 0.3s ease-out; }
.eduhub-close { color: #aaa; float: right; font-size: 24px; font-weight: bold; cursor: pointer; line-height: 1; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Lists */
.eduhub-item-list { list-style: none; padding: 0; margin: 0; max-height: 350px; overflow-y: auto; }
.eduhub-item-list li { background: #ffffff; border: 1px solid #f0f0f0; margin-bottom: 8px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; border-radius: 6px; font-size: 14px; gap: 10px; }
.icon-btn { cursor: pointer; font-size: 13px; color: #aaa; padding: 5px; }
.icon-btn:hover { color: #555; }

/* WP Editor Z-Index Fix */
.wp-editor-wrap { position: relative; z-index: 10; }
#wp-link-wrap, #wp-media-modal { z-index: 100000 !important; }
.mce-floatpanel { z-index: 100001 !important; }

/* --- FULL SCREEN READER --- */
.eduhub-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 99999;
    overflow: hidden;
}
.eduhub-reader-container {
    display: flex;
    height: 100vh;
    width: 100%;
}
.eduhub-reader-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.reader-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f0f2f5;
}
.reader-sidebar-header h4 { margin: 0; color: #444; }

.reader-toc {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
.reader-toc ul { list-style: none; padding: 0; margin: 0; }
.reader-toc li { margin-bottom: 8px; }
.reader-toc a { text-decoration: none; color: #555; font-size: 14px; transition: 0.2s; display: block; padding: 6px 10px; border-radius: 4px; }
.reader-toc a:hover { color: #0073aa; background: #eef5f9; }
.reader-toc a.toc-active { background: #0073aa; color: #fff; font-weight: 600; }

/* Indentations for subheaders */
.toc-h2 { margin-left: 10px; font-size: 13px; }
.toc-h3 { margin-left: 20px; font-size: 12px; }

.eduhub-reader-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    position: relative;
}
.reader-top-bar {
    padding: 15px 30px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.reader-top-bar h2 { margin: 0; font-size: 20px; color: #0073aa; }
.reader-actions button {
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
}
.btn-close-reader { background: #fef2f2; color: #b91c1c; }
.btn-close-reader:hover { background: #b91c1c; color: #fff; }
.btn-print { background: #f0f7ff; color: #0073aa; }
.btn-print:hover { background: #0073aa; color: #fff; }

/* Progress Bar */
.reader-progress-container { width: 100%; height: 4px; background: #f0f0f0; }
.reader-progress-fill { height: 100%; width: 0%; background: #0073aa; transition: width 0.1s; }

.reader-body-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 60px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.8;
    color: #222;
    scroll-behavior: smooth;
}
.reader-body-content img { max-width: 100%; height: auto; display: block; margin: 20px auto; border-radius: 4px; }
.reader-body-content h1, .reader-body-content h2, .reader-body-content h3 { color: #111; margin-top: 40px; margin-bottom: 15px; font-family: 'Segoe UI', sans-serif; scroll-margin-top: 100px; }

/* Floating Nav */
.reader-floating-nav {
    position: absolute;
    bottom: 30px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}
.reader-floating-nav button {
    width: 45px; height: 45px;
    border-radius: 50%;
    border: none;
    background: #0073aa;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.reader-floating-nav button:hover { transform: scale(1.1); background: #00608d; }
.reader-floating-nav button:active { transform: scale(0.95); }

/* Responsive Reader */
@media (max-width: 768px) {
    .eduhub-reader-sidebar { display: none; }
    .reader-body-content { padding: 20px; }
    .reader-floating-nav { bottom: 20px; right: 20px; }
    .reader-floating-nav button { width: 40px; height: 40px; font-size: 16px; }
}