* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base Body Styling for Standard Pages */
body {
   background-color: #ecf0f1;
   color: #2c3e50;
   min-height: 100vh;
   display: flex;
   flex-direction: column;
}

/* Global Footer */
footer {
   width: 100%;
   padding: 15px;
   text-align: center;
   background: #2c3e50;
   color: white;
   display: flex;
   justify-content: center;
   gap: 30px;
   margin-top: auto;
   z-index: 20;
}
footer a {
   color: white;
   text-decoration: none;
   font-size: 0.9rem;
}
footer a:hover {
   text-decoration: underline;
}

/* Split Screen Landing Page Overrides */
.home-body {
   overflow: hidden;
}
.home-body footer {
   position: absolute;
   bottom: 0;
   background: rgba(0, 0, 0, 0.4);
}
.container {
   display: flex;
   width: 100vw;
   height: 100vh;
   position: relative;
}
.split {
   width: 50%;
   height: 100%;
   display: flex;
   justify-content: center;
   align-items: center;
   text-decoration: none;
   transition: background 0.5s ease, filter 0.5s ease;
}
.left:hover, .right:hover {
   filter: brightness(0.7);
}
.left {
   background-image: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.85)), url('becoming.jpg');
   background-size: cover;
   background-position: center;
   color: #ecf0f1;
}
.right {
   background-image: linear-gradient(rgba(236, 240, 241, 0.85), rgba(236, 240, 241, 0.85)), url('being.jpg');
   background-size: cover;
   background-position: center;
   color: #2c3e50;
}
h1 {
   font-size: 3rem;
   text-transform: uppercase;
   letter-spacing: 2px;
   text-align: center;
}
.centre-logo {
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   width: 180px;
   height: 180px;
   background-color: white;
   border-radius: 50%;
   box-shadow: 0 4px 15px rgba(0,0,0,0.3);
   z-index: 10;
   overflow: hidden;
   display: flex;
   justify-content: center;
   align-items: center;
}
.centre-logo img {
   width: 100%;
   height: 100%;
   object-fit: cover;
}

/* Centralized Global Burger Menu & Button Styling */
.burger-menu-wrap {
   position: relative;
}
.burger-btn {
   background: #4a5568;
   color: white;
   border: none;
   padding: 8px 12px;
   font-size: 1.4rem;
   border-radius: 6px;
   cursor: pointer;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.burger-menu-content {
   display: none !important;
   position: absolute;
   right: 0;
   top: 40px;
   background: white;
   min-width: 200px;
   box-shadow: 0 8px 24px rgba(0,0,0,0.2);
   border-radius: 6px;
   padding: 8px 0;
   z-index: 1001;
   text-align: left;
}
.burger-menu-content.show {
   display: block !important;
}
.burger-menu-content a {
   display: block;
   padding: 8px 16px;
   color: #333;
   text-decoration: none;
   font-size: 0.95rem;
}
.burger-menu-content a:hover {
   background: #f5f5f5;
}

/* Slide-out Menu Panel (Legacy fallback) */
.side-menu {
   height: 100%;
   width: 0;
   position: fixed;
   z-index: 1000;
   top: 0;
   right: 0;
   background-color: #2c3e50;
   overflow-x: hidden;
   transition: 0.3s ease;
   padding-top: 60px;
   box-shadow: -5px 0 15px rgba(0,0,0,0.5);
   white-space: nowrap;
}
.side-menu a {
   padding: 12px 30px;
   text-decoration: none;
   font-size: 1.2rem;
   color: #ecf0f1;
   display: block;
   transition: 0.2s;
}
.side-menu a:hover {
   color: white;
   background-color: #34495e;
}

.text-content {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
}
.hover-text {
   margin-top: 15px;
   font-size: 1.2rem;
   font-weight: 500;
   opacity: 0;
   transform: translateY(20px);
   transition: opacity 0.4s ease, transform 0.4s ease;
}
.split:hover .hover-text {
   opacity: 1;
   transform: translateY(0);
}

/* --- Classroom Layout --- */
.classroom-body {
   overflow: hidden;
   background-color: #ecf0f1;
}
.classroom-body footer {
   display: none;
}
@keyframes slideInFromLeft {
   0% { transform: translateX(-100vw); opacity: 0; }
   100% { transform: translateX(0); opacity: 1; }
}
.slide-in {
   animation: slideInFromLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.classroom-container {
   display: flex;
   width: 100vw;
   height: 100vh;
   position: relative;
}

/* Classroom Top Logo (Home Link) */
.classroom-logo {
   position: absolute;
   top: 15px;
   left: 50%;
   transform: translateX(-50%);
   width: 75px;
   height: 75px;
   background-color: white;
   border-radius: 8px;
   box-shadow: 0 4px 10px rgba(0,0,0,0.2);
   z-index: 50;
   overflow: hidden;
   display: flex;
   justify-content: center;
   align-items: center;
   text-decoration: none;
   cursor: pointer;
}
.classroom-logo:hover {
   box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}
.brand-img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   transition: opacity 0.3s ease;
}
.home-icon {
   position: absolute;
   font-size: 2.5rem;
   opacity: 0;
   transform: scale(0.5);
   transition: opacity 0.3s ease, transform 0.3s ease;
}
.classroom-logo:hover .brand-img {
   opacity: 0;
}
.classroom-logo:hover .home-icon {
   opacity: 1;
   transform: scale(1);
}

/* Dual Pane Architecture */
.pane {
   padding: 30px;
   height: 100%;
   display: flex;
   flex-direction: column;
}
.pane-left {
   width: 50%;
   background-color: #2c3e50;
   color: #ecf0f1;
   overflow-y: auto;
}
.pane-right {
   width: 50%;
   background-color: #cbd4d9;
   color: #2c3e50;
   display: flex;
   flex-direction: column;
}

/* Draggable Resizer Bar */
.resizer {
   width: 6px;
   background-color: #34495e;
   cursor: col-resize;
   z-index: 40;
   transition: background-color 0.2s;
}
.resizer:hover, .resizer:active {
   background-color: #bdc3c7;
}

/* Pane Headers */
.pane-header {
   margin-bottom: 20px;
}
.pane-header h2 {
   font-size: 1.8rem;
   margin-bottom: 10px;
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
   padding-bottom: 5px;
}
.pane-right .pane-header h2 {
   border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Workspace Header & Status */
.workspace-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
}
.workspace-status {
   display: flex;
   align-items: center;
   gap: 15px;
   margin-bottom: 5px;
}
.status-text {
   font-size: 0.9rem;
   color: #7f8c8d;
   font-weight: 500;
}
.login-btn {
   font-size: 0.85rem;
   color: #e74c3c;
   text-decoration: none;
   font-weight: bold;
}
.login-btn:hover {
   text-decoration: underline;
}

/* Shared Dynamic Area (Libraries & Desktops) */
.dynamic-area {
   flex-grow: 1;
   display: flex;
   flex-direction: column;
   background: white;
   border-radius: 8px;
   box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
   overflow: hidden;
}

/* Library View Styles */
.library-view {
   padding: 20px;
   overflow-y: auto;
   width: 100%;
}
.library-view h3 {
   color: #34495e;
   font-size: 1.1rem;
   margin: 15px 0;
   border-bottom: 1px solid #ecf0f1;
   padding-bottom: 5px;
}
.library-view h3:first-child { margin-top: 0; }
.book-grid {
   display: flex;
   gap: 20px;
   flex-wrap: wrap;
   margin-bottom: 30px;
}
.book-card {
   width: 100px;
   cursor: pointer;
   transition: transform 0.2s;
   text-align: center;
}
.book-card:hover {
   transform: translateY(-5px);
}
.book-cover {
   width: 100%;
   height: 140px;
   background: #2980b9;
   color: white;
   display: flex;
   justify-content: center;
   align-items: center;
   font-size: 2.5rem;
   font-weight: bold;
   border-radius: 2px 6px 6px 2px;
   box-shadow: 3px 4px 10px rgba(0,0,0,0.2);
   margin-bottom: 10px;
   border-left: 6px solid #1c5980;
}
.book-card span {
   font-size: 0.9rem;
   color: #2c3e50;
   font-weight: 600;
   line-height: 1.2;
   display: block;
}
.tool-card {
   display: block;
   padding: 15px;
   background: #27ae60;
   color: white;
   text-align: center;
   text-decoration: none;
   border-radius: 6px;
   font-weight: bold;
   transition: 0.2s;
}
.tool-card:hover { background: #2ecc71; }

/* Workspace Desktop Area */
.workspace-area {
   flex-grow: 1;
   display: flex;
   background: #cbd4d9;
   border-radius: 8px;
   box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
   position: relative;
   overflow: hidden;
}
.desktop-view {
   padding: 25px;
   display: flex;
   gap: 25px;
   align-content: flex-start;
   flex-wrap: wrap;
   width: 100%;
}
.desktop-icon {
   display: flex;
   flex-direction: column;
   align-items: center;
   width: 80px;
   cursor: pointer;
   transition: transform 0.2s;
}
.desktop-icon:hover {
   transform: scale(1.05);
}
.icon-img {
   width: 60px;
   height: 60px;
   background: white;
   border-radius: 12px;
   display: flex;
   justify-content: center;
   align-items: center;
   font-size: 1.8rem;
   box-shadow: 0 4px 8px rgba(0,0,0,0.1);
   margin-bottom: 8px;
}
.add-tool-icon .icon-img {
   background: rgba(255,255,255,0.4);
   border: 2px dashed #7f8c8d;
   color: #7f8c8d;
   box-shadow: none;
}
.desktop-icon span {
   color: #2c3e50;
   font-size: 0.9rem;
   font-weight: 600;
   text-align: center;
}

/* App Windows (Used by both sides) */
.app-window {
   width: 100%;
   height: 100%;
   display: flex;
   flex-direction: column;
   background: white;
   animation: appOpen 0.2s ease-out;
}
@keyframes appOpen {
   from { opacity: 0; transform: scale(0.98); }
   to { opacity: 1; transform: scale(1); }
}
.app-header {
   background: #34495e;
   color: white;
   padding: 10px 15px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-weight: bold;
   font-size: 0.95rem;
}
.close-btn {
   background: #e74c3c;
   border: none;
   color: white;
   border-radius: 50%;
   width: 24px;
   height: 24px;
   cursor: pointer;
   display: flex;
   justify-content: center;
   align-items: center;
   font-size: 0.8rem;
   transition: background 0.2s;
}
.close-btn:hover {
   background: #c0392b;
}
.app-content {
   padding: 20px;
   flex-grow: 1;
   color: #2c3e50;
}
.reading-panel {
   flex-grow: 1;
   padding: 20px;
   display: flex;
   justify-content: center;
   align-items: center;
   color: #7f8c8d;
}
#ba-notes {
   flex-grow: 1;
   padding: 20px;
   border: none;
   resize: none;
   font-family: inherit;
   font-size: 1.05rem;
   background: transparent;
   color: #2c3e50;
}
#ba-notes:focus { outline: none; }
.radio-placeholder {
   padding: 15px;
   background: rgba(0,0,0,0.2);
   text-align: center;
   border-radius: 6px;
   border: 1px dashed #7f8c8d;
   font-size: 0.9rem;
}

/* --- Modal Styles --- */
.modal-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
   background: rgba(44, 62, 80, 0.75);
   backdrop-filter: blur(5px);
   display: none;
   justify-content: center;
   align-items: center;
   z-index: 99999;
   opacity: 0;
   transition: opacity 0.3s ease;
}
.modal-overlay.active {
   display: flex !important;
   opacity: 1;
   pointer-events: auto;
}
.modal-container {
   background: #ffffff;
   width: 100%;
   max-width: 400px;
   padding: 30px;
   border-radius: 10px;
   box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
   position: relative;
   transform: translateY(15px);
   transition: transform 0.3s ease;
   text-align: center;
}
.modal-close {
   position: absolute;
   top: 12px;
   right: 18px;
   background: none;
   border: none;
   font-size: 1.6rem;
   color: #7f8c8d;
   cursor: pointer;
}
.modal-close:hover {
   color: #2c3e50;
}
.modal-container h3 {
   font-size: 1.5rem;
   color: #2c3e50;
   margin-bottom: 8px;
}
.modal-container p {
   color: #7f8c8d;
   font-size: 0.9rem;
   margin-bottom: 25px;
   line-height: 1.4;
}

/* Social Login Buttons */
.social-login-group {
   display: flex;
   flex-direction: column;
   gap: 12px;
}
.social-login-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 12px;
   width: 100%;
   padding: 12px 16px;
   border-radius: 6px;
   font-size: 0.95rem;
   font-weight: 600;
   text-decoration: none;
   cursor: pointer;
   transition: background 0.2s, box-shadow 0.2s;
   border: 1px solid #dcdde1;
}
.google-btn {
   background: #ffffff;
   color: #2f3640;
}
.google-btn:hover {
   background: #f8f9fa;
   box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.linkedin-btn {
   background: #0a66c2;
   color: #ffffff;
   border-color: #0a66c2;
}
.linkedin-btn:hover {
   background: #004182;
}

/* Responsive adjustments */
@media (max-width: 900px) {
   .classroom-container { flex-direction: column; }
   .pane-left, .pane-right { width: 100%; height: 50%; }
}

/* Template Layout Helpers */
.page-header {
    padding: 20px 40px;
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-title {
    margin: 0;
    font-size: 1.5rem;
}
.back-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}
.back-link:hover {
    text-decoration: underline;
}
.content-container {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.content-container-fluid {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}
.formatted-content {
    line-height: 1.6;
    color: #333;
    margin-top: 20px;
    white-space: pre-wrap;
}
.news-article {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.news-date {
    color: #718093;
    display: block;
    margin-bottom: 16px;
}
.news-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.empty-state {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}
@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}
.admin-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.admin-card h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: #2c3e50;
    border-bottom: 2px solid #f1f2f6;
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #4b6584;
    font-size: 0.9rem;
}
.form-group input[type="text"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #dcdde1;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.btn-primary {
    background: #2980b9;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.btn-primary:hover {
    background: #2471a3;
}
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-danger:hover {
    background: #c0392b;
}
.admin-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.admin-news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f2f6;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th, .admin-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f2f6;
    text-align: left;
}
.admin-table th {
    background: #f8f9fa;
    color: #2c3e50;
}
.badge {
    background: #f1f2f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}