/* =========================================
   1. VARIABLES & COLOR THEME
   ========================================= */
:root {
    --primary-color: #007bff;
    --bg-color: #f0f4f8;
    --text-color: #050505;
    --card-bg: #ffffff;
    --secondary-text: #6c757d;
    --border-color: rgba(0,123,255,0.1);
    --input-bg: #fff;
    --text-purple: #6f42c1;
    --text-orange: #fd7e14;
    --danger-color: #dc3545;
    --success-color: #198754;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #3d8bfd;
    --bg-color: #121212;
    --text-color: #e4e6eb;
    --card-bg: #1e1e1e;
    --secondary-text: #b0b3b8;
    --border-color: rgba(255,255,255,0.1);
    --input-bg: #1e1e1e;
}

/* Global Body Styles */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 80px; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    transition: background-color 0.3s ease;
}

/* =========================================
   2. HEADER & NAVIGATION STYLES
   ========================================= */
/* Top Header Fixed */
.top-header { 
    height: 60px; 
    background-color: var(--card-bg); 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); 
    padding: 0 15px; 
    z-index: 1000; 
}

/* App Logo Style */
.app-logo { 
    font-size: 1.6rem; 
    font-weight: 800; 
    color: var(--primary-color); 
    text-decoration: none; 
}

/* Header Icons */
.header-icon { 
    font-size: 1.5rem; 
    cursor: pointer; 
    position: relative; 
}

/* Bottom Navigation Bar */
.bottom-nav { 
    background-color: var(--card-bg); 
    box-shadow: 0 -1px 3px rgba(0,0,0,0.05); 
    height: 60px; 
    padding: 0 5px; 
    border-top-left-radius: 12px; 
    border-top-right-radius: 12px; 
    z-index: 1000;
}

/* Nav Items */
.nav-item-custom { 
    cursor: pointer; 
    color: var(--secondary-text); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    width: 20%; 
    height: 100%; 
    transition: color 0.2s;
}

.nav-item-custom i { 
    font-size: 1.4rem; 
    margin-bottom: 2px; 
}

.nav-item-custom span { 
    font-size: 0.65rem; 
    font-weight: 600; 
    display: none; /* Hidden by default */
}

/* Active Nav State */
.nav-item-custom.active { 
    color: var(--primary-color); 
}

.nav-item-custom.active span { 
    display: block; /* Show text when active */
}

/* =========================================
   3. COMMON CARD & UTILITY STYLES
   ========================================= */
/* Generic Card Style */
.custom-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    box-shadow: 0 1px 3px var(--border-color); 
    border: none; 
    margin-bottom: 12px; 
}

/* Small Avatar Image */
.user-avatar-small { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover; 
}

/* Content Sections (Hidden by default) */
.content-section { 
    display: none; 
    padding-top: 2px; 
}

/* content-box */
.content-box {
    padding-top: 70px;
}
/* Sub Header for Inner Pages */
.sub-header-styled { 
    height: 60px; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    background-color: var(--card-bg); 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 1020; 
    color: var(--text-color);
}

/* =========================================
   4. POST CARD SPECIFIC STYLES
   ========================================= */
/* Gradient Text Box (New Design) */
.styled-text-container { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    min-height: 220px; 
    padding: 20px; 
    border-radius: 12px; 
    color: #fff; 
    font-weight: 700; 
    font-size: 19px; 
    line-height: 1.4; 
}

.bg-gradient-blue { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
}

/* Post Footer Actions */
.post-actions i { 
    font-size: 1.2rem; 
    margin-right: 4px; 
}

.post-actions span {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Media Container */
.post-media-container { 
    margin-top: 10px; 
    border-radius: 12px; 
    overflow: hidden; 
    border: 1px solid var(--border-color); 
}

.post-media-img { 
    width: 100%; 
    height: auto; 
    display: block; 
    object-fit: cover; 
}

/* =========================================
   5. QUIZ, POLL & FLASHCARD STYLES (FEED)
   ========================================= */
/* MCQ Option Buttons */
.mcq-option { 
    width: 100%; 
    text-align: left; 
    padding: 10px 15px; 
    border: 1px solid var(--border-color); 
    background-color: var(--card-bg); 
    border-radius: 20px; 
    color: var(--text-color); 
    font-weight: 500; 
    transition: 0.2s; 
    margin-bottom: 5px; 
}

/* MCQ Correct/Wrong States */
.mcq-option.correct-answer { 
    background-color: #d1e7dd !important; 
    border-color: #198754 !important; 
    color: #0f5132 !important; 
}

.mcq-option.wrong-answer { 
    background-color: #f8d7da !important; 
    border-color: #dc3545 !important; 
    color: #842029 !important; 
}

/* Poll Buttons */
.poll-btn {
    border-radius: 8px;
    padding: 10px;
    color: var(--text-color);
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.poll-btn.correct { background-color: #d1e7dd; border-color: #198754; color: #0f5132; }
.poll-btn.wrong { background-color: #f8d7da; border-color: #dc3545; color: #842029; }

/* Flashcard 3D Flip Effect */
.flashcard-wrapper { perspective: 1000px; width: 100%; height: 250px; }
.flashcard-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; cursor: pointer; border-radius: 16px; }
.flashcard-inner.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 1px solid var(--border-color); }
.flashcard-front { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); color: #fff; }
.flashcard-back { background-color: var(--card-bg); color: var(--text-color); transform: rotateY(180deg); border: 2px solid #a18cd1; }
.flashcard-hint { background: rgba(0,0,0,0.15); padding: 5px 12px; border-radius: 20px; font-size: 11px; margin-top: 10px; }

/* --- UPDATED: Solution Box (Animation & Style) --- */
.solution-content {
    display: none; /* Hidden by default */
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border-left: 5px solid #28a745; /* Green Indicator */
    background-color: #f1f8f3; /* Light Green Background */
    animation: slideDown 0.3s ease-out;
}

.solution-box {
    padding: 12px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   6. STUDY TAB GRID STYLES
   ========================================= */
/* Study Grid Icons */
.study-grid-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    padding: 12px 2px; 
    text-align: center; 
    box-shadow: 0 1px 3px var(--border-color); 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    transition: transform 0.1s;
}

.study-grid-card:active { transform: scale(0.96); }

.study-icon-sm { font-size: 1.5rem; margin-bottom: 5px; }
.study-title-sm { font-size: 0.75rem; font-weight: 600; color: var(--text-color); }

/* Updates Card */
.update-card { background-color: var(--card-bg); border-radius: 10px; padding: 10px; box-shadow: 0 1px 2px var(--border-color); cursor: pointer; }
.update-icon-box { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; border: 1px solid; }

/* PDF List Item */
.pdf-list-item { display: flex; align-items: center; background: var(--card-bg); padding: 12px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px var(--border-color); }
.pdf-icon-box { width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; background-color: #e7f1ff; border-radius: 8px; margin-right: 15px; flex-shrink: 0; }
.pdf-icon-box i { font-size: 1.5rem; color: var(--primary-color); }

/* Study Sub-Views */
.study-sub-view { display: none; }

.studytabtitle {
    text-align:left  ;
    background: none;
    text-color: white;
    margin-bottom: 15px;
    font-size: 20px;
}

/* ===================================
   7. PROFILE & MENU STYLES
   ======================================= */
/* Profile Header Card */
.profile-card { 
    background: var(--card-bg); 
    border-radius: 16px; 
    padding: 30px 20px; 
    text-align: center; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    margin-bottom: 20px; 
}

.img-wrap { position: relative; width: 100px; height: 100px; margin: 0 auto 15px; }
.profile-pic-big { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--card-bg); }
.edit-icon { position: absolute; bottom: 0; right: 0; background: var(--primary-color); color: white; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--card-bg); font-size: 14px; }

.user-name { font-size: 20px; font-weight: 700; margin-bottom: 2px; color: var(--text-color); }
.user-handle { font-size: 14px; color: var(--secondary-text); margin-bottom: 25px; }

.stats-row { display: flex; justify-content: space-around; padding: 0 10px; }
.stat-num { display: block; font-size: 18px; font-weight: 700; color: var(--primary-color); }
.stat-label { font-size: 0.8rem; color: var(--secondary-text); }

/* Menu List Card */
.menu-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 30px; }
.menu-item { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-color); cursor: pointer; color: var(--text-color); }
.menu-icon { width: 36px; height: 36px; background: var(--primary-color); color: white; border-radius: 50%; display: grid; place-items: center; margin-right: 15px; font-size: 16px; }
.menu-text { font-size: 16px; font-weight: 500; flex-grow: 1; }

/* Logout Button (Small & Centered) */
.btn-logout { width: auto; min-width: 150px; padding: 10px 40px; margin: 0 auto; display: block; border-radius: 30px; border: none; color: white; background: #dc3545; font-weight: 600; }

/* =========================================
   8. SETTINGS PAGE STYLES
   ========================================= */
.section-label { font-size: 13px; font-weight: 600; color: var(--secondary-text); margin: 20px 0 8px 12px; text-transform: uppercase; }
.card-group { background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px var(--border-color); }

.item { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-color); background: var(--card-bg); cursor: pointer; }
.item:last-child { border-bottom: none; }

.item-left { display: flex; align-items: center; gap: 15px; }
.item-icon { width: 24px; color: var(--text-color); font-size: 18px; text-align: center; }
.item-title { font-size: 16px; font-weight: 500; color: var(--text-color); }

/* Toggle Switch */
.toggle { width: 44px; height: 24px; background: #e4e6eb; border-radius: 20px; position: relative; transition: 0.3s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: 0.3s; }
.item.active .toggle { background: var(--primary-color); }
.item.active .toggle::after { transform: translateX(20px); }
[data-theme="dark"] .toggle { background: #3a3b3c; }

/* =========================================
   9. EDIT PROFILE STYLES
   ========================================= */
.edit-dp-wrapper { width: 110px; height: 110px; margin: 10px auto 25px; position: relative; }
.edit-dp-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--card-bg); }
.edit-cam-badge { position: absolute; bottom: 0; right: 0; background: var(--primary-color); color: white; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--card-bg); }

/* Form Floating Input Fixes for Dark Mode */
#account-center .form-floating > .form-control { background-color: transparent !important; border: 1px solid var(--border-color); color: var(--text-color); border-radius: 12px; height: 58px; box-shadow: none; }
#account-center .form-floating > label { background-color: transparent !important; color: var(--secondary-text); padding-left: 15px; }
#account-center .form-floating > label::after { background-color: transparent !important; }
#account-center .form-floating > .form-control:focus ~ label, #account-center .form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--primary-color) !important; font-weight: 600; opacity: 1; transform: scale(0.85) translateY(-0.7rem) translateX(0.15rem); }
.btn-update-profile { background: var(--primary-color); color: white; border: none; padding: 15px; border-radius: 12px; width: 100%; font-weight: 700; }

/* =========================================
   10. KEBAB MENU & EXTRAS
   ========================================= */
.menu-handle { width: 100px; height: 4px; background: #cfd9de; border-radius: 4px; margin: 0 auto; }
.menu-list-item { padding: 12px 20px; display: flex; align-items: center; color: var(--text-color); font-size: 15px; font-weight: 500; cursor: pointer; }
.menu-list-item i { font-size: 1.3rem; margin-right: 15px; color: var(--secondary-text); }
.menu-list-item.danger-item { color: #f4212e; } 
.menu-list-item.danger-item i { color: #f4212e; }
.menu-divider { border-top: 1px solid var(--border-color); margin: 4px 0; }
.menu-divider-thick { border-top: 6px solid var(--bg-color); margin: 8px 0; }
.menu-cancel-btn { justify-content: center; font-weight: 700; padding-top: 15px; }
.offcanvas-bottom { height: auto !important; max-height: 75vh; border-top-left-radius: 20px; border-top-right-radius: 20px; }
.search-tag { background-color: #e7f1ff; border: 1px solid var(--border-color); padding: 5px 12px; border-radius: 20px; font-size: 0.85rem; color: var(--primary-color); cursor: pointer; font-weight: 500; }

/* =======================================================================
   11. NEW CREATE POST TOOL STYLES (ALIGNMENT RULES)
   ======================================================================= */

/* Create Post Modal Overlay */
#create-post-modal { display: none; z-index: 2000; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; overflow-y: auto; }

/* Main Text Area (Wrapper Logic Added) */
#main-textarea { 
    resize: none; 
    overflow: hidden; 
    min-height: 100px; 
    transition: all 0.3s ease; 
}

/* --- UPDATED: Text Alignment Rules (Clean vs Colorful) --- */

/* Rule 1: Colourless (Default/White) -> Left & Top */
#text-editor-wrapper.style-clean {
    background: var(--card-bg); 
    display: block;
    padding-top: 10px;
    min-height: 150px;
    border: 1px solid var(--border-color);
}
#text-editor-wrapper.style-clean textarea {
    text-align: left !important;
    color: var(--text-color) !important;
    margin-top: 0;
}

/* Rule 2: Colourful -> Center & Center */
#text-editor-wrapper.style-colorful {
    display: flex;
    align-items: center; /* Vertical Center */
    justify-content: center; /* Horizontal Center */
    min-height: 250px; /* Bigger height for focus */
    color: #fff;
    transition: background 0.3s ease;
    border: none;
}
#text-editor-wrapper.style-colorful textarea {
    text-align: center !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 1.4rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Dynamic Inputs Area (Wrapper for Quiz/Poll fields) */
#dynamic-input-area { 
    background: var(--bg-color); 
    padding: 15px; 
    border-radius: 12px; 
    border: 1px solid var(--border-color); 
    margin-bottom: 15px; 
}

/* Smart Inputs (Auto Expand Style) */
.cp-input { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 10px; 
    border: 1px solid #ced4da; 
    border-radius: 8px; 
    font-size: 14px; 
    background: var(--card-bg); 
    color: var(--text-color);
    resize: none; 
    overflow: hidden; 
    min-height: 46px; 
    line-height: 1.5; 
    font-family: inherit; 
    transition: 0.2s; 
}
.cp-input:focus { border-color: var(--primary-color); outline: none; }
.cp-label { font-size: 11px; font-weight: 800; color: var(--secondary-text); text-transform: uppercase; margin-bottom: 5px; display: block; letter-spacing: 0.5px; }

/* Chips (New Scrollable Design) */
.chip-container { display: flex; justify-content: space-between; gap: 6px; width: 100%; }
.chip-btn { padding: 8px 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; font-size: 12px; font-weight: 600; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.2s; color: var(--secondary-text); }
.chip-btn i { font-size: 18px; margin-bottom: 2px; }
.chip-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.chip-btn.active i { color: #fff !important; }

/* Color Picker (New Advanced Grid) */
.quick-palette { display: flex; gap: 10px; align-items: center; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; }
.color-circle { width: 35px; height: 35px; border-radius: 50%; cursor: pointer; border: 2px solid #eee; transition: transform 0.2s; flex-shrink: 0; }
.color-circle.active-circle { transform: scale(1.15); border-color: #333 !important; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.picker-btn { width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); border: 2px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; }

#extended-picker { background: var(--card-bg); border-radius: 12px; padding: 10px; border: 1px solid var(--border-color); margin-top: 10px; display: none; }
.picker-tabs { display: flex; background: var(--bg-color); padding: 4px; border-radius: 8px; margin-bottom: 10px; }
.tab-btn { flex: 1; text-align: center; padding: 6px; font-size: 13px; font-weight: bold; cursor: pointer; border-radius: 6px; color: var(--secondary-text); transition: 0.2s; }
.tab-btn.active { background: var(--card-bg); color: var(--text-color); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-height: 250px; overflow-y: auto; }
.grid-item { width: 100%; padding-top: 100%; border-radius: 8px; cursor: pointer; border: 1px solid rgba(0,0,0,0.1); }

/* Elements for New Tool */
.upload-box { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 30px; text-align: center; color: var(--secondary-text); background: var(--card-bg); cursor: pointer; transition: 0.2s; }
.upload-box:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--bg-color); }
.quiz-opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.quiz-radio { width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary-color); }







anna { 
  padding: 500px;
  margin: 600px;
  
}
