/* General Resets */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Ubuntu', sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header & Nav */
nav {
    display: flex;
    justify-content: flex-start;
    padding: 15px 0;
    background: #1a1a1a;
    color: #ccc;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #888;
    margin-right: auto;
    margin-left: 24px;
}

.get-in-touch-nav {
    background: transparent !important;
    color: #aaa !important;
    border: none !important;
    padding: 8px 18px;
    font-weight: 400 !important;
    cursor: pointer;
    text-decoration: none !important;
    margin-right: 24px;
}

.get-in-touch-nav:hover {
    color: #ccc !important;
}

/* Main section */
.main-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 40px;
    min-height: calc(100vh - 54px);
}

/* Headline */
.headline {
    font-size: 3rem;
    font-weight: 300;
    color: #ccc;
    max-width: 900px;
    line-height: 1.5;
    margin: 0;
    padding-top: 4vh;
}

.mobile-break {
    display: none;
}

/* Steps container */
.steps-container {
    max-width: 550px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 4vh;
    margin-bottom: 15vh;
}

/* Step buttons */
.step-btn {
    width: 100%;
    max-width: 300px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    border: 1.5px solid #eee;
    background: transparent;
    color: #eee;
    margin-bottom: 20px;
    transition: background 0.2s, color 0.2s, opacity 0.3s;
}

.step-btn:hover:not(:disabled) {
    background: #eee;
    color: #111;
}

.step-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.step-btn:disabled:hover {
    background: transparent;
    color: #eee;
}

.step-btn.active {
    background: #eee;
    color: #111;
}

/* Step panels */
.step-panel {
    width: 100%;
    max-width: 550px;
    text-align: left;
    padding: 16px 0;
    color: #ccc;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.step-panel.collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}

/* Panel instruction text */
.panel-instruction {
    font-size: 0.95rem;
    color: #aaa;
    margin: 0 0 16px;
    line-height: 1.6;
    text-align: justify;
}

.panel-text {
    font-size: 0.95rem;
    color: #aaa;
    margin: 0 0 12px;
    line-height: 1.6;
    text-align: justify;
}

.panel-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin: 16px 0 4px;
    line-height: 1.5;
    text-align: justify;
}

/* Input bar */
#userInput {
    width: 96%;
    box-sizing: border-box;
    padding: 16px 22px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 20px;
    color: #eee;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.85rem;
    resize: none;
    overflow: hidden;
    min-height: 54px;
    line-height: 1.4;
    field-sizing: content;
    margin: 0 auto 4px;
    display: block;
}

#userInput::placeholder {
    color: #777;
}

#userInput:focus {
    outline: 2px solid #56CCF2;
    border-color: #56CCF2;
}

.input-example {
    font-size: 0.75rem;
    color: #666;
    margin: 8px 0 20px 0;
    font-style: italic;
    text-align: center;
    display: block;
    transition: opacity 0.6s ease;
    min-height: 2.5em;
}

.input-example.fade-out {
    opacity: 0;
}

.input-example.fade-in {
    opacity: 1;
}

/* Generate button */
#generateBtn {
    display: block;
    margin: 0 auto 16px;
    padding: 10px 36px;
    background: transparent;
    color: #555;
    border: 1.5px solid #56CCF2;
    border-radius: 50px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: default;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

#generateBtn:enabled {
    color: #56CCF2;
    border-color: #56CCF2;
    cursor: pointer;
}

#generateBtn:enabled:hover {
    background: #222;
    color: #fff;
}

/* Result box */
.result-box {
    background: #141414;
    border: 1px dashed #444;
    padding: 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#generatedLink {
    color: #56CCF2;
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin: 0;
    flex: 1;
}

#copyBtn {
    background: transparent;
    color: #888;
    border: none;
    padding: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    flex-shrink: 0;
}

#copyBtn:hover {
    color: #56CCF2;
}

#resultWrapper {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Template button */
.template-btn {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 10px 24px;
    background: transparent;
    color: #56CCF2;
    border: 1.5px solid #56CCF2;
    border-radius: 50px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}

.template-btn:hover {
    background: #222;
    color: #fff;
}

.template-btn i {
    margin-right: 8px;
}

/* Download button */
.download-btn {
    display: block;
    margin: 8px auto 16px;
    padding: 10px 24px;
    background: transparent;
    color: #56CCF2;
    border: 1.5px solid #56CCF2;
    border-radius: 50px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.download-btn:hover {
    background: #222;
    color: #fff;
    transform: scale(1.03);
}

/* Button grid for OS downloads */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 350px;
    margin: 0 auto 16px;
}

.sub-btn {
    background: #141414;
    color: #eee;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    font-family: 'Ubuntu', sans-serif;
    transition: background 0.2s;
}

.sub-btn:hover {
    background: #2a2a2a;
}

/* GitHub link */
.github-link {
    display: inline-block;
    margin-top: 30px;
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
}

.github-link:hover {
    color: #aaa;
}

/* Utility */
.hidden { display: none !important; }

/* Footer */
footer {
    margin-top: auto;
    padding: 12px 20px;
    background-color: #1a1a1a;
    color: #777;
    font-size: 0.8rem;
}

/* Mobile tap highlight */
@media (hover: none) and (pointer: coarse) {
    button, a, input, textarea, select, .sub-btn, .step-btn {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Mobile */
@media (max-width: 599px) {
    .headline {
        font-size: 1.8rem;
        margin: 0 0 28px;
    }

    .mobile-break {
        display: block;
    }

    .main-section {
        padding: 0 16px 30px;
        min-height: calc(100vh - 54px);
        min-height: calc(100dvh - 54px); /* dynamic viewport for mobile browsers */
    }

    .step-btn {
        max-width: 75%;
        font-size: 0.9rem;
        padding: 13px 20px;
    }

    .step-panel {
        padding: 12px 0;
    }

    .button-grid {
        max-width: 100%;
    }

    #generateBtn,
    .download-btn,
    .template-btn {
        width: 100%;
        max-width: 250px;
    }

    .result-box {
        padding: 12px;
    }

    #generatedLink {
        font-size: 0.78rem;
    }

    .panel-instruction,
    .panel-text {
        font-size: 0.9rem;
    }

    .steps-container {
        padding: 0 4px;
    }
}

/* ─── Contact / Form page styles ─── */
.black-section {
    padding: 15vh 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: #ccc;
    background-color: #1a1a1a;
}

.black-section button,
.black-section a,
.black-section input,
.black-section textarea {
    font-family: 'Ubuntu', sans-serif;
}

.link-generator-container {
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.outsource-form {
    max-width: 450px;
    margin: 24px auto 0;
    text-align: left;
}

.form-field {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    background: #141414;
    border: 1px solid #444;
    border-radius: 12px;
    color: #eee;
    margin-bottom: 10px;
    font-family: inherit;
}

.form-field:focus,
.form-field:focus-visible {
    outline: 2px solid #56CCF2;
    border-color: #56CCF2;
    box-shadow: none;
}

textarea.form-field {
    resize: vertical;
    border-radius: 12px;
}

.form-label {
    display: block;
    text-align: left;
    color: #aaa;
    font-size: 0.82rem;
    margin-bottom: 4px;
    margin-top: 6px;
}

.encryption-notice {
    color: #666;
    font-size: 0.75rem;
    font-style: italic;
    margin: 14px 0 10px;
}

.submit-btn {
    padding: 12px 36px;
    background: transparent;
    color: #56CCF2;
    border: 1.5px solid #56CCF2;
    border-radius: 50px;
    font-weight: 400;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 6px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.2s;
    font-family: 'Ubuntu', sans-serif;
}

.submit-btn:hover {
    transform: scale(1.03);
    background: #222;
    color: #fff;
}

.form-success {
    color: #56CCF2;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    text-align: center;
}
