/* ========== Incorporated from style.css (base layout for node-guide page) ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    background: #000;
    -webkit-backdrop-filter: blur(1px);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -50px;
    left: 0;
    right: 0;
    bottom: -50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    z-index: -1;
}

/* Header navigation */
.header {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    height: 60px;
    background-color: black;
    width: 100%;
    margin-top: 0;
    z-index: 5;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    margin-left: 20px;
}

.nav-links {
    display: flex;
    gap: 40px;
    margin-left: 60px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.3);
}

.wallet-controls {
    display: flex;
    gap: 10px;
}

.btn, a.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-connect, a.btn-connect {
    background: white;
    color: #667eea;
    margin-right: 20px;
}

.btn-connect:hover, a.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
    margin-right: 20px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-logout.active {
    display: flex;
}

.wallet-address {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    font-family: Arial, sans-serif;
    display: none;
}

.wallet-address.active {
    display: block;
}

.container {
    flex: 1 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    .header-left {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .nav-links {
        justify-content: center;
        margin-left: 0;
    }
    .wallet-controls {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Incorporated from smooth-scrolling.css ========== */
html {
    scroll-behavior: smooth;
}

.page-section {
    min-height: 100vh;
    padding-top: 0;
    margin-top: -60px;
}

/* Node-guide page sections (ids: #top, #trustline, #uninstall-node, #private-key) */
#top {
    scroll-margin-top: 80px;
    padding: 180px 20px 40px;   /* 100px extra top padding to bring installer section down */
}

#trustline {
    scroll-margin-top: 80px;
    margin-top: 100px;
    margin-bottom: 0;
    padding: 40px 20px 40px;
    min-height: auto;
}

/* White card for Section 1 (installer) */
#top .content-page {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 56rem;
    margin: 0 auto;
}

/* White card for Section 2 (RLUSD trustline) */
#trustline .content-page {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 56rem;
    margin: 0 auto;
}

#uninstall-node {
    scroll-margin-top: 80px;
    margin-top: 100px;
    margin-bottom: 0;
    padding: 40px 20px 40px;
    min-height: auto;
}

/* White card for Section 3 (removal) */
#uninstall-node .content-page {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 56rem;
    margin: 0 auto;
}

#private-key {
    scroll-margin-top: 80px;
    margin-top: 100px;
    margin-bottom: 400px;
    padding: 40px 20px 40px;
    min-height: auto;
}

/* White card for Section 4 (private key) */
#private-key .content-page {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 56rem;
    margin: 0 auto;
}

/* ========== Node Guide – Section content (Install, Trustline, Uninstall) ========== */
/* Instructional text: dark grey so it’s readable on white content area */
.guide-section-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.guide-subtitle {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
}

.guide-requirements {
    margin: 0.5rem 0 1.25rem 1.25rem;
    padding-left: 1.25rem;
    color: #2d3748;
    line-height: 1.6;
}

.guide-requirements li {
    margin-bottom: 0.35rem;
}

.guide-note {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.12);
    border-left: 4px solid #667eea;
    border-radius: 4px;
    color: #2d3748;
    font-size: 0.95rem;
}

.guide-intro {
    margin-bottom: 1.5rem;
    color: #2d3748;
    line-height: 1.6;
}

.guide-intro-center {
    text-align: center;
}

.guide-intro code {
    background: #d9e1fa;
    color: #000;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 1.05em;
}

.guide-steps {
    max-width: 48rem;
}

.guide-steps h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a202c;
}

.guide-steps h3:first-child {
    margin-top: 0;
}

.guide-steps p {
    margin-bottom: 0.75rem;
    color: #2d3748;
    line-height: 1.6;
}

.guide-command-wrap {
    position: relative;
    margin: 0.5rem 0 1rem;
}

.guide-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: background 0.2s;
}
.guide-copy-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}
.guide-copy-btn::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    margin: 8px auto 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2327db30' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1'/%3E%3C/svg%3E") center/contain no-repeat;
}
.guide-copy-btn.guide-copied::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2327db30' stroke-width='2'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.guide-command {
    margin: 0;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    background: #0d0d0d;
    border-radius: 6px;
    border-left: 3px solid #27db30;
    overflow-x: auto;
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: #27db30;
}

.guide-command code {
    background: none;
    padding: 0;
    color: #27db30;
}

.guide-command-caption {
    margin: -0.25rem 0 0.75rem 0;
    font-size: 0.9rem;
    color: #4a5568;
    font-style: italic;
}

.guide-figure {
    margin: 1rem 0 1.5rem;
    padding: 0;
}

.guide-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: block;
}

/* Token generator image (Step 2): 60% of current size */
.guide-img-token-gen {
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

/* Certificate viewer image: ~40% smaller */
.guide-img-cert-viewer {
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
}

/* Windows trusted sites image: 20% bigger, left margin aligned with Mac image below */
.guide-img-windows-trusted {
    max-width: 120%;
    margin-left: 0;
}

/* Windows and Mac certificate images: center content in figure (horizontal + vertical) */
.guide-figure.guide-figure-center-v {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 420px !important;
}

.guide-figure.guide-figure-center-v .guide-img,
.guide-figure.guide-figure-center-v img {
    margin-left: auto;
    margin-right: auto;
}

/* Override Windows image left-align so it centers with Mac in center-v figures */
.guide-figure.guide-figure-center-v .guide-img.guide-img-windows-trusted {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Images 07–11: force 60% size (width + max-width so nothing overrides) */
#top .guide-figure .guide-img.guide-img-60,
#top .guide-figure img.guide-img-60 {
    width: 60% !important;
    max-width: 60% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.guide-figure figcaption {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: #4a5568;
    font-style: italic;
    text-align: center;
}

.guide-credit {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

#private-key .guide-credit {
    text-align: center;
}

.guide-highlight {
    background: #fef08a;
    padding: 0.1em 0.25em;
}

/* Footer (from token-generator.css) – keep margin-top: auto so footer stays at bottom */
body > .footer,
.footer {
    background: black;
    opacity: 0.6;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: arial;
    color: white;
    font-size: 14px;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0;
    z-index: 5;
    flex-shrink: 0;
}
