/**
 * Guide / Tutorial Pages — Shared Styles
 * Matches the app's dark theme while adding tutorial-specific components.
 */

/* ============ Reset & Base ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #ddd;
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: #00d9ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ Top Navigation Bar ============ */
.guide-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.guide-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.guide-topbar-logo {
    font-size: 1.4rem;
    text-decoration: none;
}

.guide-topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: #eee;
}

.guide-topbar-title a {
    color: #eee;
    text-decoration: none;
}
.guide-topbar-title a:hover {
    color: #00d9ff;
    text-decoration: none;
}

.guide-topbar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-topbar-nav a {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #aaa;
    transition: all 0.2s;
    white-space: nowrap;
}

.guide-topbar-nav a:hover {
    background: rgba(0, 217, 255, 0.1);
    color: #00d9ff;
    text-decoration: none;
}

.guide-topbar-nav a.active {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
    font-weight: 600;
}

.guide-topbar-app {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    color: #1a1a2e;
    transition: all 0.25s;
}
.guide-topbar-app:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.3);
    text-decoration: none;
}

/* Mobile topbar */
.guide-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #eee;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 768px) {
    .guide-topbar-nav { display: none; }
    .guide-mobile-toggle { display: block; }
    .guide-topbar-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px; left: 0; right: 0;
        background: rgba(26, 26, 46, 0.98);
        border-bottom: 1px solid rgba(0, 217, 255, 0.15);
        padding: 8px;
    }
    .guide-topbar-nav.open a { padding: 12px 16px; }
}

/* ============ Page Container ============ */
.guide-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 80px 24px 60px;
}

/* ============ Hero / Page Header ============ */
.guide-hero {
    text-align: center;
    padding: 48px 0 40px;
}

.guide-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    line-height: 1.2;
}

.guide-hero .subtitle {
    font-size: 1.15rem;
    color: #999;
    max-width: 520px;
    margin: 0 auto;
}

/* ============ Section Headers ============ */
.guide-section {
    margin-bottom: 48px;
}

.guide-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d9ff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-section h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #eee;
    margin: 20px 0 10px;
}

.guide-section p {
    margin-bottom: 14px;
    color: #bbb;
}

/* ============ Cards ============ */
.guide-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(6px);
}

.guide-card h3 {
    margin-top: 0;
}

/* ============ Steps ============ */
.guide-steps {
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.guide-step {
    counter-increment: step-counter;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.guide-step::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    color: #1a1a2e;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-step-content {
    flex: 1;
    padding-top: 6px;
}

.guide-step-content h3 {
    margin: 0 0 6px;
    color: #eee;
    font-size: 1.1rem;
}

.guide-step-content p {
    color: #aaa;
    margin: 0;
}

/* ============ Callout / Tip Boxes ============ */
.guide-tip {
    background: rgba(0, 217, 255, 0.08);
    border-left: 4px solid #00d9ff;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin: 18px 0;
    color: #ccc;
}

.guide-tip::before {
    content: '💡 Tipp';
    display: block;
    font-weight: 700;
    color: #00d9ff;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.guide-warning {
    background: rgba(255, 193, 7, 0.08);
    border-left: 4px solid #ffc107;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin: 18px 0;
    color: #ccc;
}

.guide-warning::before {
    content: '⚠️ Fontos';
    display: block;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.guide-info {
    background: rgba(0, 255, 136, 0.06);
    border-left: 4px solid #00ff88;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin: 18px 0;
    color: #ccc;
}

.guide-info::before {
    content: '📌 Jó tudni';
    display: block;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* ============ Mock UI Elements (for demos) ============ */

/* Fake browser frame around demo areas */
.guide-demo {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    overflow: hidden;
    margin: 24px 0;
}

.guide-demo-bar {
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-demo-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}
.guide-demo-dot.red   { background: #ff6b6b; }
.guide-demo-dot.yellow { background: #ffc107; }
.guide-demo-dot.green  { background: #00ff88; }

.guide-demo-label {
    margin-left: 8px;
    font-size: 0.78rem;
    color: #666;
}

.guide-demo-body {
    padding: 24px;
    min-height: 120px;
    position: relative;
}

/* Mock sidebar */
.mock-sidebar {
    width: 200px;
    background: rgba(26, 26, 46, 0.9);
    border-right: 1px solid rgba(0, 217, 255, 0.15);
    padding: 16px 0;
    border-radius: 0;
    flex-shrink: 0;
}

.mock-sidebar-item {
    padding: 10px 18px;
    color: #aaa;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.mock-sidebar-item:hover {
    background: rgba(0, 217, 255, 0.1);
    color: #00d9ff;
}

.mock-sidebar-item.active {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
    font-weight: 600;
}

/* Mock cards */
.mock-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

/* Mock buttons */
.mock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    font-family: inherit;
}

.mock-btn-primary {
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    color: #1a1a2e;
}
.mock-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.3);
}

.mock-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.mock-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #eee;
}

.mock-btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.mock-btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Mock inputs */
.mock-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #eee;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.mock-input:focus {
    border-color: #00d9ff;
    background: rgba(0, 217, 255, 0.05);
}

.mock-input::placeholder { color: #555; }

.mock-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #eee;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    appearance: none;
    cursor: pointer;
}

/* Mock toggle switch */
.mock-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.mock-toggle {
    width: 44px; height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.mock-toggle::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}

.mock-toggle.on {
    background: #00d9ff;
}

.mock-toggle.on::after {
    transform: translateX(20px);
}

.mock-toggle-label {
    font-size: 0.9rem;
    color: #ccc;
}

/* Mock table */
.mock-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
}

.mock-table th {
    text-align: left;
    padding: 10px 14px;
    color: #00d9ff;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 217, 255, 0.15);
}

.mock-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #bbb;
}

.mock-table tr:hover td {
    background: rgba(0, 217, 255, 0.04);
}

/* Mock progress bar */
.mock-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.mock-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.mock-progress-fill.green  { background: linear-gradient(90deg, #00d9ff, #00ff88); }
.mock-progress-fill.orange { background: linear-gradient(90deg, #ffc107, #ff8c00); }
.mock-progress-fill.red    { background: linear-gradient(90deg, #ff6b6b, #ff4444); }

/* Mock badge */
.mock-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mock-badge-cyan {
    background: rgba(0, 217, 255, 0.15);
    color: #00d9ff;
}

.mock-badge-green {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.mock-badge-orange {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.mock-badge-red {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* Mock nutrition bar */
.mock-macro-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mock-macro-item {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.mock-macro-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.mock-macro-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ Interactive Demo Specific ============ */
.demo-result {
    margin-top: 16px;
    padding: 14px;
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    display: none;
    animation: fadeInUp 0.4s ease;
}

.demo-result.visible {
    display: block;
}

/* Typewriter / streaming text effect */
.demo-stream {
    font-family: 'Segoe UI', monospace;
    color: #aaa;
    font-size: 0.88rem;
    line-height: 1.6;
    white-space: pre-wrap;
    min-height: 60px;
}

.demo-stream .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #00d9ff;
    animation: blink 0.8s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Animated calorie counter */
.demo-kcal-display {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============ Feature Grid (Hub Page) ============ */
.guide-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.guide-feature-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.guide-feature-card:hover {
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.06);
    transform: translateY(-4px);
    text-decoration: none;
}

.guide-feature-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
    display: block;
}

.guide-feature-card h3 {
    font-size: 1.1rem;
    color: #eee;
    margin-bottom: 8px;
}

.guide-feature-card p {
    font-size: 0.88rem;
    color: #888;
    margin: 0;
}

/* ============ Page Navigation (prev/next) ============ */
.guide-page-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-page-nav a {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ccc;
    transition: all 0.2s;
    min-width: 160px;
    text-decoration: none;
}

.guide-page-nav a:hover {
    border-color: rgba(0, 217, 255, 0.3);
    background: rgba(0, 217, 255, 0.06);
    text-decoration: none;
}

.guide-page-nav a .nav-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.guide-page-nav a .nav-title {
    font-weight: 600;
    color: #00d9ff;
}

.guide-page-nav a.next {
    text-align: right;
    margin-left: auto;
}

/* ============ Animations ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.3); }
    50%      { box-shadow: 0 0 20px 4px rgba(0, 217, 255, 0.15); }
}

.animate-in {
    animation: fadeInUp 0.5s ease both;
}

/* Stagger children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* ============ Highlight / Annotation ============ */
.guide-highlight {
    position: relative;
    display: inline;
}

.guide-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    border-radius: 2px;
}

.guide-kbd {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: monospace;
    color: #ddd;
}

/* ============ Accordion ============ */
.guide-accordion {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
}

.guide-accordion-item + .guide-accordion-item {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-accordion-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #ddd;
    user-select: none;
    transition: background 0.2s;
}

.guide-accordion-header:hover {
    background: rgba(0, 217, 255, 0.06);
}

.guide-accordion-header::after {
    content: '▸';
    transition: transform 0.25s;
    color: #00d9ff;
}

.guide-accordion-item.open .guide-accordion-header::after {
    transform: rotate(90deg);
}

.guide-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.guide-accordion-item.open .guide-accordion-body {
    max-height: 2000px;
}

.guide-accordion-body-inner {
    padding: 16px 20px;
    color: #aaa;
}

/* ============ Comparison / Two-Column ============ */
.guide-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 18px 0;
}

@media (max-width: 600px) {
    .guide-compare { grid-template-columns: 1fr; }
}

.guide-compare-item {
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-compare-item.good {
    background: rgba(0, 255, 136, 0.05);
    border-color: rgba(0, 255, 136, 0.2);
}

.guide-compare-item.bad {
    background: rgba(255, 107, 107, 0.05);
    border-color: rgba(255, 107, 107, 0.2);
}

.guide-compare-item h4 {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.guide-compare-item.good h4 { color: #00ff88; }
.guide-compare-item.bad h4 { color: #ff6b6b; }

/* ============ Checklist ============ */
.guide-checklist {
    list-style: none;
    padding: 0;
}

.guide-checklist li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    color: #bbb;
}

.guide-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00ff88;
    font-weight: 700;
}

/* ============ Mock Layout Helpers ============ */
.mock-flex { display: flex; gap: 12px; align-items: center; }
.mock-flex-col { display: flex; flex-direction: column; gap: 10px; }
.mock-flex-between { display: flex; justify-content: space-between; align-items: center; }
.mock-gap-sm { gap: 8px; }
.mock-gap-lg { gap: 20px; }
.mock-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.mock-mt { margin-top: 16px; }
.mock-mb { margin-bottom: 16px; }
.mock-text-center { text-align: center; }
.mock-text-sm { font-size: 0.82rem; }
.mock-text-muted { color: #666; }
.mock-text-cyan { color: #00d9ff; }
.mock-text-green { color: #00ff88; }
.mock-text-orange { color: #ffc107; }
.mock-text-red { color: #ff6b6b; }
.mock-text-bold { font-weight: 700; }
.mock-w-full { width: 100%; }

@media (max-width: 600px) {
    .mock-grid-2, .mock-grid-3 { grid-template-columns: 1fr; }
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 217, 255, 0.2); border-radius: 3px; }

/* ============ Print-friendly ============ */
@media print {
    body { background: #fff; color: #222; }
    .guide-topbar { display: none; }
    .guide-demo { border: 1px solid #ccc; }
    .guide-card { border: 1px solid #ddd; background: #f9f9f9; }
}
