/* =============================================
   ARYABHATT MATICS - COMPLETE STYLES
   ============================================= */

.hidden { display: none !important; }
#3d-canvas-container, #graph-canvas-wrap { 
    position: relative;
    border-radius: 20px !important; 
    overflow: hidden !important; 
    transform: translateZ(0); 
    -webkit-transform: translateZ(0); 
    mask-image: radial-gradient(white, black); 
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    background: #0b2545;
}
#3d-canvas-container canvas, #graph-canvas-wrap canvas {
    border-radius: 20px !important;
    display: block;
}

:root {
    --bg-main: #f4ecd8;
    --primary-dark: #0b2545;
    --primary-blue: #13315c;
    --accent-orange: #d06020;
    --accent-light: #e88a52;
    --text-dark: #1a1a1a;
    --text-light: #f4ecd8;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.15);
    --primary: #0b2545;
    --heading-color: #0b2545;
}

body.dark-theme {
    --bg-main: #121212;
    --primary-dark: #1f1f1f;
    --primary-blue: #2a2a2a;
    --text-dark: #e0e0e0; /* Light text for readability */
    --text-light: #1a1a1a;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.5);
    --primary: #121212;
    --heading-color: #d1dbe8;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3 { color: var(--heading-color) !important; }
body.dark-theme span[style*="--primary-dark"] { color: var(--heading-color) !important; }

body {
    color: var(--text-dark);
}

/* Background of body outside the app container */
body.dark-theme { background-color: #000; }
body.dark-theme .bottom-nav { background: var(--card-bg); color: var(--text-dark); border-top: 1px solid #333; box-shadow: 0 -2px 15px rgba(0,0,0,0.5); }
body.dark-theme .tabs { background: var(--card-bg); }
body.dark-theme .card-shadow { background: var(--card-bg); }
body.dark-theme .search-bar { background: var(--card-bg); border: 1px solid #333; }
body.dark-theme .chat-container { background: var(--card-bg); }
body.dark-theme .chat-input-area { background: #181818; border-top: 1px solid #333; }
body.dark-theme .chat-input-area input { background: #222; color: #fff; border: 1px solid #444; }
body.dark-theme .modern-select, body.dark-theme .conv-input, body.dark-theme .input-row input { background: #222; color: #fff; border: 1.5px solid #444; }
body.dark-theme .poly-coeff-grid input { background: #222; color: #fff; border: 1.5px solid #444; }
body.dark-theme .c-btn { background: #222; color: #fff; border: 1px solid #333; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
body.dark-theme .c-btn:hover { background: #333; }
body.dark-theme .calc-display { background: #111; color: #4af; text-shadow: 0 0 5px rgba(68,170,255,0.4); box-shadow: inset 0 2px 6px rgba(0,0,0,0.5); }
body.dark-theme .tool-icon-wrap { background: var(--card-bg); }
body.dark-theme .nav-item { color: #888; }
body.dark-theme .nav-item.active { color: var(--accent-light); }

/* Specific Dark Theme Fixes for Content Visibility */
body.dark-theme .message.ai .bubble { background: #1f1f1f !important; color: #fff !important; border: 1px solid #444 !important; }
body.dark-theme .message.user .bubble { background: #0b2545 !important; color: #fff !important; }
body.dark-theme .conv-row input:disabled { color: #4af !important; background: #111 !important; border: 1px solid #444 !important; }
body.dark-theme #fin-inputs { background: #222 !important; border: 1px solid #444 !important; }
body.dark-theme .fin-input-group input { background: #111 !important; color: #fff !important; border: 1px solid #444 !important; }
body.dark-theme #fin-result { color: #4af !important; }
body.dark-theme .result-box { color: #4af !important; }
body.dark-theme #profile-edit-btn { color: #88c0d0 !important; }
body.dark-theme #home-search-results { color: #e0e0e0 !important; }
body.dark-theme #analytics-total { color: #4af !important; }
body.dark-theme #analytics-avg { color: #e67e22 !important; }
body.dark-theme #analytics-best { color: #2ecc71 !important; }

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background-color: #c8cdd5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    overflow: hidden;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    background-color: var(--bg-main);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

/* Subtle grid background */
.app-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    pointer-events: none;
}

/* ---- VIEWS ---- */
.view {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 56px;
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    background-color: transparent;
}
.view.active { transform: translateX(0); z-index: 2; }

/* ---- HOME HEADER ---- */
.main-header {
    background: var(--primary-dark);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    padding: 20px 20px 22px;
    position: relative;
    z-index: 5;
    box-shadow: var(--shadow-strong);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.logo-area { display: flex; align-items: center; gap: 12px; }

.avatar-bg {
    width: 44px; height: 44px;
    border-radius: 50%;
    background-color: var(--bg-main);
    display: flex; justify-content: center; align-items: center;
    overflow: hidden;
}

.user-avatar {
    border-radius: 50% !important;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}
.user-avatar img {
    border-radius: 50% !important;
}

.app-title {
    font-family: 'Playfair Display', serif;
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
}

.search-bar {
    background: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 9px 15px;
}
.search-bar input {
    border: none; outline: none; width: 100%;
    margin-left: 10px; font-size: 0.9rem; color: var(--text-dark);
    background: transparent;
}

/* ---- SCROLL CONTENT ---- */
.scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 15px 80px;
    z-index: 2;
}
.scroll-content::-webkit-scrollbar { display: none; }
.scroll-content { -ms-overflow-style: none; scrollbar-width: none; }

/* Non-home views keep padding consistent */
.sub-scroll { flex: 1; overflow-y: auto; padding: 15px 15px 80px; }
.sub-scroll::-webkit-scrollbar { display: none; }

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    margin-top: 8px;
}

/* ---- TOOLS GRID ---- */
.tools-grid {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    gap: 8px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.tool-icon-wrap {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: 0 4px 20px rgba(208,96,32,0.18), var(--shadow);
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tool-btn:hover .tool-icon-wrap {
    transform: scale(1.07);
    box-shadow: 0 6px 28px rgba(208,96,32,0.32), var(--shadow-strong);
}
.tool-btn span {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

/* ---- KNOWLEDGE HUB CARDS ---- */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hub-card {
    border-radius: 18px;
    padding: 15px;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-strong);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 128px;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.2); }

.blue-gradient { background: linear-gradient(135deg, #13315c 0%, #0b2545 100%); }
.orange-gradient { background: linear-gradient(135deg, #d06020 0%, #e88a52 100%); }
.dark-blue-gradient { background: linear-gradient(135deg, #0b2545 0%, #d06020 100%); }
.solid-blue { background: linear-gradient(135deg, #13315c, #1a4a8c); }

.card-icon-large { margin-bottom: 8px; }
.card-content h3 { font-size: 0.9rem; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.card-content p { font-size: 0.72rem; opacity: 0.9; line-height: 1.3; }
.dot-indicator {
    position: absolute; top: 10px; right: 10px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background-color: var(--accent-orange);
    box-shadow: 0 0 8px rgba(208,96,32,0.6);
}

/* ---- VISUAL LEARNING ---- */
.wide-card {
    background: var(--primary-dark);
    border-radius: 18px;
    padding: 15px;
    color: white;
    box-shadow: var(--shadow-strong);
    cursor: pointer;
    transition: transform 0.2s;
}
.wide-card:hover { transform: translateY(-3px); }
.card-header h3 { font-size: 1rem; font-weight: 700; text-align: center; color: var(--accent-light); margin-bottom: 14px; }
.shapes-container { display: flex; justify-content: space-around; align-items: center; }

/* ---- USER PANEL ---- */
.user-panel-card {
    background: var(--primary-blue);
    border-radius: 18px;
    padding: 20px;
    color: white;
    box-shadow: var(--shadow-strong);
}
.user-info { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.user-avatar-wrap { position: relative; }
.user-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: #f4ecd8;
    display: flex; justify-content: center; align-items: center;
}
.settings-gear {
    position: absolute; bottom: -5px; right: -5px;
    background: var(--accent-orange);
    border-radius: 50%;
    width: 20px; height: 20px;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid var(--primary-blue);
}
.panel-label { font-size: 0.72rem; color: var(--accent-light); font-weight: 600; display: block; }
.user-name { font-size: 1.05rem; font-weight: 700; }
.user-links { display: flex; flex-direction: column; gap: 11px; }
.link-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; cursor: pointer; opacity: 0.9; }
.link-item:hover { opacity: 1; }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.08);
    z-index: 100;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    color: #aaa; cursor: pointer; transition: color 0.2s;
    padding: 4px;
}
.nav-item span { font-size: 0.68rem; margin-top: 2px; font-weight: 600; }
.nav-item.active { color: var(--primary-dark); }

/* ---- SUB VIEWS (TOOLS, LEARN, PROFILE) ---- */
.sub-header {
    background: var(--primary-dark);
    padding: 18px 20px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow);
    z-index: 5;
    flex-shrink: 0;
}
.sub-header h2 { font-size: 1.2rem; font-weight: 700; }

/* ---- TABS ---- */
.tabs {
    display: flex;
    background: white;
    padding: 8px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    gap: 4px;
    flex-shrink: 0;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    color: gray;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn.active { background: var(--primary-dark); color: white; }

/* ---- TOOL CONTENT ---- */
.tool-content { animation: fadeIn 0.3s; }
.tool-content.hidden { display: none !important; }

/* 📱 Mobile tap highlight removal */
* {
    -webkit-tap-highlight-color: transparent;
}
button, a, .nav-item, .tab-btn, .toggle-switch, .bookmark-btn {
    outline: none;
}

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

.card-shadow { background: white; border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.mt-4 { margin-top: 15px; }

/* 🧮 MathML Formatting Fix */
math {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    font-size: 1.1rem;
}
math * {
    white-space: nowrap;
}

/* ---- BUTTONS ---- */
.primary-btn {
    background: linear-gradient(135deg, var(--accent-orange), #b84e14);
    color: white; border: none;
    padding: 12px 18px; border-radius: 10px;
    font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(208,96,32,0.3);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(208,96,32,0.45); }
.primary-btn:active { transform: scale(0.97); }

.secondary-btn {
    background: #f0f4ff; color: var(--primary-dark);
    border: 1.5px solid var(--primary-dark);
    padding: 10px 16px; border-radius: 8px;
    font-weight: 600; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
    text-align: center; display: inline-block;
}
.secondary-btn:hover { background: var(--primary-dark); color: white; }
.secondary-btn:active { transform: scale(0.97); }

.full-w { width: 100%; }

/* ---- INPUTS ---- */
.input-row { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: nowrap; }
.input-row input {
    flex: 1; min-width: 0;
    padding: 10px 12px;
    border: 1.5px solid #ddd; border-radius: 8px;
    outline: none; font-size: 0.9rem;
    transition: border-color 0.2s;
}
.input-row input:focus { border-color: var(--primary-dark); }
.result-box {
    margin-top: 14px; font-weight: 600;
    color: var(--heading-color); text-align: center;
    min-height: 24px; font-size: 0.95rem;
    line-height: 1.6;
    background: #f0f4ff; border-radius: 8px;
    padding: 10px; display: none;
}
.result-box.show { display: block; }

/* ---- CALCULATOR ---- */
.calculator-ui { max-width: 340px; margin: 0 auto; }

.calc-mode-tabs {
    display: flex; gap: 6px; margin-bottom: 12px;
}
.mode-btn {
    flex: 1; padding: 7px 4px;
    border: 1.5px solid #ddd; border-radius: 8px;
    background: white; font-size: 0.78rem; font-weight: 600;
    color: gray; cursor: pointer; transition: all 0.2s;
}
.mode-btn.active { background: var(--primary-dark); color: white; border-color: var(--primary-dark); }

#calc-display {
    width: 100%; border: none;
    background: linear-gradient(135deg, #0b2545, #13315c);
    color: #f4ecd8; border-radius: 12px;
    padding: 14px 18px; font-size: 2rem;
    text-align: right; margin-bottom: 12px;
    font-family: 'Inter', monospace;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
}

/* Scientific rows added above the main grid */
.sci-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-bottom: 9px;
}
.fin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 12px;
}

.c-btn {
    padding: 14px 0;
    border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 700;
    background: #f0e8dc; color: var(--text-dark);
    cursor: pointer; transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.c-btn.op { color: var(--accent-orange); background: #fff8f4; }
.c-btn.eval {
    background: linear-gradient(135deg, var(--accent-orange), #b84e14);
    color: white;
    box-shadow: 0 4px 12px rgba(208,96,32,0.3);
}
.c-btn.sci { font-size: 0.78rem; color: var(--primary-dark); background: #eaf0ff; padding: 10px 0; }
.c-btn.fin { font-size: 0.75rem; color: white; background: var(--primary-dark); padding: 10px; }
.c-btn.zero { grid-column: span 2; }
.c-btn:active { transform: scale(0.94); }

/* Financial inputs */
.fin-inputs { background: #f8f9fa; border-radius: 10px; padding: 12px; margin-bottom: 12px; display: none; }
.fin-inputs.show { display: block; }
.fin-input-group { margin-bottom: 8px; }
.fin-input-group label { font-size: 0.75rem; font-weight: 600; color: var(--primary-dark); display: block; margin-bottom: 3px; }
.fin-input-group input { width: 100%; padding: 8px 10px; border: 1.5px solid #ddd; border-radius: 6px; font-size: 0.88rem; outline: none; }
.fin-result { background: var(--primary-dark); color: white; border-radius: 8px; padding: 10px; text-align: center; font-weight: 700; font-size: 1rem; display: none; margin-top: 8px; }
.fin-result.show { display: block; }

/* ---- SOLVERS ---- */
.solver-box { margin-bottom: 18px; }
.solver-desc { font-size: 0.82rem; color: gray; margin-bottom: 12px; line-height: 1.4; }

.equation-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
}
.equation-input > div {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.equation-input input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    text-align: center;
    transition: border-color 0.2s;
}
.equation-input input:focus { border-color: var(--primary-dark); }
.equation-input span {
    font-weight: 700;
    color: var(--primary-dark);
}

.poly-coeff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.poly-coeff-grid input {
    min-width: 0;
    width: 100%;
    padding: 9px 8px; border: 1.5px solid #ddd;
    border-radius: 8px; font-size: 0.82rem;
    outline: none; text-align: center;
}
.poly-coeff-grid input:focus { border-color: var(--primary-dark); }

/* ---- GRAPH ---- */
.graph-ui {}
#graph-canvas-wrap {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    transform: translateZ(0);
    background: #0b2545;
    position: relative;
    /* Fixed height so canvas always visible */
    height: 280px;
}
#graph-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ---- CONVERTER ---- */
.modern-select {
    width: 100%; padding: 11px 12px;
    border: 1.5px solid #ddd; border-radius: 8px;
    outline: none; margin-bottom: 12px;
    background: white; font-weight: 500; font-size: 0.9rem;
    cursor: pointer;
}
.conv-row { display: flex; gap: 10px; }
.conv-input { width: 50%; padding: 11px 12px; border: 1.5px solid #ddd; border-radius: 8px; outline: none; font-size: 0.9rem; }

/* ---- 3D GEOMETRY ---- */
.geometry-box {}
/* Canvas container: fixed height, always visible above the fold */
#geo-top-controls { margin-bottom: 12px; }
#3d-canvas-container {
    width: 100%;
    height: 280px; /* fixed height — never overflows or hides */
    background: #0b2545;
    border-radius: 20px;
    overflow: hidden;
    transform: translateZ(0);
    position: relative;
    flex-shrink: 0;
}
#3d-canvas-container canvas { display: block !important; }
.geo-hint { font-size: 0.72rem; color: gray; text-align: center; margin-top: 6px; }

/* ---- CHAT ---- */
.chat-container {
    background: white; border-radius: 16px;
    overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    height: 420px;
}
.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.message { display: flex; }
.message.ai { justify-content: flex-start; }
.message.user { justify-content: flex-end; }
.bubble {
    padding: 11px 15px; border-radius: 16px;
    max-width: 85%; font-size: 0.88rem; line-height: 1.5;
}
.ai .bubble { background: #f0f0f0; color: var(--text-dark); border-bottom-left-radius: 4px; }
.user .bubble { background: var(--primary-dark); color: white; border-bottom-right-radius: 4px; }
.chat-input-area {
    display: flex; padding: 10px;
    border-top: 1px solid #eee; background: #fafafa;
}
.chat-input-area input {
    flex: 1; border: 1.5px solid #ddd; outline: none;
    background: #fff; padding: 10px 14px;
    border-radius: 20px; font-size: 0.88rem;
}
.send-btn {
    background: var(--accent-orange); border: none;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-left: 8px; cursor: pointer; flex-shrink: 0;
    transition: background 0.2s;
}
.send-btn:hover { background: #b84e14; }
/* ---- PI HUB (Social Feed) ---- */
.pi-post {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}
.pi-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.pi-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-orange);
}
.pi-post-meta {
    display: flex;
    flex-direction: column;
}
.pi-post-author {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pi-post-role {
    font-size: 0.7rem;
    background: var(--bg-color);
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}
.pi-post-time {
    font-size: 0.75rem;
    color: var(--text-dark);
    opacity: 0.7;
}
.pi-post-delete-btn {
    margin-left: auto;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pi-post-delete-btn:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}
.pi-post-body {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
}
.pi-post-attachment {
    margin-top: 10px;
}
.pi-post-attachment img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
/* ---- FORMULAS ---- */
.formula-card { border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.formula-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--heading-color); }
.formula-card p { font-size: 0.88rem; line-height: 1.6; color: var(--text-dark); }
.formula-card math { font-size: 1.1rem; margin-top: 10px; overflow-x: auto; display: block; }

/* ---- PROFILE ---- */
.profile-settings { display: flex; flex-direction: column; gap: 10px; }
.setting-item { display: flex; justify-content: space-between; align-items: center; }
.toggle-switch {
    width: 44px; height: 24px; background: #ccc;
    border-radius: 12px; position: relative; cursor: pointer; transition: 0.3s;
}
.toggle-switch::after {
    content: ''; position: absolute;
    width: 20px; height: 20px; background: white;
    border-radius: 50%; top: 2px; left: 2px; transition: 0.3s;
}
.toggle-switch.active { background: var(--accent-orange); }
.toggle-switch.active::after { transform: translateX(20px); }

/* Google Translate Overrides */
.skiptranslate iframe, .goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { display: none !important; }
.goog-tooltip { display: none !important; }
.goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }
