        /* ==================== GLOBAL STYLES ==================== */
        :root {
            --primary-color: #007bff;
            --bg-color: #f0f4f8;
            --text-color: #050505;
            --card-bg: #ffffff;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            padding-bottom: 80px;
            padding-top: 20px; 
            font-family: 'Segoe UI', sans-serif;
        }

        /* --- FEED STYLES --- */
        .custom-card {
            background: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-bottom: 12px;
            border: none;
        }
        .user-avatar-small { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
        
        /* Flashcard Animation */
        .flashcard-wrapper { perspective: 1000px; height: 200px; cursor: pointer; }
        .flashcard-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
        .flashcard-inner.flipped { transform: rotateY(180deg); }
        .flashcard-front, .flashcard-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border: 1px solid #ddd; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; padding: 20px; }
        .flashcard-back { transform: rotateY(180deg); background: #f8f9fa; border-color: var(--primary-color); }

        /* --- CREATE POST TOOL STYLES --- */
        #create-post-modal { display: none; z-index: 2000; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fff; overflow-y: auto; }
        .sub-header-styled { height: 60px; background: #fff; display: flex; align-items: center; padding: 0 15px; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #eee; }
        
        /* Main Text Area */
        #main-textarea { resize: none; transition: all 0.3s ease; overflow: hidden; min-height: 100px; }

        /* Dynamic Input Area */
        #dynamic-input-area { background: #f8f9fa; padding: 15px; border-radius: 12px; border: 1px solid #e9ecef; margin-bottom: 15px; }
        
        /* Smart Inputs */
        .cp-input { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px solid #ced4da; border-radius: 8px; font-size: 14px; background: #fff; transition: 0.2s; resize: none; overflow: hidden; min-height: 46px; line-height: 1.5; font-family: inherit; }
        .cp-input:focus { border-color: var(--primary-color); outline: none; }
        .cp-label { font-size: 11px; font-weight: 800; color: #6c757d; text-transform: uppercase; margin-bottom: 5px; display: block; letter-spacing: 0.5px; }

        /* Chips */
        .chip-container { display: flex; justify-content: space-between; gap: 6px; width: 100%; }
        .chip-btn { padding: 8px 0; background: #fff; border: 1px solid #ddd; 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; }
        .chip-btn i { font-size: 18px; margin-bottom: 2px; }
        .chip-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

        /* ==================== COLOR PICKER GRID STYLES ==================== */
        .quick-palette { 
            display: grid; 
            grid-template-columns: repeat(6, 1fr); /* 6 Items in Top Row */
            gap: 10px; 
            align-items: center; 
            margin-bottom: 10px;
        }
        
        #extended-picker { 
            display: none; 
            grid-template-columns: repeat(6, 1fr); /* 6 Items in Hidden Rows */
            gap: 10px; 
            margin-top: -10px; 
            padding-top: 10px;
        }

        .color-circle { 
            width: 100%; 
            aspect-ratio: 1 / 1; 
            border-radius: 50%; 
            cursor: pointer; 
            border: 2px solid #eee; 
            transition: transform 0.2s; 
        }
        .color-circle.active-circle { 
            transform: scale(1.15); 
            border-color: #333 !important; 
            box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
            z-index: 5;
        }

        .picker-toggle-btn { 
            width: 100%; 
            aspect-ratio: 1 / 1;
            border-radius: 50%; 
            background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); 
            border: 2px solid #fff; 
            box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
            cursor: pointer; 
            display: flex; align-items: center; justify-content: center; 
            color: white; font-size: 1.2rem; 
        }

        .upload-box { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 30px; text-align: center; color: #6c757d; background: #fff; cursor: pointer; }
        .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); }