/* =============== VISUAL VELOCITY PAGE =============== */

/* Hero */
#ve-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #0a1628 0%, #0f3d3e 40%, #10b981 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}
#ve-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");
}
.ve-hero-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.ve-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: #34d399;
}
.ve-hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}
.ve-hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 32px;
}
.ve-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}
.ve-hero-actions .btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
}
.ve-hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
}
.ve-stat { text-align: center; }
.ve-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
}
.ve-stat-label { font-size: 14px; opacity: 0.8; }

/* Features */
#ve-features { padding: 80px 0; background: #f8fafc; }
.ve-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.ve-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;
}
.ve-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.ve-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;
}
.ve-feature-card h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; }
.ve-feature-card p { color: #64748b; font-size: 14px; line-height: 1.6; }

/* Challenge Bar */
.ve-challenge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0f3d3e, #134e4a);
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 16px 24px;
    gap: 24px;
    flex-wrap: wrap;
}
.ve-challenge-info { flex: 1; min-width: 200px; }
.ve-challenge-level { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.ve-level-badge {
    background: linear-gradient(135deg, #10b981, #0d9488);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.ve-challenge-title { font-size: 18px; font-weight: 700; }
.ve-challenge-desc { font-size: 13px; opacity: 0.8; margin: 0; }
.ve-challenge-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ve-score {
    background: rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}
.ve-score i { color: #fbbf24; }
.ve-level-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ve-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;
}
.ve-nav-btn:hover { background: rgba(255,255,255,0.25); }
.ve-hint-btn { font-size: 12px !important; }
.ve-share-btn { font-size: 12px !important; }

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

/* Toolbar */
.ve-toolbar {
    background: #f0fdf4;
    border-right: 2px solid #d1fae5;
    padding: 12px;
    overflow-y: auto;
    max-height: 650px;
}
.ve-toolbar-header {
    font-size: 13px;
    font-weight: 700;
    color: #065f46;
    padding: 8px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ve-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
.ve-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;
}
.ve-tool-btn i { font-size: 18px; color: #10b981; }
.ve-tool-btn:hover { border-color: #6ee7b7; background: #ecfdf5; }
.ve-tool-btn.active { border-color: #10b981; background: #d1fae5; color: #065f46; }
.ve-tool-btn.active i { color: #065f46; }
.ve-tool-delete i { color: #ef4444; }
.ve-tool-delete:hover { border-color: #fca5a5; background: #fef2f2; }
.ve-tool-delete.active { border-color: #ef4444; background: #fee2e2; }

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

/* Colors */
.ve-colors { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0; }
.ve-color-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}
.ve-color-btn:hover { transform: scale(1.15); }
.ve-color-btn.active { border-color: #1e293b; transform: scale(1.15); }

/* Canvas Area */
.ve-canvas-area { display: flex; flex-direction: column; }
.ve-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #d1fae5;
    font-weight: 600;
    font-size: 14px;
    color: #065f46;
    flex-wrap: wrap;
    gap: 8px;
}
.ve-canvas-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ve-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;
}
.ve-btn-play { background: #10b981; color: #fff; }
.ve-btn-play:hover { background: #059669; }
.ve-btn-pause { background: #f59e0b; color: #fff; }
.ve-btn-pause:hover { background: #d97706; }
.ve-btn-reset { background: #64748b; color: #fff; }
.ve-btn-reset:hover { background: #475569; }
.ve-ctrl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ve-trail-toggle {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    cursor: pointer;
}

.ve-canvas-split {
    display: flex;
    width: 100%;
}
#ve-canvas {
    width: 60%;
    height: 500px;
    background: #0a1628;
    cursor: crosshair;
    display: block;
}
#ve-graph-canvas {
    width: 40%;
    height: 500px;
    background: #0f172a;
    display: block;
    border-left: 2px solid #1e3a5f;
}

/* Info Panel */
.ve-info-panel {
    display: flex;
    gap: 24px;
    padding: 8px 16px;
    background: #f0fdf4;
    border-top: 1px solid #d1fae5;
    flex-wrap: wrap;
}
.ve-info-item { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.ve-info-label { color: #064e3b; }
.ve-info-value { color: #065f46; font-weight: 700; }

/* Hint overlay */
.ve-hint-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ve-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);
}
.ve-hint-box h3 { color: #f59e0b; margin-bottom: 12px; }
.ve-hint-box p { color: #334155; line-height: 1.7; }
.ve-hint-close {
    position: absolute;
    top: 12px; right: 12px;
    background: none; border: none;
    font-size: 18px; color: #94a3b8;
    cursor: pointer;
}
.ve-hint-theory {
    margin-top: 16px;
    padding: 16px;
    background: #ecfdf5;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    font-size: 14px;
    color: #065f46;
    line-height: 1.6;
}

/* Level complete overlay */
.ve-complete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ve-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: veBounceIn 0.5s ease;
}
@keyframes veBounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
.ve-complete-stars { font-size: 40px; margin-bottom: 12px; }
.ve-complete-box h2 {
    font-size: 28px; color: #10b981; margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}
.ve-complete-box p { color: #64748b; margin-bottom: 16px; }
.ve-complete-score {
    font-size: 24px;
    color: #f59e0b;
    font-weight: 800;
    margin-bottom: 24px;
}
.ve-complete-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

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

/* Leaderboard */
#ve-leaderboard { padding: 80px 0; background: #f8fafc; }
.ve-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);
}
.ve-lb-header, .ve-lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px;
    padding: 12px 20px;
    align-items: center;
    font-size: 14px;
}
.ve-lb-header {
    background: #065f46;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.ve-lb-row { border-bottom: 1px solid #f1f5f9; }
.ve-lb-row:last-child { border-bottom: none; }
.ve-lb-row:hover { background: #f0fdf4; }
.ve-lb-row.ve-lb-player { background: #ecfdf5; border-left: 3px solid #10b981; }
.ve-lb-rank { font-weight: 800; color: #f59e0b; }
.ve-lb-name { font-weight: 600; color: #334155; }
.ve-lb-score { font-weight: 700; color: #10b981; }
.ve-lb-levels { color: #64748b; }
.ve-lb-cta { text-align: center; margin-top: 24px; }
.ve-lb-cta p { color: #64748b; margin-bottom: 16px; }

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

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

/* Share Modal */
.ve-share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ve-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);
}
.ve-share-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    font-size: 20px; color: #94a3b8;
    cursor: pointer;
}
.ve-share-modal-content h2 {
    font-size: 22px; margin-bottom: 20px; color: #1e293b;
}
.ve-share-card {
    background: linear-gradient(135deg, #0f3d3e, #134e4a);
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    margin-bottom: 20px;
}
.ve-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;
}
.ve-share-logo { width: 24px; height: 24px; border-radius: 6px; }
.ve-share-card-body { padding: 24px; text-align: center; }
.ve-share-stars { font-size: 32px; margin-bottom: 8px; }
.ve-share-card-body h3 { font-size: 20px; margin-bottom: 16px; }
.ve-share-stats { display: flex; justify-content: center; gap: 40px; }
.ve-share-stat { text-align: center; }
.ve-share-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    color: #34d399;
}
.ve-share-stat span:last-child { font-size: 12px; opacity: 0.8; }

.ve-share-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.ve-share-link-box input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #d1fae5;
    border-radius: 10px;
    font-size: 13px;
    color: #334155;
    background: #f0fdf4;
}
.ve-share-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.ve-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;
}
.ve-social-btn:hover { opacity: 0.85; }
.ve-fb { background: #1877f2; }
.ve-tw { background: #1da1f2; }
.ve-zalo { background: #0068ff; }

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