.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 8px;
}

.form-nav {
    background-color: transparent;
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.4);
    margin-bottom: 15px;
}

.form-nav .links-primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.form-nav span {
    color: var(--pink);
    font-size: 12px;
    font-family: var(--font-mono);
    text-shadow: none;
}

.form-nav a {
    color: var(--white);
    text-decoration: underline dashed rgba(168, 85, 247, 0.4);
    font-size: 12px;
    font-family: var(--font-mono);
}

.form-nav a:hover,
.form-nav a.active {
    color: var(--pink);
    text-decoration: underline dashed rgba(168, 85, 247, 0.6);
    font-weight: 700;
}

.form-box {
    background: rgba(8, 3, 18, 0.92);
    border: 3px double var(--blue);
    padding: 20px;
    position: relative;
}

.form-box::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    outline: 1px solid rgba(99, 102, 241, 0.5);
    pointer-events: none;
}

.form-box::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    outline: 1px solid rgba(168, 85, 247, 0.4);
    pointer-events: none;
}

.form-title {
    font-size: 32px;
    margin-bottom: 15px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(76, 29, 149, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    background: rgba(5, 1, 15, 0.85);
    border: 2px solid var(--blue);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 14px;
    box-sizing: border-box;
}

.form-input:focus,
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 5px var(--red);
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-mono);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23f5f3ff" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(245, 243, 255, 0.4);
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-button {
    width: 100%;
    padding: 10px;
    background: rgba(5, 1, 15, 0.85);
    border: 2px solid var(--red);
    color: var(--white);
    font-family: var(--font-pixel);
    font-size: 20px;
    cursor: pointer;
    text-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
    margin-top: 10px;
    transition: all 0.2s ease;
}

.form-button:hover {
    background: var(--dark-red);
    border-color: var(--blue);
}

.form-button:active {
    transform: scale(0.98);
}

button[type="submit"],
input[type="submit"],
input[type="button"] {
    padding: 10px 16px;
    background: rgba(5, 1, 15, 0.85);
    border: 2px solid var(--red);
    color: var(--white);
    font-family: var(--font-pixel);
    font-size: 16px;
    cursor: pointer;
    text-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
    transition: all 0.2s ease;
}

button[type="submit"]:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background: var(--dark-red);
    border-color: var(--blue);
}

button[type="submit"]:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: scale(0.98);
}

.form-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-indent: 0;
}

.form-link a {
    color: var(--blue);
    text-decoration: underline;
}

.form-link a:hover {
    color: var(--red);
}

.form-error {
    background: rgba(67, 26, 117, 0.85);
    border: 2px solid var(--red);
    padding: 10px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    text-shadow: 0 0 8px rgba(5, 1, 15, 0.5);
    text-indent: 0;
}

.form-success {
    background: rgba(49, 46, 129, 0.8);
    border: 2px solid var(--blue);
    padding: 10px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    text-shadow: 0 0 8px rgba(5, 1, 15, 0.5);
    text-indent: 0;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.editor-toolbar button {
    cursor: pointer;
    background: rgba(5, 1, 15, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.15s ease;
}

.editor-toolbar button:hover {
    border-color: var(--red);
    color: var(--red);
}

.editor-help {
    margin-top: 6px;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: rgba(8, 3, 18, 0.8);
    font-size: 11px;
    text-indent: 0;
    line-height: 1.5;
}

.editor-help code {
    display: inline-block;
    font-size: 11px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 1px 4px;
    margin-right: 4px;
}

.editor-preview {
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    background: rgba(5, 1, 15, 0.85);
    padding: 12px;
    min-height: 160px;
    overflow-x: hidden;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    box-shadow: inset 0 0 12px rgba(15, 23, 42, 0.35);
}

.editor-preview p,
.editor-preview ul,
.editor-preview ol,
.editor-preview blockquote,
.editor-preview pre {
    text-indent: 0;
}

.editor-preview ul,
.editor-preview ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.editor-preview li {
    margin-bottom: 6px;
}

.editor-preview img,
.editor-preview video,
.editor-preview iframe,
.editor-preview embed,
.editor-preview object {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 25px rgba(8, 6, 18, 0.4);
    border-radius: 10px;
}

.editor-preview iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    min-height: 240px;
}

.editor-preview pre {
    background: rgba(5, 1, 15, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    border-radius: 8px;
}

.editor-preview code {
    font-family: var(--font-mono);
    background: rgba(99, 102, 241, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

.editor-preview pre code {
    background: transparent;
    padding: 0;
}

.editor-preview blockquote {
    border-left: 3px solid rgba(168, 85, 247, 0.6);
    margin: 14px 0;
    padding-left: 12px;
    color: rgba(248, 250, 252, 0.85);
}

.editor-preview[data-empty="true"]::before {
    content: "Start typing above to see a live preview.";
    color: rgba(248, 250, 252, 0.55);
    font-style: italic;
}

.editor-status {
    margin-top: 6px;
    font-size: 10px;
    color: rgba(248, 250, 252, 0.6);
    text-indent: 0;
}


@media (max-width: 768px) {
    .form-container {
        max-width: 100%;
        padding: 5px;
    }

    .form-box {
        padding: 15px;
    }

    .form-button {
        font-size: 18px;
    }
}

