/* ═══════════════════════════════════════════════════
   tutorial.css — tutorial index and lesson pages
   ═══════════════════════════════════════════════════ */

/* ─── Site header ─────────────────────────────────── */
.tut-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: #0d0a1a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.tut-logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f48fb1;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.tut-logo span { color: #fff; }

.tut-header-nav {
    display: flex;
    gap: 1.4rem;
}
.tut-header-nav a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.tut-header-nav a:hover { color: #fff; }

/* ─── Lesson breadcrumb nav ───────────────────────── */
.tut-lesson-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: #f7f8fa;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.tut-nav-btn {
    color: #e91e63;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background 0.15s;
}
.tut-nav-btn:hover { background: #fce4ec; }
.tut-nav-disabled {
    color: #c0c4cc;
    padding: 0.3rem 0.6rem;
}
.tut-nav-index {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.8rem;
}
.tut-nav-index:hover { color: #111; }

/* ─── Puzzle section ──────────────────────────────── */
.tut-puzzle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    background: #0d0a1a;
}

.tut-puzzle-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
}

/* ─── Step panel ──────────────────────────────────── */
.tut-step-panel {
    width: 100%;
    max-width: 560px;
    background: #1a1630;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tut-step-counter {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f48fb1;
}

.tut-step-note {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #e5e7eb;
    min-height: 3.5rem;
}

.tut-controls {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

/* ─── Buttons ─────────────────────────────────────── */
.tut-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
}
.tut-btn:disabled { opacity: 0.35; cursor: default; }

.tut-btn-primary {
    background: #e91e63;
    color: #fff;
}
.tut-btn-primary:hover:not(:disabled) { background: #c2185b; }

.tut-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
}
.tut-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.14); }

/* ─── Complete banner ─────────────────────────────── */
.tut-complete {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}
.tut-complete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}
.tut-complete-msg {
    color: #a5f3a8;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ─── Cell highlight animation ────────────────────── */
@keyframes tut-pop {
    0%   { outline: 3px solid #ffd54f; outline-offset: 1px; }
    70%  { outline: 3px solid #ffd54f; outline-offset: 1px; }
    100% { outline: 3px solid transparent; }
}
.tut-highlight {
    animation: tut-pop 1.5s ease-out forwards;
}

/* ─── Index page: card grid ───────────────────────── */
.tut-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.tut-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tut-card:hover {
    border-color: #e91e63;
    box-shadow: 0 2px 12px rgba(233,30,99,0.08);
}

.tut-card-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: #fce4ec;
    color: #e91e63;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.tut-card-body { flex: 1; }

.tut-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 0.3rem;
}

.tut-card-intro {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tut-card-arrow {
    color: #d1d5db;
    font-size: 1rem;
    flex-shrink: 0;
    align-self: center;
    transition: color 0.15s;
}
.tut-card:hover .tut-card-arrow { color: #e91e63; }
