@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Global ── */
body {
    min-height: 100vh;
    margin: 0;
    background: #000000;
    color: #e4e4e7;
    font-family: 'Inter', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* ── Header ── */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

header img {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(83, 252, 24, 0.3));
    margin-bottom: 15px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

header div {
    text-align: center;
}

h1 {
    margin: 0;
    font-weight: 700;
    font-size: 3rem;
    color: #ffffff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    letter-spacing: -0.02em;
}

h2 {
    margin: 5px 0 0 0;
    font-weight: 300;
    font-size: 1.4rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ── Section ── */
section {
    width: 90%;
    max-width: 1100px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #a1a1aa;
    text-align: center;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.2rem 2rem;
    backdrop-filter: blur(10px);
}

.intro-text em {
    color: #ffffff;
    font-style: normal;
    font-weight: 600;
}

/* ── Feature List ── */
#feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0 auto 2.5rem;
}

#feature-list li {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a1a1aa;
    transition: border-color 0.2s;
}

#feature-list li:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

#feature-list li::before {
    content: "✓";
    color: #ffffff;
    font-weight: bold;
}

/* ── Links ── */
a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all .2s;
}

a:hover {
    color: #d4d4d8;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

/* ── Form Container ── */
form[name="generator"] {
    width: 100%;
    box-sizing: border-box;
    padding: 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px) saturate(120%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Channel Inputs ── */
.channel-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.channel-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px 14px;
    transition: all 0.3s ease;
}

.channel-input-wrapper img.input-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.channel-input-wrapper input[type="text"] {
    width: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    text-align: left;
    padding: 8px 0;
}

.channel-input-wrapper input[type="text"]::placeholder {
    color: #52525b;
}

.channel-input-wrapper input[type="text"]:focus {
    outline: none;
}

/* Focused borders — monochrome white glow */
.channel-input-wrapper.twitch:focus-within,
.channel-input-wrapper.kick:focus-within,
.channel-input-wrapper.youtube:focus-within {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

/* ── Form Layout ── */
.form_table {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    align-items: start;
}

.form_col {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form_row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
}

.form_row.left {
    justify-content: flex-start;
}

.form_row.right {
    justify-content: flex-end;
}

.form_row label {
    font-size: 0.95rem;
    color: #a1a1aa;
    font-weight: 500;
}

.form_row.left label {
    margin-left: 15px;
}

.form_row.right label {
    margin-right: 15px;
}

/* ── Selects (Dropdowns) ── */
select {
    width: 200px;
    height: 35px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #e4e4e7;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0 10px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select option {
    background: #18181b;
    color: #e4e4e7;
}

select:hover, select:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #27272a;
    outline: none;
}

/* ── Text Inputs ── */
input[type="text"].styled-input {
    width: 180px;
    height: 35px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0 12px;
    box-sizing: border-box;
    transition: all 0.2s;
}

input[type="text"].styled-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: #27272a;
    outline: none;
}

/* ── Checkboxes (Toggle switches) ── */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

input[type="checkbox"]:after {
    position: absolute;
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #71717a;
    top: 2px;
    left: 3px;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked:after {
    transform: translateX(23px);
    background: #09090b;
}

/* ── Bot & Command Names Containers ── */
#botNamesContainer,
#commandNamesContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin-top: 15px;
}

#botNamesContainer label,
#commandNamesContainer label {
    margin: 0;
    color: #a1a1aa;
}

#botNamesContainer input,
#commandNamesContainer input {
    width: 100%;
    height: 40px;
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    padding: 0 15px;
    font-family: inherit;
    box-sizing: border-box;
}

#botNamesContainer input:focus,
#commandNamesContainer input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

/* ── Submit / Preview ── */
.form_row.center {
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

#submit_container {
    width: 100%;
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.preview-header label {
    color: #71717a;
    font-weight: 500;
    font-size: 0.95rem;
}

.preview-header img#brightness {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    filter: grayscale(100%) brightness(0.8);
}

.preview-header img#brightness:hover {
    transform: scale(1.1);
    filter: grayscale(100%) brightness(1.2);
}

iframe#example {
    width: 100%;
    max-width: 900px;
    height: 260px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 25px;
    box-sizing: border-box;
}

iframe#example.white {
    background: rgba(240, 240, 240, 0.95);
}

/* ── Generate Button ── */
.btn-primary {
    width: 200px;
    height: 50px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: #09090b;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.18);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ── Result Box ── */
#result {
    width: 100%;
    box-sizing: border-box;
    padding: 30px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

#result p {
    color: #71717a;
}

#url {
    width: 100%;
    height: 45px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #e4e4e7;
    font-family: inherit;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#url:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

#url:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

#alert {
    visibility: hidden;
    opacity: 0;
    background: #ffffff;
    color: #09090b;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ── Footer ── */
footer {
    width: 100%;
    margin-top: 60px;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    font-size: 0.85rem;
    color: #52525b;
    margin: 4px 0;
    text-align: center;
}

footer a {
    color: #71717a;
    transition: color 0.2s;
}

footer a:hover {
    color: #ffffff;
}

/* ── Preview alignment ── */
#example .chat_line {
    margin-bottom: 6px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

#example .user_info {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

#example .badge {
    height: 0.95em;
    width: auto;
    margin-right: 4px;
}

#example .badge.platform-indicator {
    height: 0.95em;
    width: 0.95em;
    margin-right: 6px;
}

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