body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Sci-Fi Font', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: #1e1e1e;
    padding: 20px;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    left: 0;
    right: 0;
    transform: none;
    box-sizing: border-box;
    overflow-x: hidden;
}

h1 {
    font-size: 2.5em;
    margin: 0;
}

h2 {
    font-size: 2em;
    margin: 0 0 10px 0; /* Reduced top margin from 20px to 0 */
}

section {
    padding: 20px;
    max-width: 800px;
    margin: auto;
}

a {
    color: #00bfff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer {
    background: #1e1e1e;
    padding: 10px;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100vw;         /* Full screen width */
    box-sizing: border-box;
    overflow-x: hidden;
}

button {
    background-color: #00bfff;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
}

button:hover {
    background-color: #008fbf;
}

.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.light-mode {
    background-color: #f8f8f8;
    color: #232c3b;
}

.light-mode .step-section {
    background: #e0e0e0; /* Darker than page background for contrast */
    color: #232c3b;
}

.light-mode .step-title {
    color: #232c3b;
}

.light-mode .step-title .step-num {
    color: #e67c00; /* Darker orange for numbers */
}

.light-mode .step-section ul li span[style*="color:#f2aa4c"] {
    color: #e67c00 !important; /* Use same color for starred packages */
}

.light-mode a {
    color: #0074d9;
}

.light-mode .theme-toggle-btn {
    background: #f2f2f2;
    color: #f2aa4c;
}

.light-mode .theme-toggle-btn:hover {
    background: #f2aa4c;
    color: #232c3b;
}

.light-mode button {
    background-color: #f2aa4c;
    color: #232c3b;
}

.light-mode button:hover {
    background-color: #ffd600;
    color: #232c3b;
}

.step-section {
    background: #1e1e1e;
    border-radius: 8px;
    margin-bottom: 2.5em;
    margin-top: 1em; /* Reduced from 2.5em */
    padding: 1.5em 3em 2em 3em; /* Reduced top padding from 3em */
    position: relative;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    min-height: 70px;
    display: block; /* Changed to block display */
}

.step-number {
    display: none; /* Hide separate number */
}

.step-title {
    font-weight: bold;
    font-size: 2em;
    margin-bottom: 0.3em;
    margin-left: 0;
    color: #fff;
    line-height: 1.1;
}

.step-title .step-num {
    color: #FFD600;
    font-size: 1em;
    font-weight: bold;
    margin-right: 0.4em;
    vertical-align: middle;
}

.step-text {
    margin-left: 0;
    width: 100%;
    display: block;
    align-items: unset;
    margin-top: 0.7em;
}

ul, ol {
    padding-left: 1.2em;
    margin-left: 0;
    margin-right: 0;
}

.step-section ul {
    padding-left: 3em;
    margin-left: 0;
    margin-right: 0;
}

.step-section ul li {
    margin-bottom: 1.2em;
    position: relative;
}

.step-section ul li > em {
    display: inline;
    margin-left: 2em;
    margin-bottom: 0.2em;
}

footer p {
    word-break: break-word;
    font-size: 1em;
}

.theme-toggle-btn {
    position: fixed;
    right: 2em;
    bottom: 2em;
    z-index: 1000;
    background: #393939;      /* True dark grey */
    color: #FFD600;
    border: none;
    border-radius: 50%;
    width: 3em;
    height: 3em;
    font-size: 1.5em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.theme-toggle-btn:hover {
    background: #666666;      /* Lighter grey on hover */
    color: #FFD600;
}

@media (max-width: 900px) {
    main, section, .step-section {
        max-width: 98vw;
    }
    .step-section {
        padding: 1em 1.5em 1.5em 1.5em; /* Reduced top padding */
    }
    .step-title {
        min-width: 110px;
        font-size: 1.5em;
        margin-top: 0.1em; /* Reduce further if needed */
    }
}

@media (max-width: 600px) {
    body {
        font-size: 1em;
        padding: 0;
    }
    header, footer {
        padding: 10px;
    }
    h1 {
        font-size: 1.2em;
    }
    h2 {
        font-size: 1em;
    }
    main {
        padding: 0.5em;
    }
    section, .step-section {
        display: block;
        padding: 2em 1em 1.5em 1em;
        max-width: 100vw;
        margin-left: 0;
        margin-right: 0;
        min-height: 50px;
        font-size: 0.98em;
    }
    .step-number {
        margin-right: 0.7em;
        margin-bottom: 0.3em;
        font-size: 1em;
        display: inline-flex;
        margin-top: 0.1em;
    }
    .step-title {
        margin-left: 0;
        margin-right: 0.7em;
        font-size: 1.2em;
        min-width: 0;
        display: inline-flex;
        margin-top: 0.2em;
    }
    .step-text {
        margin-left: 0;
        width: 100%;
        font-size: 0.98em;
        margin-top: 0.7em;
    }
    ul, ol {
        font-size: 0.98em;
        padding-left: 1em;
    }
    .step-section ul {
        padding-left: 0.2em;
    }
    a, button {
        font-size: 0.98em;
        word-break: break-all;
    }
    footer p {
        font-size: 0.95em;
        padding: 0 0.5em;
    }
    footer {
        max-width: 100vw;
        padding: 10px 0.5em;
    }
    .theme-toggle-btn {
        right: 1em;
        bottom: 1em;
        width: 2.5em;
        height: 2.5em;
        font-size: 1.2em;
    }
}

.light-mode header,
.light-mode footer {
    background: #e0e0e0; /* Match step-section background */
    color: #232c3b;
}