/* static/css/landing/guide.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Grotesk:wght@700&display=swap');

:root {
    --bg-color: #050507;
    --card-bg: linear-gradient(180deg, #16161A 0%, #0D0D0F 100%);
    --card-border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    --text-primary: #EAEAEF;
    --text-secondary: #9A9AA0;
    --text-heading: #FFFFFF;

    --accent-color: #007AFF; /* A vibrant blue, common for iOS context */
    --accent-glow: 0 0 15px rgba(0, 122, 255, 0.3);

    --font-body: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    --border-radius: 12px;
    --border-radius-large: 20px;
}
/* In your CSS, perhaps near other text styles or at the end */
a {
    color: var(--text-secondary); /* A softer, less intense blue */
    text-decoration: underline; /* Good for discoverability */
}

a:hover {
    color: var(--text-primary); /* Stands out on hover */
    text-decoration: underline;
}

/* If you have specific links that should be the accent color,
   you can create a class for them, e.g.: */
.accent-link {
    color: var(--accent-color);
    text-decoration: none;
}
.accent-link:hover {
    text-decoration: underline;
}

html, body{
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
}

.instructions-page {
    padding: 100px 20px;
}

/* --- Header --- */
.instructions-header {
    text-align: center;
    margin-bottom: 50px;
}
.instructions-header .page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-heading);
    margin-bottom: 0.25em;
    letter-spacing: -1px;
}
.instructions-header .page-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* --- Platform Navigation --- */
.platform-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}
.platform-nav ul {
    list-style: none;
    padding: 6px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    background-color: rgba(0,0,0,0.2);
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border-color);
}
.platform-nav a {
    display: flex; align-items: center; gap: 0.75em;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}
.platform-nav a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}
.platform-nav a.active {
    color: #fff;
    background-color: var(--accent-color);
    box-shadow: var(--accent-glow);
}

/* --- Main Instructions Card --- */
.instructions-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden; /* Crucial for sticky header to work within the card */
}

/* --- Video Container with Play Icon --- */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-container::before { /* Play icon overlay */
    content: '\f144'; /* Font Awesome play icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 60px;
    color: rgba(255, 255, 255, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
    cursor: pointer;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.video-container:hover::before {
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}
.video-container iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* --- Main Content Styling (Increased Padding) --- */
.instructions-content {
    padding: clamp(2em, 5vw, 4em);
}

/* === THE KEY UPGRADE: STYLED STEP HEADERS === */
.instructions-content h2 {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 2.5em 0 1.5em 0;
    letter-spacing: -0.5px;
    counter-increment: step-counter; /* Auto-numbering */
}
.instructions-content h2::before {
    content: counter(step-counter);
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: var(--accent-glow);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}
/* Reset counter for each new card */
.instructions-card { counter-reset: step-counter; }

/* Remove default numbering from markdown */
.instructions-content h2::marker { content: ""; }


.instructions-content p, .instructions-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 65ch; /* Optimal line length for reading */
}
.instructions-content p { margin-bottom: 1em; }

.instructions-content ul, .instructions-content ol {
    padding-left: 20px;
    margin: 1.5em 0;
}
.instructions-content li {
    padding-left: 10px;
    margin-bottom: 1.25em;
}

/* Custom bullet points for UNORDERED lists only */
.instructions-content ul li::marker { /* <-- CHANGE THIS LINE */
    content: '—';
    color: var(--accent-color);
    font-weight: bold;
}

/* Ensure ordered lists use their default numbers */
.instructions-content ol li::marker {
    content: initial; /* Explicitly reset to default numbering */
    color: var(--accent-color); /* <-- CHANGE THIS LINE: Set the number color to accent */
    font-weight: initial; /* Reset font-weight if it was inherited */
}

/* Styling for inline `code` from markdown */
/* This specific rule was causing issues for block code. */
/* Removing or simplifying it will allow the <pre> styles to take over. */
/* For truly inline code (like in a sentence), keep it simple: */
.instructions-content :not(pre) > code { /* Applies only to code not inside <pre> */
    font-family: 'SF Mono', 'Fira Code', monospace;
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--accent-color);
    padding: 0.2em 0.4em; /* Slightly less padding for inline */
    border-radius: 4px; /* Slightly smaller radius for inline */
    font-size: 0.875em; /* A bit smaller for inline */
    font-weight: 500;
}


/* Professional Callout Box (for blockquotes) */
.instructions-content blockquote {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: none;
    background-color: rgba(0, 122, 255, 0.05);
    border-left: 3px solid var(--accent-color);
    padding: 1.5em;
    margin: 3em 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.instructions-content blockquote p {
    margin: 0;
    color: var(--text-primary);
}
.instructions-content blockquote::before {
    content: '\f05a'; /* Font Awesome info-circle */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 4px;
}

/* --- Code Block and Copy Button Styling --- */

/* Parent container for pre and code-header.
   This helps the sticky position of code-header work correctly
   if <pre> itself doesn't have an appropriate parent, or if you want
   to ensure the border-radius applies to the whole visual unit.
   If your Markdown directly gives you <pre><code>, this will wrap it. */
/* static/css/landing/guide.css */

/* ... (your existing CSS before .code-header) ... */

/* --- Code Block and Copy Button Styling --- */

/* Parent container for pre and code-header. */
.instructions-content pre {
    position: relative;
    margin: 1.5em 0;
    background-color: #1a1a1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Style for the header containing the copy button and text */
.code-header {
    display: flex;
    justify-content: space-between; /* Changed to space-between to push text left, button right */
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
    box-sizing: border-box;
    width: 100%;
}

/* New style for the header text */
.code-header-text {
    color: var(--text-secondary); /* A slightly subdued color */
    font-size: 0.9em;
    font-weight: 500;
    margin-right: 15px; /* Adds some space between text and button */
    white-space: nowrap; /* Prevents text from wrapping if too long */
    overflow: hidden; /* Hides overflow if nowrap causes issues on very small screens */
    text-overflow: ellipsis; /* Adds "..." if text is truncated */
}


/* General styling for the copy button */
.copy-code-btn {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    white-space: nowrap;
}

.copy-code-btn:hover {
    background-color: #0066CC;
    box-shadow: var(--accent-glow);
}

.copy-code-btn:active {
    background-color: #0056B3;
}

/* Style for the icon inside the button */
.copy-code-btn i {
    font-size: 0.9em;
}

/* Adjustments for the <code> tag itself inside <pre> */
.instructions-content pre code {
    display: block;
    background: none;
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Style for images, specifically QR codes */
.instructions-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.instructions-content img[alt="QR Code"] {
    max-width: 200px;
    border: 1px solid var(--card-border-color);
    object-fit: contain;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .instructions-card {
        margin: 0;
        width: 100%;
        border-radius: 10px;
    }

    .instructions-content {
        padding: 1.25em 0.75em; /* reduce slightly */
    }

    .instructions-page {
        padding: 32px 10px;
    }
}

@media (max-width: 480px) {
    .platform-nav ul {
        gap: 4px;
        padding: 4px;
    }

    .platform-nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
        gap: 0.5em;
    }

    .platform-nav i {
        font-size: 0.9em;
    }


}

@media (max-width: 480px) {
    .platform-nav span {
        font-size: 0.75rem;
        display: inline;
    }

    .platform-nav a[data-platform="macos"] span {
        content: "mac";
    }
    .platform-nav a[data-platform="ios"] span {
        content: "iOS";
    }
    .platform-nav a[data-platform="tvos"] span {
        content: "tv";
    }
}
