/* ==============================
   RoboVerse Kids – Enhancement Styles
   v3.0 – Boto, Intros, Certificates, Challenges, Gallery
   ============================== */

/* ===== BOTO FLOATING BUBBLE ===== */
.boto-floating-bubble {
    position: fixed;
    bottom: 90px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 340px;
}
.boto-floating-bubble.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.boto-bubble-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4CACF7, #6BBFFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(76,172,247,0.3);
    animation: botoPulse 2s ease infinite;
}
@keyframes botoPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(76,172,247,0.3); }
    50% { box-shadow: 0 4px 20px rgba(76,172,247,0.5); }
}
.boto-bubble-text {
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 16px 16px 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    line-height: 1.5;
    border: 2px solid rgba(76,172,247,0.15);
}

/* ===== LESSON INTRO OVERLAY ===== */
.lesson-intro-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}
.lesson-intro-overlay.show {
    opacity: 1;
}
.lesson-intro-card {
    background: linear-gradient(145deg, #ffffff, #f0f6ff);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 92%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
    animation: celebPop 0.5s ease;
}
.intro-skip-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.intro-skip-btn:hover { opacity: 1; }
.intro-emoji {
    font-size: 4rem;
    margin-bottom: 0.8rem;
    animation: celebBounce 1s ease infinite alternate;
}
.intro-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 1.2rem;
}
.intro-boto {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    background: rgba(76,172,247,0.06);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    text-align: right;
}
.intro-boto-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4CACF7, #6BBFFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.intro-boto-speech {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.6;
}
.intro-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.5rem;
    background: linear-gradient(135deg, #FF8F4C, #FF6B2B);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255,107,43,0.3);
    transition: all 0.2s;
}
.intro-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,107,43,0.4);
}

/* ===== LESSON SUMMARY MINI ===== */
.lesson-summary-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.8rem;
}
.lesson-summary-mini span {
    background: rgba(76,172,247,0.08);
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ===== CERTIFICATE ===== */
.cert-overlay-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 1rem;
}
.cert-overlay-wrapper.show { opacity: 1; }
.certificate-frame {
    max-width: 600px;
    width: 100%;
}
.cert-border {
    background: linear-gradient(145deg, #fffff5, #fff9e6);
    border: 4px solid #4CACF7;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15), inset 0 0 40px rgba(247,210,83,0.05);
}
.cert-corner {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(247,210,83,0.6);
}
.cert-tl { top: 8px; right: 12px; }
.cert-tr { top: 8px; left: 12px; }
.cert-bl { bottom: 8px; right: 12px; }
.cert-br { bottom: 8px; left: 12px; }
.cert-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.cert-logo { font-size: 3rem; margin-bottom: 0.3rem; }
.cert-header h1 {
    font-size: 1.6rem;
    font-weight: 900;
    color: #2D3748;
    margin-bottom: 0.5rem;
}
.cert-line {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    margin: 0 auto;
}
.cert-body { text-align: center; }
.cert-presented {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.cert-name {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}
.cert-for {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.cert-level {
    display: inline-block;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.cert-skills {
    margin: 1rem 0;
    text-align: center;
}
.cert-skills h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.cert-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}
.cert-skill-tag {
    border: 2px solid;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px dashed rgba(0,0,0,0.08);
}
.cert-date { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.cert-brand { font-weight: 800; font-size: 0.9rem; color: var(--primary-dark); }
.cert-seal { font-size: 2rem; }
.cert-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.2rem;
}
.cert-actions .btn {
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-outline {
    background: rgba(255,255,255,0.9);
    border: 2px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ===== WEEKLY CHALLENGE CARD ===== */
.weekly-challenge-card {
    background: linear-gradient(135deg, #FFF3E0, #FFF8E1);
    border: 2px solid rgba(255,143,76,0.2);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}
.weekly-challenge-card::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,143,76,0.08);
    border-radius: 50%;
}
.wc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}
.wc-badge {
    background: linear-gradient(135deg, #FF8F4C, #FF6B2B);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
}
.wc-timer {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.wc-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}
.wc-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}
.wc-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.wc-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.wc-meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.wc-diff {
    background: rgba(76,172,247,0.1);
    color: var(--primary-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}
.wc-reward {
    color: #E0A800;
}
.wc-start-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem;
    background: linear-gradient(135deg, #FF8F4C, #FF6B2B);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.wc-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,43,0.3);
}

/* ===== PROJECT GALLERY ===== */
.gallery-page {
    max-width: 900px;
    margin: 0 auto;
}
.gallery-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.gallery-header h1 {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
}
.gallery-header p {
    color: var(--text-muted);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 2px solid transparent;
}
.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
.gallery-img {
    height: 120px;
    background: linear-gradient(135deg, #E8F4FD, #F0E8FE);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}
.gallery-info {
    padding: 0.8rem;
}
.gallery-info h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}
.gallery-student {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.gallery-type {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}
.gallery-type.scratch { background: #FFF3E0; color: #E65100; }
.gallery-type.lego { background: #FFEBEE; color: #C62828; }
.gallery-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.8rem 0.8rem;
}
.gallery-like-btn, .gallery-kudos-btn {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.gallery-like-btn:hover { border-color: #F7D253; background: rgba(247,210,83,0.1); }
.gallery-kudos-btn:hover { border-color: var(--success); background: rgba(110,229,159,0.1); }

/* ===== STUDENT HOME IMPROVEMENTS ===== */
.home-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}
.quick-action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.quick-action-btn .qa-icon {
    font-size: 1.8rem;
}

/* ===== DASHBOARD ENHANCEMENTS ===== */
.dash-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.dash-stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary);
}
.dash-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-dark);
}
.dash-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
.dash-alert {
    background: #FFF3E0;
    border: 2px solid #FFE0B2;
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #E65100;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-recommendation {
    background: rgba(76,172,247,0.06);
    border: 2px solid rgba(76,172,247,0.15);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}
.dash-recommendation h4 {
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}
.dash-recommendation p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dash-student-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
}
.dash-student-row:hover {
    transform: translateX(-3px);
    box-shadow: var(--shadow-md);
}
.dash-student-avatar {
    font-size: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .boto-floating-bubble { max-width: 280px; left: 10px; bottom: 80px; }
    .cert-border { padding: 1.2rem; }
    .cert-name { font-size: 1.5rem; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .home-quick-actions { grid-template-columns: repeat(3, 1fr); }
    .dash-analytics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .home-quick-actions { grid-template-columns: 1fr 1fr 1fr; }
    .quick-action-btn { padding: 0.6rem; font-size: 0.75rem; }
    .quick-action-btn .qa-icon { font-size: 1.3rem; }
}
