/* =============== VISUAL ELECTRICITY PAGE =============== */

/* Hero */
#el-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #1a0f00 0%, #4a2800 40%, #f59e0b 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}
#el-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.el-hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.el-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fbbf24;
}
.el-hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}
.el-hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 32px;
}
.el-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}
.el-hero-actions .btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
}
.el-hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
}
.el-stat { text-align: center; }
.el-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
}
.el-stat-label { font-size: 14px; opacity: 0.8; }

/* Features */
#el-features { padding: 80px 0; background: #f8fafc; }
.el-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.el-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}
.el-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.el-feature-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #fff;
    font-size: 24px;
}
.el-feature-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.el-feature-card p { color: #64748b; font-size: 14px; line-height: 1.6; }

/* Challenge Bar */
.el-challenge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 24px;
    gap: 24px;
    flex-wrap: wrap;
}
.el-challenge-info { flex: 1; min-width: 200px; }
.el-challenge-level { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.el-level-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.el-challenge-title { font-size: 18px; font-weight: 700; }
.el-challenge-desc { font-size: 13px; opacity: 0.8; margin: 0; }
.el-challenge-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.el-score {
    background: rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}
.el-score i { color: #fbbf24; }
.el-level-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.el-nav-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.el-nav-btn:hover { background: rgba(255,255,255,0.25); }
.el-hint-btn { font-size: 12px !important; }
.el-share-btn { font-size: 12px !important; }

/* Workspace */
.el-workspace {
    display: grid;
    grid-template-columns: 240px 1fr;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    background: #fff;
    min-height: 600px;
}

/* Toolbar */
.el-toolbar {
    background: #f1f5f9;
    border-right: 2px solid #e2e8f0;
    padding: 12px;
    overflow-y: auto;
    max-height: 650px;
}
.el-toolbar-header {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.el-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
.el-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}
.el-tool-btn i { font-size: 18px; color: #f59e0b; }
.el-tool-btn:hover { border-color: #fcd34d; background: #fffbeb; }
.el-tool-btn.active { border-color: #f59e0b; background: #fef3c7; color: #92400e; }
.el-tool-btn.active i { color: #92400e; }
.el-tool-delete i { color: #ef4444; }
.el-tool-delete:hover { border-color: #fca5a5; background: #fef2f2; }
.el-tool-delete.active { border-color: #ef4444; background: #fee2e2; }

/* Params */
.el-params { display: flex; flex-direction: column; gap: 10px; }
.el-param { display: flex; flex-direction: column; gap: 2px; }
.el-param label { font-size: 11px; font-weight: 600; color: #64748b; }
.el-param input[type=range] { width: 100%; accent-color: #f59e0b; }
.el-param-val { font-size: 11px; color: #f59e0b; font-weight: 700; text-align: right; }

/* Canvas Area */
.el-canvas-area { display: flex; flex-direction: column; }
.el-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
    flex-wrap: wrap;
    gap: 8px;
}
.el-canvas-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.el-ctrl-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.el-btn-play { background: #10b981; color: #fff; }
.el-btn-play:hover { background: #059669; }
.el-btn-pause { background: #f59e0b; color: #fff; }
.el-btn-pause:hover { background: #d97706; }
.el-btn-reset { background: #64748b; color: #fff; }
.el-btn-reset:hover { background: #475569; }
.el-ctrl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.el-trail-toggle {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    cursor: pointer;
}

#el-canvas {
    width: 100%;
    height: 500px;
    background: #0f172a;
    cursor: crosshair;
    display: block;
}

/* Info Panel */
.el-info-panel {
    display: flex;
    gap: 24px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.el-info-item { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.el-info-label { color: #64748b; }
.el-info-value { color: #1e293b; font-weight: 700; }

/* Hint overlay */
.el-hint-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.el-hint-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.el-hint-box h3 { color: #f59e0b; margin-bottom: 12px; }
.el-hint-box p { color: #334155; line-height: 1.7; }
.el-hint-close {
    position: absolute;
    top: 12px; right: 12px;
    background: none; border: none;
    font-size: 18px; color: #94a3b8;
    cursor: pointer;
}
.el-hint-theory {
    margin-top: 16px;
    padding: 16px;
    background: #fffbeb;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    font-size: 14px;
    color: #92400e;
    line-height: 1.6;
}

/* Level complete overlay */
.el-complete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.el-complete-box {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: elBounceIn 0.5s ease;
}
@keyframes elBounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
.el-complete-stars { font-size: 40px; margin-bottom: 12px; }
.el-complete-box h2 {
    font-size: 28px; color: #10b981; margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}
.el-complete-box p { color: #64748b; margin-bottom: 16px; }
.el-complete-score {
    font-size: 24px;
    color: #f59e0b;
    font-weight: 800;
    margin-bottom: 24px;
}
.el-complete-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Steps */
#el-howto { padding: 80px 0; background: #fff; }
.el-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.el-step {
    text-align: center;
    max-width: 240px;
}
.el-step-number {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin: 0 auto 16px;
}
.el-step-icon {
    font-size: 40px;
    color: #f59e0b;
    margin-bottom: 16px;
}
.el-step h3 { margin-bottom: 8px; }
.el-step p { color: #64748b; font-size: 14px; }
.el-step-arrow { color: #cbd5e1; font-size: 24px; }

/* Leaderboard */
#el-leaderboard { padding: 80px 0; background: #f8fafc; }
.el-leaderboard-table {
    max-width: 600px;
    margin: 32px auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.el-lb-header, .el-lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px;
    padding: 12px 20px;
    align-items: center;
    font-size: 14px;
}
.el-lb-header {
    background: #1e293b;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.el-lb-row { border-bottom: 1px solid #f1f5f9; }
.el-lb-row:last-child { border-bottom: none; }
.el-lb-row:hover { background: #f8fafc; }
.el-lb-row.el-lb-player { background: #fffbeb; border-left: 3px solid #f59e0b; }
.el-lb-rank { font-weight: 800; color: #f59e0b; }
.el-lb-name { font-weight: 600; color: #334155; }
.el-lb-score { font-weight: 700; color: #f59e0b; }
.el-lb-levels { color: #64748b; }
.el-lb-cta { text-align: center; margin-top: 24px; }
.el-lb-cta p { color: #64748b; margin-bottom: 16px; }

/* FAQ */
#el-faq { padding: 80px 0; background: #fff; }

/* CTA */
#el-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e293b, #f59e0b);
    color: #fff;
}
.el-cta-content { text-align: center; max-width: 600px; margin: 0 auto; }
.el-cta-content h2 { font-size: 32px; margin-bottom: 16px; font-family: 'Montserrat', sans-serif; }
.el-cta-content p { opacity: 0.9; margin-bottom: 32px; line-height: 1.7; }
.el-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Share Modal */
.el-share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.el-share-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.el-share-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    font-size: 20px; color: #94a3b8;
    cursor: pointer;
}
.el-share-modal-content h2 {
    font-size: 22px; margin-bottom: 20px; color: #1e293b;
}
.el-share-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    margin-bottom: 20px;
}
.el-share-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    font-size: 13px;
    font-weight: 600;
}
.el-share-logo { width: 24px; height: 24px; border-radius: 6px; }
.el-share-card-body { padding: 24px; text-align: center; }
.el-share-stars { font-size: 32px; margin-bottom: 8px; }
.el-share-card-body h3 { font-size: 20px; margin-bottom: 16px; }
.el-share-stats { display: flex; justify-content: center; gap: 40px; }
.el-share-stat { text-align: center; }
.el-share-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: #fbbf24;
}
.el-share-stat span:last-child { font-size: 12px; opacity: 0.8; }

.el-share-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.el-share-link-box input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
}
.el-share-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.el-social-btn {
    padding: 10px 20px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}
.el-social-btn:hover { opacity: 0.85; }
.el-fb { background: #1877f2; }
.el-tw { background: #1da1f2; }
.el-zalo { background: #0068ff; }

/* Responsive */
@media (max-width: 900px) {
    .el-features-grid { grid-template-columns: repeat(2, 1fr); }
    .el-workspace { grid-template-columns: 1fr; }
    .el-toolbar {
        max-height: none;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
    }
    .el-tools { grid-template-columns: repeat(5, 1fr); }
    .el-params { flex-direction: row; flex-wrap: wrap; gap: 12px; }
    .el-param { flex: 1; min-width: 140px; }
    .el-hero-content h1 { font-size: 32px; }
}
@media (max-width: 600px) {
    .el-features-grid { grid-template-columns: 1fr; }
    .el-tools { grid-template-columns: repeat(3, 1fr); }
    .el-challenge-bar { flex-direction: column; text-align: center; }
    .el-challenge-progress { justify-content: center; }
    .el-steps { flex-direction: column; }
    .el-step-arrow { transform: rotate(90deg); }
    .el-share-social { flex-direction: column; }
    #el-canvas { height: 350px; }
}
