body {
    background: #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.box {
    background: #ffffff;
    border-radius: 20px;
    padding: 48px 56px;
    width: 100%;
    max-width: 580px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #1e293b;
}
h2 {
    text-align: center;
    font-size: 28px;
    margin: 0 0 8px 0;
    color: #0f172a;
    letter-spacing: 0;
    font-weight: 600;
}
.subtitle {
    text-align: center;
    font-size: 15px;
    color: #94a3b8;
    margin-bottom: 32px;
}
.row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
label {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
input[type="number"] {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #0f172a;
    padding: 8px 12px;
    width: 72px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}
input[type="number"]:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}
input[type="checkbox"] {
    accent-color: #64748b;
    width: 17px;
    height: 17px;
    cursor: pointer;
}
.btn-row {
    display: flex;
    gap: 8px;
    margin: 16px 0 12px 0;
    flex-wrap: wrap;
}
.btn-row button {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1e293b;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    flex: 1;
    min-height: 44px;
    touch-action: manipulation;
}
.btn-row button:hover {
    background: #e2e8f0;
}
.btn-row button:active {
    transform: scale(0.97);
}
.btn-row .generate-btn {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
    flex: 2;
}
.btn-row .generate-btn:hover {
    background: #0f172a;
}
.btn-row .copy-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
    flex: 1;
}
.btn-row .copy-btn:hover {
    background: #e2e8f0;
}
textarea {
    width: 100%;
    height: 130px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 14px 16px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    line-height: 1.6;
    transition: 0.2s;
    margin-top: 4px;
}
textarea:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}
::selection {
    background: #cbd5e1;
    color: #0f172a;
}

@media (min-width: 600px) {
    body {
        padding: 40px;
    }
    .box {
        padding: 48px 56px;
        border-radius: 24px;
    }
    h2 {
        font-size: 30px;
    }
    .btn-row button {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 48px;
    }
    textarea {
        height: 140px;
        font-size: 15px;
        padding: 16px 18px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
        align-items: flex-start;
        padding-top: 20px;
    }
    .box {
        padding: 20px 16px;
        border-radius: 14px;
    }
    h2 {
        font-size: 22px;
    }
    .row {
        gap: 8px;
    }
    label {
        font-size: 14px;
    }
    input[type="number"] {
        width: 60px;
        padding: 8px 10px;
        font-size: 15px;
    }
    .btn-row {
        gap: 6px;
    }
    .btn-row button {
        padding: 12px 8px;
        font-size: 13px;
        min-height: 44px;
    }
    textarea {
        height: 160px;
        font-size: 14px;
        padding: 12px;
    }
}